I will begin by saying that I am still new to Linux and learning myself every day. This HOWTO is the result of several failed installations attempts of Dapper (and upgrading to it from Breezy). I am documenting my experiences in the hope that someone else won't spend an entire week trying to fix the problems I had.
Scenario
You have Breezy Badger installed on your PC. You have an IDE disk connected to your IDE0 channel on the motherboard with, for arguments sake, a Windows partition and an Ubuntu partition on your disk. On your other IDE channel, IDE1, you have a CDROM\DVD Drive. You also have some other drives connected to an IDE adaptor (the number is insignificant but it could be several).
You decide to upgrade from Breezy Badger to Dapper Drake. You do the necessary upgrade steps, and everything seems to run without a hitch. You reboot. And your faced with a tragedy that looks something similar to the following :
Code:
Ubuntu Logo Here
Loading Essential Drivers : [OK]
Mounting Root File System : blank
Waiting for root filesystem : blank
It sits there for 3 or 4 minutes until eventually your faced with a black screen and a terminal shell with a message along the lines of
Code:
Begin: Waiting for root file system... ...
Cannot find /dev/hda2
ALERT : dev/hda2 does not exist
BusyBox Built In Shell
#_
If you're new to Linux, or just uneasy about what you're doing, this is without doubt an absolute show stopper!! And no, doing a fresh install (so wiping your earlier attempts and re-trying) will not get round the problem either. And no, installing from the CD won't help you either (trust me, it won't - been there, tried that, cried in my cup of English tea, and re-tried again!). It's a big fat mess (at least it seems to be). So what the cause, and how do you fix it? Read on.
The Cause
Ubuntu Dapper Drake (and I think it’s related to the 2.16 Kernel generally) re-assigns drive letter assignments very badly when your PC has multiple IDE devices installed. It was known as a bug prior to release but was only considered 'low priority'. Let me explain. You may have a disk set-up like this :
In Breezy Badger :
- hda 20Gb HDD
- hdc CD\DVD
- hde 160GB HDD
- hdf 160GB HDD
But on Dapper it becomes :
- hda 160GB HDD
- hdc 160Gb HDD
- hde 20Gb HDD
- hdf CD\DVD
So, your Breezy installation that was on hda get upgraded to Dapper, but after the upgrade something happens so that when you reboot Dapper thinks the root filesystem is on hda but 'hda' (the value 'hda' I mean) has been assigned to a different drive all together, But Dapper doesn’t know that.
OK. Well how the hell do I fix it?
1) Download the Dapper Install Live install CD and burn the ISO to CD : http://www.ubuntu.com/download
2) Test it works.
3) Using your current installation (not live CD) temporaily remove all the mount references to your additional drives from etc/fstab and copy them to a text file in your home folder (or better still an external storage medium) for use later on. Leave your standard root partition and the swap partition as they are.
Code:
Sudo gedit //etc/fstab
For example, change :
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hde2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdd5 /home/ted/Mounts/ext3 ext3 rw,user,auto 0 0
/dev/hda1 /home/ted/Mounts/reiser reiserfs rw,user,auto 0 0 – Take these out
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
to :
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hde2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
Save, and exit.
4) Install or upgrade your installation from Breezy to Dapper (this step is beyond the scope of this HOWTO).
5) Reboot. You will almost certainly find the problem will occur, but you never know, you might be OK in which case you don't need to read this . Otherwise, read on.
6) Turn off your PC and unplug the power to your additional drives leaving only the one with your operating system on plugged in (you must make sure this step is done accurately in light of your adjustments to fstab). In my example, this is the disk recognised as dev/hda2 in fstab.
7) Reboot using the live CD you downloaded and created earlier in step 1.
8) You should now be in the Live CD environment. Go to System, Administration, Disk Information, and look at how Dapper has assigned your single IDE drive and partitions. Most likely, it will be something like ‘/dev/hde2’ (instead of hda2). Make a note of that (in my case, hda2 had been changed to hde2).
9) Then you need to edit the boot loader of your main installation on your disk drive because it’s here where the confusion lies because entries are made that do not match what Dapper has assigns. To do that, we have to mount the partition with your main installation on with write access using the Live CD environment. So, while still in System Administration, Disk Information, navigate to your HDD with the install of Dapper on it, click the 'Partitions' tab and select the partition where it's actually installed. Then create a temporary mount point in the home folder of your Live CD session, and then click 'Enable'. You will see that if you then click Browse your main install files will be listed. See this Screenshot for an example.
10
Code:
sudo edit Your_Temporary_Mount_Point/boot/grub/menu.lst
Near the bottom, for each entry you should see lines relating to the various Linux Kernels you’ve had installed on your machine and the partitions that they reside. For example :
Code:
kernel /boot/vmlinuz-2.6.15-1-686 root=/dev/hda5 ro
where it says /dev/hda5 change it to the drive assignments that you noted earlier in step 8. For example,
Code:
kernel /boot/vmlinuz-2.6.15-1-686 root=/dev/hde5 ro
If you want, change all the other values for your Recovery Mode entries and earlier Kernel entries too because otherwise they won’t work later on when you need them. Alternatively, wait to see if it works at all first.
Save the file, and reboot.
11) With any luck, your new Ubuntu Dapper Drake system will now boot. Expect the usual graphics drivers problems especially if you’ve performed an upgrade (as opposed to fresh install) and if you used a specific driver for your graphics card such as Nvidia. Correcting that is another issue and beyond the scope of this HOWTO. It all depends on your graphics cards.
12) Shut-down, re-connect your additional drives, and reboot back into Ubuntu.
13) Go to System, Administration, Disk Information again and set new mount points for your additional drives. If you make them the same as before you can just copy and paste your mount entries that you removed earlier in step 3 back into fstab just as before except obviously you'll need to change the drive assignments in light of how Dapper has now decided to assign them. So whereas you may have had
Code:
/dev/hdd5 /home/ted/Mounts/ext3 ext3 rw,user,auto 0 0. look at how Dapper
Under Dapper it may now be
Code:
/dev/hde5 /home/ted/Mounts/ext3 ext3 rw,user,auto 0 0
I hope that helps.
PLEASE NOTE : It seems that every time your Linux kernal is upgraded, the re-assignment back to the wrong partitions occur so you have to edit the menu.lst file again using the Live CD environment. So keep this HOW TO in your favourites!!
Lastly, while this may seem infinately annoying at the time, it's no different to Windows assigning 'Drive C:' during installation to a drive other than what you intended when you have several disks present. On several occasions I've had to disconnect disks before re-installing a fresh copy of Windows for the very same reason. The only difference is that Windows copes with it whereas Linux doesn't like it. Like most things, this is why Windows is a bit messy whereas Linux is stricter and the by the book and rather than putting it up with it it wants you to fix it.
Other references : http://www.ubuntuforums.org/showthre...=186930&page=2
Bookmarks