mkinitrd detects wrong root filesystem

Bug #12819 reported by João Inácio
6
Affects Status Importance Assigned to Milestone
initrd-tools (Ubuntu)
Invalid
Medium
Jeff Bailey

Bug Description

- i had ubuntu installed on a computer with a single hard 8gb drive (hda1);
- i moved that hdd to my main pc, wich has another disk (120gb sata) and had to
change grub's menu.lst to reflect changes (my 8gb drive is now 'hdc', my sata
drive is 'hda').
- after booting ubuntu, my main drive (8g) is 'hda', my sata drive is 'sda'.

when installing a new kernel, mkinitrd detects '/dev/hda1' as my root, wich is
incorrect, causing the kernel package (and others following) not to be installed.

i fixed it by editing '/etc/mkinitrd/mkinitrd.conf' and entering the correct
value for ROOT ('ROOT=/dev/hdc1').

(still find a bit weird the discrepancy between my harddrive's names
before/after booting; but i'm very new to linux)

Revision history for this message
João Inácio (inacio) wrote :

(In reply to comment #0)
> - i had ubuntu installed on a computer with a single hard 8gb drive (hda1);
> - i moved that hdd to my main pc, wich has another disk (120gb sata) and had to
> change grub's menu.lst to reflect changes (my 8gb drive is now 'hdc', my sata
> drive is 'hda').
> - after booting ubuntu, my main drive (8g) is 'hda', my sata drive is 'sda'.
>
> when installing a new kernel, mkinitrd detects '/dev/hda1' as my root, wich is
> incorrect, causing the kernel package (and others following) not to be installed.
>
> i fixed it by editing '/etc/mkinitrd/mkinitrd.conf' and entering the correct
> value for ROOT ('ROOT=/dev/hdc1').
>
> (still find a bit weird the discrepancy between my harddrive's names
> before/after booting; but i'm very new to linux)

Sorry for the mixup, my harddrive is hdc, although the 'fstab' file still stated
'/dev/hda1' as the root filesystem.

if mkinitrd "probe" function gets the root value from fstab (as it seems to),
maybe it should be validated somehow???
if not, feel free to close this bug (and accept my apologies)

João Inácio

Revision history for this message
Jeff Bailey (jbailey) wrote :

Unfortunately, the current initrd setup can't cope with harddrives moving place
or from machine to machine. There's no way to reasonably fix this for Hoary,
but I already have a rework of the initrd (into something called an initramfs)
for the release after Hoary.

Setting this bug to 'LATER' so that I can close it properly when it's actually
fixed.

Revision history for this message
Jeff Bailey (jbailey) wrote :

Reopening, targetting to 5.10 for initramfs work.

Revision history for this message
Jeff Bailey (jbailey) wrote :

initramfs-tools in breezy now takes the root setting from the bootloader (grub,
lilo, silo, yaboot, etc...). Since we now use initramfs-tools instead of
initrd-tools, I am closing this bug as WONTFIX.

initramfs-tools copes with this correctly, though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.