PDA

View Full Version : [ubuntu] grub2 doesn't list Xen PVOPS entry on the boot table



msriram
October 19th, 2010, 11:57 PM
Hi, I use Ubuntu 10.04. I recently installed xen 4.02 and go the vmlinuz and initrd images ready. I added the following entry in


/etc/grub.d/40_custom



menuentry 'Xen 4.0.2 / Ubuntu 10.4 Kernel 2.6.32.24 pvops' {
insmod raid
insmod mdraid
insmod lvm
insmod ext2
set root='(hd0,6)'
multiboot (hd0,6)/boot/xen-4.0.2-rc1-pre.gz dummy=dummy dom0_mem=2G
module (hd0,6)/boot/vmlinuz-2.6.32.24 dummy=dummy root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930
nopat ro nomodeset console=tty0 earlyprintk=xen
module (hd0,6)/boot/initrd.img-2.6.32.24
}


I ran update-grub and it worked fine. The menu entry got added to the end of 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 $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
if loadfont /usr/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
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32.24' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux /boot/vmlinuz-2.6.32.24 root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro quiet splash
initrd /boot/initrd.img-2.6.32.24
}
menuentry 'Ubuntu, with Linux 2.6.32.24 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
echo 'Loading Linux 2.6.32.24 ...'
linux /boot/vmlinuz-2.6.32.24 root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32.24
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
echo 'Loading Linux 2.6.32-25-generic-pae ...'
linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 74b0443db04407d6
chainloader +1
}
menuentry "Ubuntu 8.10, kernel 2.6.27-17-generic (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-17-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-17-generic (recovery mode) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-17-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-7-generic (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-7-generic
}
menuentry "Ubuntu 8.10, memtest86+ (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/memtest86+.bin
}
### 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.
menuentry 'Xen 4.0.2 / Ubuntu 10.4 Kernel 2.6.32.24 pvops' {
recordfail
insmod ext2
set root='(hd0,6)'
multiboot (hd0,6)/boot/xen-4.0.2-rc1-pre.gz dummy=dummy dom0_mem=2G
module (hd0,6)/boot/vmlinuz-2.6.32.24 dummy=dummy root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930
nopat ro nomodeset console=tty0 earlyprintk=xen
module (hd0,6)/boot/initrd.img-2.6.32.24
}### END /etc/grub.d/40_custom ###


I am not getting the entry in the boot menu though !!!

I think there might be an issue with the grub2 for multiple installations of OS in different partitions (Windows 7, Ubuntu 8.10 etc)

I can give you the output of fdisk -l for more info. Please let me know how I can solve the problem.
Thanks



Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x58555855

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 28721 230590765+ 7 HPFS/NTFS
/dev/sda3 28721 37940 74058139 5 Extended
/dev/sda4 37941 38913 7815622+ 82 Linux swap / Solaris
/dev/sda5 33939 37940 32146033+ 83 Linux
/dev/sda6 28721 33719 40147968 83 Linux
/dev/sda7 33719 33938 1762304 82 Linux swap / Solaris

Partition table entries are not in disk order



Regards

Sriram

drs305
October 20th, 2010, 12:06 AM
The most likely reason is that although you are editing the grub.cfg in your current install Grub is using the grub.cfg from another installation.

If you don't feel like troubleshooting it, you can simply have Grub use your currently running install with this command. Change X to the appropriate drive:

sudo grub-install /dev/sdX
sudo update-grub

