problemator
October 17th, 2011, 07:51 AM
I installed Oneiric from the desktop-amd64 (usb-live, runs perfectly!) to a brand new puter with an empty 2TB disk partitioned as follows:
sda1 - 100MB bootable primary as /boot
sda2 - 1.99TB extended as one VG, divided into 6 LVs for /, /home, /tmp, /usr, /var, /swap
No RAID, no encryption.
I can mount all volumes in usb-live (at /media/(UUID)/), and both physical and logical views in LVM look fine, but the new system won't start. After selecting any menuitem in Grub it runs a lot of text on the screen (too rapidly to read), and then stops to an error:
ALERT! /dev/mapper/vg1-lv--root does not exist. Dropping to a shell!
I have no idea what could I do in initramfs shell to heal the ill. However, I can access all the installed files from the usb-live (r+w as root), and--as far I can see--the problem lies in the following:
The menuentry in grub.cfg refers (correctly) to 'root=/dev/mapper/vg1-lv--root', but directory /dev/mapper/ is _empty_, except for a 0 bytes file 'control' (which I cannot open even as root user).
(This would affect of course all corresponding links in fstab and mtab, once the process could go further.)
The UUID references are valid.
Q1*** What files/symlinks should be in /dev/mapper/ for a succesful boot to take place with LVM?
Q2*** Is it possible to refer to the LVs in an other way, eg. with their UUIDs, and bypass the /dev/mapper/ altogether? (As Grub does--twice.)
Q3*** At what stage does LVM actually enter the game, 'insmod lvm' looks rather meager to my eyes? And where does/should it hide? I can't find but lvm.mod in /boot. I found some LVM related stuff and (empty) directories in other locations but they seem rather insignificant, and they are in wrong LVs to help booting anyway. (In usb-live all LVM stuff seems to be outside /boot, so I can't get any hints from there.)
Q4*** Is it possible LVM is not installed properly for my new system, although it was (quite apparently) present in my usb-live before I started installing to a disk. (The process didn't ask about LVM, but used the existing LVs without any error messages!)
If so, how do I install LVM to the new system, when I can't even launch it?
Yet another possible problem may be in the LV naming. I named the LVs as lv-root, lv-home, etc. but LVM seems to have written them in form vg1-lv--root, vg1-lv--home, etc. (vg1 is the only volume group in use.)
The first reference to LVs in grub.cfg is however '(vg1-lv-usr)' while the "consistent" name should be 'vg1-lv--usr'.
Q5*** Is there some discrepancy that may cause problems?
Here are the essential excerpts:
___________________________________________
grub.cfg:
-----------
insmod lvm
insmod part_msdos
insmod ext2
set root='(vg1-lv-usr)'
search --no-floppy --fs-uuid --set=root 32c92c4a-b900-4c47-a3ae-4b2ead7fd9e1
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0bcf088d-01d8-4b91-9637-f4dfb5cb440e
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
-----------
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0bcf088d-01d8-4b91-9637-f4dfb5cb440e
linux /vmlinuz-3.0.0-12-generic root=/dev/mapper/vg1-lv--root ro quiet splash vt.handoff=7
initrd /initrd.img-3.0.0-12-generic
(+ recovery mode and memtest entries as usual)
------------
________________________________________________
fstab:
--------------
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/vg1-lv--root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=0bcf088d-01d8-4b91-9637-f4dfb5cb440e /boot ext4 defaults 0 2
/dev/mapper/vg1-lv--home /home ext4 defaults 0 2
/dev/mapper/vg1-lv--tmp /tmp ext4 defaults 0 2
/dev/mapper/vg1-lv--usr /usr ext4 defaults 0 2
/dev/mapper/vg1-lv--var /var ext4 defaults 0 2
/dev/mapper/vg1-lv--swap none swap sw 0 0
________________________________________________
mtab:
/dev/mapper/vg1-lv--root / ext4 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,stripe=1,data=ordered 0 0
/dev/sda1 /boot ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=4,data =ordered 0 0
/dev/mapper/vg1-lv--home /home ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--tmp /tmp ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--usr /usr ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--var /var ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/sdb1 /cdrom vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,i ocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=1986520k,nr_inodes=496630,mode=75 5 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode= 000 0 0
proc /proc proc rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
________________________________________________
sda1 - 100MB bootable primary as /boot
sda2 - 1.99TB extended as one VG, divided into 6 LVs for /, /home, /tmp, /usr, /var, /swap
No RAID, no encryption.
I can mount all volumes in usb-live (at /media/(UUID)/), and both physical and logical views in LVM look fine, but the new system won't start. After selecting any menuitem in Grub it runs a lot of text on the screen (too rapidly to read), and then stops to an error:
ALERT! /dev/mapper/vg1-lv--root does not exist. Dropping to a shell!
I have no idea what could I do in initramfs shell to heal the ill. However, I can access all the installed files from the usb-live (r+w as root), and--as far I can see--the problem lies in the following:
The menuentry in grub.cfg refers (correctly) to 'root=/dev/mapper/vg1-lv--root', but directory /dev/mapper/ is _empty_, except for a 0 bytes file 'control' (which I cannot open even as root user).
(This would affect of course all corresponding links in fstab and mtab, once the process could go further.)
The UUID references are valid.
Q1*** What files/symlinks should be in /dev/mapper/ for a succesful boot to take place with LVM?
Q2*** Is it possible to refer to the LVs in an other way, eg. with their UUIDs, and bypass the /dev/mapper/ altogether? (As Grub does--twice.)
Q3*** At what stage does LVM actually enter the game, 'insmod lvm' looks rather meager to my eyes? And where does/should it hide? I can't find but lvm.mod in /boot. I found some LVM related stuff and (empty) directories in other locations but they seem rather insignificant, and they are in wrong LVs to help booting anyway. (In usb-live all LVM stuff seems to be outside /boot, so I can't get any hints from there.)
Q4*** Is it possible LVM is not installed properly for my new system, although it was (quite apparently) present in my usb-live before I started installing to a disk. (The process didn't ask about LVM, but used the existing LVs without any error messages!)
If so, how do I install LVM to the new system, when I can't even launch it?
Yet another possible problem may be in the LV naming. I named the LVs as lv-root, lv-home, etc. but LVM seems to have written them in form vg1-lv--root, vg1-lv--home, etc. (vg1 is the only volume group in use.)
The first reference to LVs in grub.cfg is however '(vg1-lv-usr)' while the "consistent" name should be 'vg1-lv--usr'.
Q5*** Is there some discrepancy that may cause problems?
Here are the essential excerpts:
___________________________________________
grub.cfg:
-----------
insmod lvm
insmod part_msdos
insmod ext2
set root='(vg1-lv-usr)'
search --no-floppy --fs-uuid --set=root 32c92c4a-b900-4c47-a3ae-4b2ead7fd9e1
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0bcf088d-01d8-4b91-9637-f4dfb5cb440e
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
-----------
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0bcf088d-01d8-4b91-9637-f4dfb5cb440e
linux /vmlinuz-3.0.0-12-generic root=/dev/mapper/vg1-lv--root ro quiet splash vt.handoff=7
initrd /initrd.img-3.0.0-12-generic
(+ recovery mode and memtest entries as usual)
------------
________________________________________________
fstab:
--------------
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/vg1-lv--root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=0bcf088d-01d8-4b91-9637-f4dfb5cb440e /boot ext4 defaults 0 2
/dev/mapper/vg1-lv--home /home ext4 defaults 0 2
/dev/mapper/vg1-lv--tmp /tmp ext4 defaults 0 2
/dev/mapper/vg1-lv--usr /usr ext4 defaults 0 2
/dev/mapper/vg1-lv--var /var ext4 defaults 0 2
/dev/mapper/vg1-lv--swap none swap sw 0 0
________________________________________________
mtab:
/dev/mapper/vg1-lv--root / ext4 rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,stripe=1,data=ordered 0 0
/dev/sda1 /boot ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=4,data =ordered 0 0
/dev/mapper/vg1-lv--home /home ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--tmp /tmp ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--usr /usr ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/mapper/vg1-lv--var /var ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data =ordered 0 0
/dev/sdb1 /cdrom vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,i ocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=1986520k,nr_inodes=496630,mode=75 5 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode= 000 0 0
proc /proc proc rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
________________________________________________