{"id":97,"date":"2009-02-24T11:51:00","date_gmt":"2009-02-24T01:51:00","guid":{"rendered":"https:\/\/www.serenux.com\/?p=97"},"modified":"2021-01-14T11:54:09","modified_gmt":"2021-01-14T01:54:09","slug":"howto-uninstall-software-that-makes-ubuntus-boot-process-fail","status":"publish","type":"post","link":"https:\/\/www.serenux.com\/index.php\/2009\/02\/24\/howto-uninstall-software-that-makes-ubuntus-boot-process-fail\/","title":{"rendered":"HowTo: Uninstall software that makes Ubuntu\u2019s boot process fail"},"content":{"rendered":"\n<p><a href=\"https:\/\/web.archive.org\/web\/20160311193117\/http:\/\/www.serenux.com\/?p=435\" target=\"_blank\" rel=\"noreferrer noopener\">Whilst rebuilding a friend\u2019s Medion laptop<\/a>, in my attempt to get the Wireless LAN adapter working, I set about trying to use ndiswrapper and the Windows drivers. Unfortunately upon rebooting, the system failed to boot, always locking up when the boot process tried to load the Windows driver. It was so bad that I wasn\u2019t even able to boot to a recovery prompt because it still attempts to load the hardware drivers before dropping you into a root shell.<\/p>\n\n\n\n<p>The solution was simple \u2013 get rid of ndiswrapper and that will prevent the offending Windows driver loading which I can then delete afterwards, but how do you do this when you can\u2019t even boot to a terminal?<\/p>\n\n\n\n<p>With the assistance of an Ubuntu LiveCD (on USB stick in this case), I was able to remove ndiswrapper without needing to do a complete re-install of the system. Here\u2019s how to do it.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Shutdown your system, insert your Ubuntu LiveCD and turn on your system.<br><\/li><li>Allow the system to boot to the LiveCD desktop and then open a terminal.<br><\/li><li>Determine what your system\u2019s root partition is called by getting a list of available drives and partitions with:<br><br><code>$ sudo fdisk -l<\/code><br><\/li><li>In my case, this Medion lappy had Windows installed and a couple of other partitions too. The root Linux partition ultimately resided on sda8, so I need to mount this somewhere. First I need a mountpoint:<br><br><code>$ mkdir \/dev\/shm\/medion<\/code><br><br>\u2026this creates a directory in the RAM disk called \u201cmedion\u201d (but you can call it whatever you want).<br><\/li><li>Now mount the partition to the mountpoint with:<br><br><code>$ sudo mount \/dev\/sda8 \/dev\/shm\/medion<\/code><br><\/li><li>Check that we can access the mounted drive with:<br><br><code>$ ls -l \/dev\/shm\/medion<\/code><br><\/li><li>If it contains the root filesystem of your lappy\u2019s Ubuntu install, then you\u2019ve done well so far. Now we need to change the system\u2019s root filesystem from the LiveCD over to the hard-drive\u2019s root filesystem so we can work on it. Type in:<br><br><code>$ sudo chroot \/dev\/shm\/medion<\/code><br><\/li><li>This will temporarily make the current session\u2019s root filesystem the one that is on your hard-drive, as though we\u2019d actually booted from it. From here, it\u2019s now a simple case of removing the ndiswrapper application that was causing all my problems (notice that we are at a root prompt designated by the hash symbol):<br><br><code># apt-get remove ndiswrapper-common<\/code><br><\/li><li>A few warning messages popped up advising that it couldn\u2019t find the log to write to, but that\u2019s OK \u2013 the software still gets removed, and thus will prevent the Windows driver from killing the boot process. Once Apt had finished doing its thing, just type in:<br><br><code># exit<\/code><br><br>\u2026and the root filesystem will revert back to the LiveCD\u2019s root filesystem.<br><\/li><li>Shutdown and reboot as normal without the LiveCD, and viola \u2013 the system boots without hanging this time!<\/li><\/ol>\n\n\n\n<p>As you can see, the ability to change root filesystem can be very useful in trouble-shooting a non-booting installation but also has other uses too, one of the most common being creating custom LiveCD\u2019s by modifying the squashfs filesystem on the LiveCD and burning to a new disc \u2013 thus allowing you to add or remove components from the default Ubuntu LiveCD environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whilst rebuilding a friend\u2019s Medion laptop, in my attempt to get the Wireless LAN adapter working, I set about trying to use ndiswrapper and the Windows drivers. Unfortunately upon rebooting, the system failed to boot, always locking up when the boot process tried to load the Windows driver. It was so bad that I wasn\u2019t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":1,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":98,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/97\/revisions\/98"}],"wp:attachment":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}