msriram
October 20th, 2010, 12:29 AM
Update: I used bootinfoscript (http://bootinfoscript.sourceforge.net/) to check the entries of the disk, and failed to find my Xen 4.02 Entry:




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 #6 for /boot/grub.

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD

sda2: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe /wubildr.mbr
/ubuntu/winboot/wubildr.mbr /wubildr
/ubuntu/winboot/wubildr /ubuntu/disks/root.disk
/ubuntu/disks/swap.disk

sda2/Wubi: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab

sda3: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 8.10
Boot files/dirs: /boot/grub/menu.lst /etc/fstab

sda6: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.1 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda7: __________________________________________________ _______________________

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

sda4: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 2,048 206,847 204,800 7 HPFS/NTFS
/dev/sda2 206,848 461,388,378 461,181,531 7 HPFS/NTFS
/dev/sda3 461,389,822 609,506,099 148,116,278 5 Extended
/dev/sda5 545,214,033 609,506,099 64,292,067 83 Linux
/dev/sda6 461,389,824 541,685,759 80,295,936 83 Linux
/dev/sda7 541,687,808 545,212,415 3,524,608 82 Linux swap / Solaris
/dev/sda4 609,506,100 625,137,344 15,631,245 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 aac008a3-5bba-4cb4-a815-64ca26c0d9bc ext4
/dev/sda1 74B0443DB04407D6 ntfs System Reserved
/dev/sda2 E6104671104648AF ntfs
/dev/sda3: PTTYPE="dos"
/dev/sda4 39865158-83fa-47df-bae8-b8f77d1fa136 swap
/dev/sda5 7801204a-6002-45e4-b5ee-a712ec28a260 ext3
/dev/sda6 c305674b-449d-4ee7-aa2a-f6b7fa428930 ext4
/dev/sda7 f79526ad-10b6-4fd3-9b66-e88b8506d92b swap
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found

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

Device Mount_Point Type Options

/dev/sda6 / ext4 (rw,errors=remount-ro)


======================== sda2/Wubi/boot/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 $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; 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/light-gray
### END /etc/grub.d/05_debian_theme ###

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

### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.32-22-generic" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-22-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry "Ubuntu, Linux 2.6.32-22-generic (recovery mode)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-22-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry "Ubuntu, Linux 2.6.32-21-generic" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-21-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry "Ubuntu, Linux 2.6.32-21-generic (recovery mode)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.32-21-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry "Ubuntu, Linux 2.6.30" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.30 root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.30
}
menuentry "Ubuntu, Linux 2.6.30 (recovery mode)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e6104671104648af
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.30 root=/dev/sda2 loop=/ubuntu/disks/root.disk ro single
initrd /boot/initrd.img-2.6.30
}
### END /etc/grub.d/10_lupin ###

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 74b0443db04407d6
chainloader +1
}
### 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 ###

============================= sda2/Wubi/etc/fstab: =============================

UUID=74B0443DB04407D6 / ntfs-3g defaults 0 0
UUID=E6104671104648AF /host ntfs-3g defaults 0 0

================= sda2/Wubi: Location of files loaded by Grub: =================


2.5GB: boot/grub/grub.cfg
10.3GB: boot/initrd.img-2.6.30
6.6GB: boot/initrd.img-2.6.32-21-generic
10.4GB: boot/initrd.img-2.6.32-22-generic
10.3GB: boot/vmlinuz-2.6.30
6.5GB: boot/vmlinuz-2.6.32-21-generic
10.1GB: boot/vmlinuz-2.6.32-22-generic
10.4GB: initrd.img
6.6GB: initrd.img.old
10.1GB: vmlinuz
6.5GB: vmlinuz.old

=========================== sda5/boot/grub/menu.lst: ===========================

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=7801204a-6002-45e4-b5ee-a712ec28a260

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##
#title Xen 4.0.0, kernel: /boot/vmlinuz-2.6.31.14
#uuid 7801204a-6002-45e4-b5ee-a712ec28a260
#kernel /boot/xen-4.0.0.gz
#module /boot/vmlinuz-2.6.31.14 root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
#module /boot/initrd.img-2.6.31.14
#quiet

