<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Noetic Nought</title>
    <link>https://punchagan.muse-amuse.in/tags/linux/</link>
    <description>Recent content in Linux on Noetic Nought</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>© 2006-2026 CC-BY-SA-4.0</copyright>
    <lastBuildDate>Wed, 20 Nov 2024 15:17:00 +0530</lastBuildDate>
    <atom:link href="https://punchagan.muse-amuse.in/tags/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Restoring a broken Ubuntu upgrade</title>
      <link>https://punchagan.muse-amuse.in/blog/restoring-broken-ubuntu-upgrade/</link>
      <pubDate>Wed, 20 Nov 2024 15:17:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/restoring-broken-ubuntu-upgrade/</guid>
      <description>&lt;p&gt;A couple of weeks ago, &lt;a href=&#34;http://baali.muse-amuse.in&#34;&gt;Shantanu&lt;/a&gt; and I were discussing Ubuntu upgrades &amp;ndash; his&#xA;upgrade was borked and he ended up re-installing his system. I was celebrating&#xA;the fact that I never really had to throw away my OS installation entirely&#xA;since I switched to Ubuntu after getting tired of &lt;a href=&#34;https://punchagan.muse-amuse.in/blog/numpy-pacman-and-me/&#34;&gt;Arch Linux in 2011-12&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;And on cue, I had a really broken update on my dad&amp;rsquo;s laptop! It was really&#xA;broken &amp;ndash; no WiFi, no Ethernet connection, no GUI packages, etc.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-crash&#34;&gt;The crash&lt;/h2&gt;&#xA;&lt;p&gt;I started the update but forgot about it, promptly. My dad was semi-supervising&#xA;it, since he was using the laptop on-and-off. I came back to it a couple of&#xA;days later, and I ran an autoremove, assuming everything else in the install&#xA;went ok. Everything continued to work alright until some time later, we had to&#xA;restart the X server because it had hung up. And it never came back. And on a&#xA;full restart, no network &amp;ndash; both Ethernet and Wifi.&lt;/p&gt;&#xA;&lt;h2 id=&#34;chroot-to-the-rescue&#34;&gt;&lt;code&gt;chroot&lt;/code&gt; to the rescue!&lt;/h2&gt;&#xA;&lt;p&gt;Thankfully these are not the days when I had &lt;a href=&#34;https://punchagan.muse-amuse.in/blog/not-so-floppix/&#34;&gt;access to a single computer&lt;/a&gt;, and&#xA;crashing it meant running to a friend and using their computer to download&#xA;stuff. I quickly made a bootable USB on my laptop.&lt;/p&gt;&#xA;&lt;p&gt;I boot my dad&amp;rsquo;s laptop using the live distro and chroot to the installed OS&#xA;using the live distro. Live Ubuntu has Ethernet working, thankfully.&lt;/p&gt;&#xA;&lt;p&gt;For &lt;code&gt;apt-get install&lt;/code&gt; and &lt;code&gt;dist-upgrade&lt;/code&gt; to work correctly with the &lt;code&gt;chroot&lt;/code&gt;, I&#xA;had to &lt;a href=&#34;https://forum.manjaro.org/t/howto-chroot-from-or-into-any-linux-distribution/34071&#34;&gt;mount a bunch of volumes&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Due to some network manager changes in the update, the &lt;code&gt;chroot&lt;/code&gt; system still&#xA;wasn&amp;rsquo;t connecting to the internet. I probably should&amp;rsquo;ve looked at the&#xA;&lt;code&gt;resolv.conf&lt;/code&gt; file first, but ended up going the &lt;a href=&#34;https://wiki.ubuntu.com/OfflinePackageDownload&#34;&gt;offline package install&lt;/a&gt;&#xA;route&amp;hellip;&lt;/p&gt;&#xA;&lt;h2 id=&#34;offline-updates&#34;&gt;Offline updates&lt;/h2&gt;&#xA;&lt;p&gt;I generate a list of missing packages to be downloaded using the &lt;code&gt;--print-uris&lt;/code&gt;&#xA;flag to &lt;code&gt;apt-get&lt;/code&gt; on the &lt;code&gt;chroot&lt;/code&gt; system; And use &lt;code&gt;wget&lt;/code&gt; to download the&#xA;packages on the &amp;ldquo;live&amp;rdquo; system; Then copying these packages to&#xA;&lt;code&gt;/var/cache/apt/archives/&lt;/code&gt; gets the update to finish.&lt;/p&gt;&#xA;&lt;h2 id=&#34;but-more-missing-packages&#34;&gt;But more missing packages!&lt;/h2&gt;&#xA;&lt;p&gt;I rebooted into the installed OS, once &lt;code&gt;apt-get dist-upgrade&lt;/code&gt; seems to have&#xA;everything resolved. But, I still didn&amp;rsquo;t have a network! I had to &lt;code&gt;chroot&lt;/code&gt;&#xA;again into the system, and this time I figured out that there was an issue with&#xA;&lt;code&gt;resolv.conf&lt;/code&gt; being a broken soft-link which seemed to cause the broken network&#xA;(with Ethernet).&lt;/p&gt;&#xA;&lt;p&gt;For WiFi, I had to install proprietary drivers for the Broadcom wireless card&#xA;(&lt;code&gt;BCM43142 802.11b/g/n&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;I had to also install the &lt;code&gt;ubuntu-desktop&lt;/code&gt; and related packages that seem to&#xA;have gone missing, and on reboot everything was up and running!&lt;/p&gt;&#xA;&lt;h2 id=&#34;outro&#34;&gt;Outro&lt;/h2&gt;&#xA;&lt;p&gt;When I told Shantanu, I didn&amp;rsquo;t have to reinstall my Ubuntu from scratch doesn&amp;rsquo;t&#xA;mean that all my updates were flawless, and things never broke. I have had such&#xA;broken updates a few times &amp;ndash; network updates leaving the system in a broken&#xA;state after network connections died, Ubuntu upgrade being in a borked state&#xA;after the &lt;a href=&#34;https://ubuntu.com/security/CVE-2024-3094&#34;&gt;xz vulnerability was discovered&lt;/a&gt;, etc.&lt;/p&gt;&#xA;&lt;p&gt;Updates do fail. But, more often than not I&amp;rsquo;ve been able to restore things&#xA;thanks to &lt;code&gt;dpkg&lt;/code&gt; &amp;rsquo;s robustness and awesomness! And in some extreme cases,&#xA;reaching for &lt;code&gt;chroot&lt;/code&gt; to save myself.&lt;/p&gt;&#xA;&lt;p&gt;There&amp;rsquo;s probably nothing new to learn or discover in this post, but just some&#xA;help forum links that might come in handy, in future. In this age of AI&#xA;answers, it seemed nice to look through some old forum QAs and work things out&#xA;using them.&lt;/p&gt;&#xA;&lt;div style=&#34;font-size:small;&#34; class=&#34;reviewers&#34;&gt;&#xA;&lt;p&gt;Thanks to &lt;a href=&#34;http://baali.muse-amuse.in&#34;&gt;Shantanu&lt;/a&gt; and &lt;a href=&#34;https://x.com/kamalx&#34;&gt;Kamal&lt;/a&gt; for reading drafts of this post.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>Let there be light, in skype!</title>
      <link>https://punchagan.muse-amuse.in/blog/let-there-be-light-in-skype/</link>
      <pubDate>Sat, 29 Mar 2014 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/let-there-be-light-in-skype/</guid>
      <description>&lt;p&gt;At home, my video would always show a silhouette in G+ and Skype, and&#xA;I always thought that this was because the lighting at home was not&#xA;sufficient.  At office, the video was decent.  But, moving to sit&#xA;right under the light also didn&amp;rsquo;t help much.&lt;/p&gt;&#xA;&lt;p&gt;Struggling with a bunch of tools like &lt;code&gt;v4lctl&lt;/code&gt;, &lt;code&gt;guvcview&lt;/code&gt; didn&amp;rsquo;t&#xA;help. But, during these struggles I noticed that &lt;code&gt;cheese&lt;/code&gt; would show&#xA;me bright and cheerful, while all the other programs showed my&#xA;silhouette.&lt;/p&gt;&#xA;&lt;p&gt;I set out to &amp;ldquo;fake&amp;rdquo; the output of &lt;code&gt;cheese&lt;/code&gt; as a video device that&#xA;skype and other programs could use. But, I didn&amp;rsquo;t have to go all the&#xA;way.  I ended up using &lt;a href=&#34;https://github.com/umlaeute/v4l2loopback/&#34;&gt;v4l2loopback&lt;/a&gt; to create a loopback video device,&#xA;and just using &lt;code&gt;gst-launch&lt;/code&gt; to redirect video to that device, did the&#xA;trick!  Thanks gstreamer!  Thanks v4l2loopback! :)&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a convenient &lt;a href=&#34;https://gist.github.com/punchagan/9859210&#34;&gt;script&lt;/a&gt; to use it every time I need it.&lt;/p&gt;&#xA;&lt;script src=&#34;https://gist.github.com/9859210.js&#34;&gt;&lt;/script&gt;&#xA;</description>
    </item>
    <item>
      <title>numpy, pacman and me</title>
      <link>https://punchagan.muse-amuse.in/blog/numpy-pacman-and-me/</link>
      <pubDate>Sun, 31 Jan 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/numpy-pacman-and-me/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m now officially a part of the Arch Linux community! Arch Linux&#xA;is a lightweight and flexible Linux® distribution that tries to&#xA;Keep It Simple.&lt;/p&gt;&#xA;&lt;p&gt;I have started using arch from less than a week or so. It took me&#xA;a while, not too long, to realize the beauty of this distro. I was&#xA;trying to tweak the settings of my org-mode&amp;rsquo;s remember (on&#xA;Karmic), trying to make it work the way I liked it. After breaking&#xA;my head with .emacs and lisp for a while, I realized the version&#xA;of my org-mode was way different from the version of the docs, I&#xA;was reading. It didn&amp;rsquo;t take long to figure out, which version of&#xA;org-mode to get. As a matter of curiosity, I checked AUR for the&#xA;version, and true to Arch&amp;rsquo;s reputation it was bleeding edge! I was&#xA;still using Karmic, since I hadn&amp;rsquo;t got my Arch installation&#xA;working the way I like it, yet. Out of laziness. sudo reboot; to&#xA;hell with laziness!&lt;/p&gt;&#xA;&lt;p&gt;I was setting up things I regularly use, tweaking my way&#xA;around. After a day or so, I find python-numpy is out of date. And&#xA;to top it, an orphaned package! I didn&amp;rsquo;t feel one bit good about&#xA;this. After some futile attempts to suppress my discomfort, I sat&#xA;down to work.&lt;/p&gt;&#xA;&lt;p&gt;After an afternoon of effort, I created my first PKGBUILD. :) I&#xA;now have python-numpy installed using pacman! Pleasure to join the&#xA;Arch User Community! Also, thanks to lifeeth and Lynus Vaz, for&#xA;the sparks.&lt;/p&gt;&#xA;&lt;p&gt;PS: I&amp;rsquo;m using Arch with Openbox. It&amp;rsquo;s neat! PPS: org-mode is&#xA;really awesome! It&amp;rsquo;s a world in itself. life in plain text,&#xA;truly!]&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
