For people which encounter same problem, here a detailed howto to
temporarily repare your distro :

# from initramfs'hell :

# mount correctly your rootfs
mount /dev/mapper/vgname-lvname /root

# 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
gunzip < /boot/initrd.img-2.6.38-8-generic | cpio -idmv

# edit the "local" script (which mount local file system)
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/vgname-lvname ${rootmnt}
# close your favorite editor and build a new initramfs
find . | cpio -ov -H newc | gzip > /boot/initrd.img-rescue

# add a grub custom entry into /boot/grub/custom.cfg
# coppying an actual entry from /boot/grub/grub.cfg
vim /boot/grub/grub.cfg /boot/grub/custom.cfg

# mine looks like this :
> menuentry 'rescue' --class ubuntu --class gnu-linux --class gnu --class os {
>       recordfail
>       set gfxpayload=$linux_gfx_mode
>       insmod part_msdos
>       insmod ext2
>       set root='(hd0,msdos1)'
>       search --no-floppy --fs-uuid --set=root 
> uuiduuid-uuid-uuid-uuid-uuiduuiduuid
>       linux   /vmlinuz-2.6.38-8-generic root=/dev/mapper/vgname-lvname ro   
> quiet splash vt.handoff=7
>       initrd  /initrd.img-rescue
> }
# then... reboot, and to next boot, choose "rescue" in grub menu.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/772270

Title:
  initramfs uses bad lvm lvname to mount /

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to