PDA

View Full Version : [SOLVED] 9.10 karmic koala - lvm and grub2 boot problems



incubus0h
February 22nd, 2010, 12:25 AM
Hi all:

I am having problem in grub2 fails to boot the system. I get the error:

Booting from local disk...
GRUB loading.
error: no such disk

System setup:

It's a Dell XPS400 PC with 160 GB HDD. I have a non-LVM, primary partition for the boot file system (/boot) of 200 MB. I also have seven
logical volumes (LVM partitions): six for each of the /(root), swap, /home, /usr, /var and /tmp, and one vbox_win_xp_base as a raw disk
for running Win XP in the Virtualbox.

I went on to configure all these without rebooting the system in between. Later I also updated to the kernel version 2.6.31._20. Next day
I decided to reboot my system. But then the bootloader (GRUB2 in my case) won't able to boot it and gives the error mentioned above.

It looks like the GRUB2 is not able to access the /boot partition. I have attached the
results of the test script (http://bootinfoscript.sourceforge.net/).

Any suggestions are welcome,

Thanks,
Incubus0h

RESULTS.txt:

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for /grub.

sda1: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs: /grub/grub.cfg

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: LVM2_member
Boot sector type: -
Boot sector info:

server-swap: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

server-root: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 9.10
Boot files/dirs: /etc/fstab

server-usr: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

server-var: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

server-tmp: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

server-home: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:

server-vbox_win_xp_base: __________________________________________________ _______________________

File system: ext4
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xd0f4738c

Partition Boot Start End Size Id System

/dev/sda1 * 63 385,559 385,497 83 Linux
/dev/sda2 385,560 312,496,379 312,110,820 5 Extended
/dev/sda5 385,623 312,496,379 312,110,757 8e Linux LVM


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/mapper/server-home 31159337-d6b2-447f-ac60-5034a9ca2b22 ext4
/dev/mapper/server-root b05bd437-5cd2-4474-96b5-6eadf0195207 ext4
/dev/mapper/server-swap d5e75cd0-22a3-4715-a31f-937d321434dd swap
/dev/mapper/server-tmp 2ef19d0f-5f24-4990-9bfd-90e5dbee3524 ext4
/dev/mapper/server-usr c8eee5b6-13f0-400c-b807-cb4085ac30bc ext4
/dev/mapper/server-var 42fc5787-1bba-47cd-a9b4-ae025356837c ext4
/dev/mapper/server-vbox_win_xp_base b3a2583b-78bd-420b-87ad-0d3fcdbd4e0f ext4
/dev/sda1 fd76e890-34ac-4939-acbe-8eb46f2b2993 ext4
/dev/sda5 PSsB5e-haKP-dyTs-RXBG-8CiV-BL8X-Y3O7Lh LVM2_member

=============================== "ls -R /dev/mapper/" output: ===============================
/dev/mapper:
control
server-home
server-root
server-swap
server-tmp
server-usr
server-var
server-vbox_win_xp_base

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/mapper/server-root / ext4 (rw,errors=remount-ro)
/dev/sda1 /boot ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)
/dev/mapper/server-var /var ext4 (rw)
/dev/mapper/server-tmp /tmp ext4 (rw)
/dev/mapper/server-home /home ext4 (rw)
/dev/mapper/server-vbox_win_xp_base /vbox_win_xp_base ext4 (rw)
/dev/mapper/server-home /home ext4 (rw)
/dev/sda1 /boot ext4 (rw)
/dev/sda1 /boot ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)
/dev/sda1 /boot ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)
/dev/sda1 /boot ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)
/dev/sda1 /boot ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)
/dev/mapper/server-usr /usr ext4 (rw)


============================= sda1/grub/grub.cfg: =============================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=================== sda1: Location of files loaded by Grub: ===================


.5GB: grub/grub.cfg

============================ server-root/etc/fstab: ============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/server-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=fd76e890-34ac-4939-acbe-8eb46f2b2993 /boot ext4 defaults 0 2
/dev/mapper/server-home /home ext4 defaults 0 2
/dev/mapper/server-tmp /tmp ext4 defaults 0 2
/dev/mapper/server-usr /usr ext4 defaults 0 2
/dev/mapper/server-var /var ext4 defaults 0 2
/dev/mapper/server-swap none swap sw 0 0
/dev/mapper/server-vbox_win_xp_base /vbox_win_xp_base ext4 defaults 0 2
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on server-vbox_win_xp_base

