initramfs uses bad lvm lvname to mount /
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: initramfs-tools
First symptom : at boot, the message "No init found. Try passing init= bootarg."
Boot fails.
I'm upgrading to Natty from Maverick
My configuration :
/dev/sda1 : /boot
/dev/sda5 : an encrypted luks volume containing an LVM physical volume
the volume groupe name is "arwen", the logical volume name for / is "racine"
the device containing rootfs is named /dev/mapper/
hence, my grub menuentry looks like this :
menuentry 'Ubuntu, avec Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
savedefault
set gfxpayload=
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root uuiduuid-
linux /vmlinuz-
initrd /initrd.
}
Sometimes, the error is more verbose, I've get yesterday a message which said the system attempt to mount /dev/mapper/arwen on initramfs' /root, but it's a mistake, my rootfs is on /dev/mapper/
The root= kernel argument is correct, but an initramfs script mades a mistake.
From initramfs' shell I've mounted my /boot partition, then create a new initrd.img hardcoding /dev/mapper/
The boot does'nt complain and I'm writing this bug report from Natty. :)
So, there is a bug in one script into initramfs which troncate the volume group name of / .
I've not found where.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: initramfs-tools 0.98.8ubuntu3
ProcVersionSign
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Thu Apr 28 12:21:09 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageArchitec
ProcEnviron:
LANGUAGE=fr_FR:en
PATH=(custom, user)
LANG=fr_FR.UTF-8
SHELL=/bin/bash
SourcePackage: initramfs-tools
UpgradeStatus: Upgraded to natty on 2011-04-21 (6 days ago)
description: | updated |
For people which encounter same problem, here a detailed howto to temporarily repare your distro :
# from initramfs'hell :
# mount correctly your rootfs vgname- lvname /root
mount /dev/mapper/
# and the bootfs
mount /dev/sda1 /root/boot
# then chroot into rootfs
chroot /root /bin/bash
# create a clean directory then go into
mkdir /plop; cd plop
# uncompress an initrd img-2.6. 38-8-generic | cpio -idmv
gunzip < /boot/initrd.
# edit the "local" script (which mount local file system) vgname- lvname ${rootmnt} img-rescue
vim scripts/local
# comment the line 91
> mount ${roflag} ${FSTYPE:+-t ${FSTYPE} }${ROOTFLAGS} ${ROOT} ${rootmnt}
# then hardcode your device
> mount ${roflag} ${FSTYPE:+-t ${FSTYPE} }${ROOTFLAGS} /dev/mapper/
# close your favorite editor and build a new initramfs
find . | cpio -ov -H newc | gzip > /boot/initrd.
# add a grub custom entry into /boot/grub/ custom. cfg custom. cfg
# coppying an actual entry from /boot/grub/grub.cfg
vim /boot/grub/grub.cfg /boot/grub/
# mine looks like this : $linux_ gfx_mode uuid-uuid- uuid-uuiduuiduu id 2.6.38- 8-generic root=/dev/ mapper/ vgname- lvname ro quiet splash vt.handoff=7
> menuentry 'rescue' --class ubuntu --class gnu-linux --class gnu --class os {
> recordfail
> set gfxpayload=
> insmod part_msdos
> insmod ext2
> set root='(hd0,msdos1)'
> search --no-floppy --fs-uuid --set=root uuiduuid-
> linux /vmlinuz-
> initrd /initrd.img-rescue
> }
# then... reboot, and to next boot, choose "rescue" in grub menu.