title Ubuntu 8.10, kernel 2.6.27-17-generic
uuid 7801204a-6002-45e4-b5ee-a712ec28a260
kernel /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-17-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-17-generic (recovery mode)
uuid 7801204a-6002-45e4-b5ee-a712ec28a260
kernel /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-17-generic

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 7801204a-6002-45e4-b5ee-a712ec28a260
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 7801204a-6002-45e4-b5ee-a712ec28a260
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 7801204a-6002-45e4-b5ee-a712ec28a260
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista/Longhorn (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1


=============================== sda5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
none /proc/xen xenfs defaults 0 0
# /dev/sda5
UUID=7801204a-6002-45e4-b5ee-a712ec28a260 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda4
UUID=39865158-83fa-47df-bae8-b8f77d1fa136 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0

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


306.8GB: boot/grub/menu.lst
304.1GB: boot/grub/stage2
299.6GB: boot/initrd.img-2.6.27-17-generic
304.2GB: boot/initrd.img-2.6.27-7-generic
290.6GB: boot/initrd.img-2.6.31.14
304.1GB: boot/vmlinuz-2.6.27-17-generic
304.1GB: boot/vmlinuz-2.6.27-7-generic
292.9GB: boot/vmlinuz-2.6.31.14
299.6GB: initrd.img
304.2GB: initrd.img.old
304.1GB: vmlinuz
304.1GB: vmlinuz.old

=========================== sda6/boot/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 $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
if loadfont /usr/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
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32.24' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux /boot/vmlinuz-2.6.32.24 root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro quiet splash
initrd /boot/initrd.img-2.6.32.24
}
menuentry 'Ubuntu, with Linux 2.6.32.24 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
echo 'Loading Linux 2.6.32.24 ...'
linux /boot/vmlinuz-2.6.32.24 root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32.24
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
echo 'Loading Linux 2.6.32-25-generic-pae ...'
linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set c305674b-449d-4ee7-aa2a-f6b7fa428930
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 74b0443db04407d6
chainloader +1
}
menuentry "Ubuntu 8.10, kernel 2.6.27-17-generic (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-17-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-17-generic (recovery mode) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-17-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-17-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-7-generic (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
}
menuentry "Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode) (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/vmlinuz-2.6.27-7-generic root=UUID=7801204a-6002-45e4-b5ee-a712ec28a260 ro single
initrd /boot/initrd.img-2.6.27-7-generic
}
menuentry "Ubuntu 8.10, memtest86+ (on /dev/sda5)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 7801204a-6002-45e4-b5ee-a712ec28a260
linux /boot/memtest86+.bin
}
### 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.
menuentry "Xen 4.0.2 / Ubuntu 10.4 Kernel 2.6.32.24 pvops" {
insmod raid
insmod mdraid
insmod lvm
insmod ext2
set root='(hd0,6)'
multiboot (hd0,6)/boot/xen-4.0.2-rc1-pre.gz dummy=dummy dom0_mem=2G
module (hd0,6)/boot/vmlinuz-2.6.32.24 dummy=dummy root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930
nopat ro nomodeset console=tty0 earlyprintk=xen
module (hd0,6)/boot/initrd.img-2.6.32.24
}### END /etc/grub.d/40_custom ###

=============================== sda6/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 nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
UUID=f79526ad-10b6-4fd3-9b66-e88b8506d92b none swap sw 0 0

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


262.1GB: boot/grub/core.img
262.1GB: boot/grub/grub.cfg
262.1GB: boot/initrd.img-2.6.32.24
262.2GB: boot/initrd.img-2.6.32-25-generic-pae
262.1GB: boot/vmlinuz-2.6.32.24
262.1GB: boot/vmlinuz-2.6.32-25-generic-pae
262.2GB: initrd.img
262.1GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda3

