<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ubuntu on Noetic Nought</title>
    <link>https://punchagan.muse-amuse.in/tags/ubuntu/</link>
    <description>Recent content in Ubuntu 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/ubuntu/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>Restoring GRUB with Grub2</title>
      <link>https://punchagan.muse-amuse.in/blog/restoring-grub-with-grub2/</link>
      <pubDate>Tue, 10 Aug 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/restoring-grub-with-grub2/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s a one liner with grub2.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ sudo grub-install --root-directory=/mount/point/of/root/ /dev/sdX&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;where &lt;code&gt;sdX&lt;/code&gt; is &lt;code&gt;sda,sdb,..&lt;/code&gt; depending on which hard-drive it is&#xA;on.&lt;/p&gt;&#xA;&lt;p&gt;This is the first instance when I found grub2 to be better&#xA;than grub.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Telugu Rendering in Ubuntu...</title>
      <link>https://punchagan.muse-amuse.in/blog/telugu-rendering-in-ubuntu/</link>
      <pubDate>Wed, 11 Jul 2007 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/telugu-rendering-in-ubuntu/</guid>
      <description>&lt;p&gt;I had problems with this and tried quite a few things to get it&#xA;working&amp;hellip;  [uninstalling and re-installing&#xA;packages&amp;hellip; downloading fonts.. etc.. ] but couldn&amp;rsquo;t until I found&#xA;help here&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;[Apparently there&amp;rsquo;s a bug in the Pothana font (in Feisty)]&lt;/p&gt;&#xA;&lt;p&gt;[ Don&amp;rsquo;t worry if you can&amp;rsquo;t figure out what&amp;rsquo;s the big deal in&#xA;linking to an already existing post.. :P]&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