00000000 33 c0 8e d0 bc 00 7c fb 50 07 50 1f fc be 1b 7c |3.....|.P.P....||
00000010 bf 1b 06 50 57 b9 e5 01 f3 a4 cb bd be 07 b1 04 |...PW...........|
00000020 38 6e 00 7c 09 75 13 83 c5 10 e2 f4 cd 18 8b f5 |8n.|.u..........|
00000030 83 c6 10 49 74 19 38 2c 74 f6 a0 b5 07 b4 07 8b |...It.8,t.......|
00000040 f0 ac 3c 00 74 fc bb 07 00 b4 0e cd 10 eb f2 88 |..<.t...........|
00000050 4e 10 e8 46 00 73 2a fe 46 10 80 7e 04 0b 74 0b |N..F.s*.F..~..t.|
00000060 80 7e 04 0c 74 05 a0 b6 07 75 d2 80 46 02 06 83 |.~..t....u..F...|
00000070 46 08 06 83 56 0a 00 e8 21 00 73 05 a0 b6 07 eb |F...V...!.s.....|
00000080 bc 81 3e fe 7d 55 aa 74 0b 80 7e 10 00 74 c8 a0 |..>.}U.t..~..t..|
00000090 b7 07 eb a9 8b fc 1e 57 8b f5 cb bf 05 00 8a 56 |.......W.......V|
000000a0 00 b4 08 cd 13 72 23 8a c1 24 3f 98 8a de 8a fc |.....r#..$?.....|
000000b0 43 f7 e3 8b d1 86 d6 b1 06 d2 ee 42 f7 e2 39 56 |C..........B..9V|
000000c0 0a 77 23 72 05 39 46 08 73 1c b8 01 02 bb 00 7c |.w#r.9F.s......||
000000d0 8b 4e 02 8b 56 00 cd 13 73 51 4f 74 4e 32 e4 8a |.N..V...sQOtN2..|
000000e0 56 00 cd 13 eb e4 8a 56 00 60 bb aa 55 b4 41 cd |V......V.`..U.A.|
000000f0 13 72 36 81 fb 55 aa 75 30 f6 c1 01 74 2b 61 60 |.r6..U.u0...t+a`|
00000100 6a 00 6a 00 ff 76 0a ff 76 08 6a 00 68 00 7c 6a |j.j..v..v.j.h.|j|
00000110 01 6a 10 b4 42 8b f4 cd 13 61 61 73 0e 4f 74 0b |.j..B....aas.Ot.|
00000120 32 e4 8a 56 00 cd 13 eb d6 61 f9 c3 49 6e 76 61 |2..V.....a..Inva|
00000130 6c 69 64 20 70 61 72 74 69 74 69 6f 6e 20 74 61 |lid partition ta|
00000140 62 6c 65 00 45 72 72 6f 72 20 6c 6f 61 64 69 6e |ble.Error loadin|
00000150 67 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 |g operating syst|
00000160 65 6d 00 4d 69 73 73 69 6e 67 20 6f 70 65 72 61 |em.Missing opera|
00000170 74 69 6e 67 20 73 79 73 74 65 6d 00 00 00 00 00 |ting system.....|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001b0 00 00 00 00 00 2c 44 63 e5 38 e6 38 00 00 80 01 |.....,Dc.8.8....|
000001c0 01 00 07 fe ff ff 3f 00 00 00 7a 8f b5 01 00 00 |......?...z.....|
000001d0 c1 ff 0f fe ff ff b9 8f b5 01 38 fd c9 00 00 00 |..........8.....|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200


=======Devices which don't seem to have a corresponding hard drive==============

sdb sdc sdd sde

oldfred
February 22nd, 2010, 01:37 AM
Your grub.cfg shows no systems. I do not know if that is related to the LVM?

Some solutions to that type of problem.
http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

incubus0h
February 22nd, 2010, 01:32 PM
Thanks for the reply.

Some clarifications: I generated the RESULTS.txt file using the boot_info_script055.sh
when I was in the 'Rescue Mode' using the 9.10 Alternate Installation CD. The important
thing to note here is that not all the partitions were mounted.

my /etc/fstab file:

============================ server-root/etc/fstab: ============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/server-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=fd76e890-34ac-4939-acbe-8eb46f2b2993 /boot ext4 defaults 0 2
/dev/mapper/server-home /home ext4 defaults 0 2
/dev/mapper/server-tmp /tmp ext4 defaults 0 2
/dev/mapper/server-usr /usr ext4 defaults 0 2
/dev/mapper/server-var /var ext4 defaults 0 2
/dev/mapper/server-swap none swap sw 0 0
/dev/mapper/server-vbox_win_xp_base /vbox_win_xp_base ext4 defaults 0 2
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0

This time I mounted all the partitions manually including the LVM partitions, except
/vbox_win_xp_base, as mount complained about some mounting error. I hope this is
not a serious problem.

Anyway, after manually mounting all the partitions, I generated the /boot/grub/grub.cfg
file again by doing 'sudo update-grub2'. This time it shows all the entries of the kernel
systems. Moreover the grub.cfg file knows of LVM (insmod lvm).

Can you guys look at the grub.cfg file and see if all the generated info is correct or
not ?

(Note: The new RESULTS.txt file is attached for complete reference)

============================ sda1/grub/grub.cfg: =============================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod lvm
insmod ext2
set root=(server-usr)
search --no-floppy --fs-uuid --set c8eee5b6-13f0-400c-b807-cb4085ac30bc
if loadfont /share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-20-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-20-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-19-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-19-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-14-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993
linux /vmlinuz-2.6.31-14-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

******* end of the grub.cfg file *************

incubus0h
February 22nd, 2010, 02:48 PM
I think I have got handle on the problem. I followed oldfred's suggestion
(http://sourceforge.net/apps/mediawik...roblems:search (http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search)) to fix the grub.cfg file.

In my first attempt, I tried to get rid of '--no-floppy' option, but I still got the same boot
error (refer to my 1st post). Then I got rid of the line
'search --no-floppy --fs-uuid --set fd76e890-34ac-4939-acbe-8eb46f2b2993' altogether
and I was able to boot my box using the GRUB2.

But now I don't see multiple options for the kernel systems at the time of the boot.
It's booting with the first entry: 2.6.31-20-generic, as confirmed with 'uname -a' cmd:

$ uname -a
Linux pioneer 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:05:19 UTC 2010 i686 GNU/Linux

Anything I am missing ?

Thanks,
Incubus


For reference, I have attached the kernel entries from the grub.cfg file:

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-20-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-20-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-19-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-19-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-14-generic root=/dev/mapper/server-root ro quiet splash
initrd /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
linux /vmlinuz-2.6.31-14-generic root=/dev/mapper/server-root ro single
initrd /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###