00000000 cb e9 8e 98 48 08 a5 ca 8b bc 5c ac 7f f9 d0 43 |....H.....\....C|
00000010 b3 f6 2d 64 3d 83 1b 27 5c 90 47 92 ed 4e 65 4c |..-d=..'\.G..NeL|
00000020 c9 75 88 ed 65 3b 93 b5 ac 64 bb 89 63 14 69 15 |.u..e;...d..c.i.|
00000030 7d 8b ea 6b 33 65 67 31 35 4c ff 4e 01 1a 82 b1 |}..k3eg15L.N....|
00000040 48 95 62 01 42 85 79 7f 15 01 9b b5 88 7c 70 18 |H.b.B.y......|p.|
00000050 26 6f df d8 aa ff f3 91 bc 97 61 f5 4a bf 3f ef |&o........a.J.?.|
00000060 59 c5 3b 9b 32 dc 17 73 7c bc bc e6 98 b2 78 0f |Y.;.2..s|.....x.|
00000070 c5 6a e2 9c 93 cb 49 09 11 8c e6 42 0b 73 6e 6e |.j....I....B.snn|
00000080 31 a3 0f d9 7e 23 78 e8 52 a6 7e c3 ce 87 0d 26 |1...~#x.R.~....&|
00000090 cd 5e 4f f9 45 5d e2 25 cf d2 1f 5b 9f be 09 a1 |.^O.E].%...[....|
000000a0 7c b5 29 6c 78 53 67 2c 31 17 97 b5 75 e1 3f fe ||.)lxSg,1...u.?.|
000000b0 3b 54 a8 7e bf 0b d3 2b 90 5e ee 70 e1 f4 48 6e |;T.~...+.^.p..Hn|
000000c0 64 2c 38 85 52 47 1f 0a 71 b1 37 35 68 bd 16 03 |d,8.RG..q.75h...|
000000d0 2a 00 df 52 f9 e1 29 4d df d8 fc 6b 57 90 b7 ce |*..R..)M...kW...|
000000e0 08 4d 84 32 0f bb ee 11 b3 93 07 92 5f e4 bf b7 |.M.2........_...|
000000f0 57 51 23 bf fa ab ea 2c 5b 2d 27 9f 99 25 a8 86 |WQ#....,[-'..%..|
00000100 be 55 b6 f6 22 03 11 87 13 a3 b8 9f 2d 3d 3f 3f |.U..".......-=??|
00000110 2b d5 00 52 69 c6 12 d8 59 4f af 48 1c 28 4e cd |+..Ri...YO.H.(N.|
00000120 8a a6 94 8a 05 49 de 9d e4 22 b2 13 f6 27 b5 03 |.....I..."...'..|
00000130 93 b6 d2 85 38 82 93 1b 41 48 d3 4c 81 34 21 45 |....8...AH.L.4!E|
00000140 a4 06 53 c6 d0 60 8f 1c 16 46 6a c9 cc 89 de 32 |..S..`...Fj....2|
00000150 78 3a 19 10 27 cc 77 a9 27 a5 1b 55 dd df 13 ac |x:..'.w.'..U....|
00000160 9b 84 6a d4 d2 68 3c bb b3 61 6b a4 33 38 26 20 |..j..h<..ak.38& |
00000170 0a 37 3f b2 43 d9 bb 50 0a fa 73 0d 08 9f f7 0e |.7?.C..P..s.....|
00000180 1a 99 09 4e 22 55 8c c5 c8 a5 7b 1a 83 a9 d9 29 |...N"U....{....)|
00000190 93 fe 5c c0 8e c4 af ab 57 33 cb fe 48 9c ed 23 |..\.....W3..H..#|
000001a0 f2 9b f1 e2 c9 0c ab e6 75 bc 38 75 34 d5 4d 53 |........u.8u4.MS|
000001b0 f0 53 47 b3 7a 41 65 ce e6 cb 4e ea f1 a5 00 fe |.SG.zAe...N.....|
000001c0 ff ff 83 fe ff ff 53 0e ff 04 e3 04 d5 03 00 fe |......S.........|
000001d0 ff ff 05 fe ff ff 01 00 00 00 01 38 c9 04 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
=============================== StdErr Messages: ===============================

mdadm: No arrays found in config file or automatically



Thanks
Sriram

msriram
October 20th, 2010, 12:38 AM
The most likely reason is that although you are editing the grub.cfg in your current install Grub is using the grub.cfg from another installation.

I don't have Grub2 in any other installation. sda5 has Ubuntu 8.10 which uses old Grub (menu.lst), sda1 has Windows and sda has MBR

On a side note, I have a Wubi that has Ubuntu 10.04, which doesnt cause any issue with the Grub on native installation of Ubuntu(s).




If you don't feel like troubleshooting it, you can simply have Grub use your currently running install with this command. Change X to the appropriate drive:

sudo grub-install /dev/sdX
sudo update-grub
I'm confused about this part.. I felt that grub2 is installed on /dev/sda6. But looks like it is not
I tried the command and got a grave warning. I don't intend to force the command and screw up the other partitions.


root@krishh-desktop:/home/krishh# grub-install /dev/sda6
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged..
/usr/sbin/grub-setup: error: if you really want blocklists, use --force.


Is there any constructive solution to the issue?

Thanks
Sriram

drs305
October 20th, 2010, 12:39 AM
The Xen entry is in the 40_custom section.

You should be viewing the Lucid grub.cfg file when you boot according to the boot info script.

However, there appears to be an error in the script, unless it's a cut/paste issue. The ending } must be on its own line.

Make the change, update grub, and see if it now works.



### 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.
menuentry "Xen 4.0.2 / Ubuntu 10.4 Kernel 2.6.32.24 pvops" {
insmod raid
insmod mdraid
insmod lvm
insmod ext2
set root='(hd0,6)'
multiboot (hd0,6)/boot/xen-4.0.2-rc1-pre.gz dummy=dummy dom0_mem=2G
module (hd0,6)/boot/vmlinuz-2.6.32.24 dummy=dummy root=UUID=c305674b-449d-4ee7-aa2a-f6b7fa428930
nopat ro nomodeset console=tty0 earlyprintk=xen
module (hd0,6)/boot/initrd.img-2.6.32.24
}### END /etc/grub.d/40_custom ###



Change the ending to:

}
### END /etc/grub.d/40_custom ###


As far as the grub-install command, you install to a drive and it places the files in the appropriate directory (/boot/grub). So the command would be:
sudo grub-install /dev/sda
not
sudo grub-install /dev/sda6

You would have to "force" it to install into a partition, which is why it gave you an error message.

msriram
October 20th, 2010, 01:35 AM
Thanks!
I did not have a new line at the end of my 40_custom file.
Cheers