MXIIA
May 1st, 2011, 07:49 PM
I recently upgraded from 10.10 to 11.04
I am using the liveCD of 11.04 to run update-grub in a chroot on my main hd (sda6) with the boot partition (sda7) mounted as boot.
It says it works, however, on boot, it goes to grub>.
This is clearly because the menu file isn't properly made...
update-grub in the chroot yields
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
done
root@ubuntu:/#
GRUB CONFIG FILE
Location(s): sda6/boot/grub/grub.cfg OR sda7/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b675bb4b-bb32-4c16-9251-6f9c66746c71
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
set locale_dir=($root)/grub/locale
set lang=en_US
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux /vmlinuz-2.6.38-8-generic root=UUID=b675bb4b-bb32-4c16-9251-6f9c66746c71 ro quiet splash vt.handoff=7
initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
echo 'Loading Linux 2.6.38-8-generic ...'
linux /vmlinuz-2.6.38-8-generic root=UUID=b675bb4b-bb32-4c16-9251-6f9c66746c71 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 86126BF0126BE421
drivemap -s (hd0) ${root}
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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
boot_info_script RESULTS.txt
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #7 for /grub/stage2 and /grub/menu.lst.
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:
Boot sector type: Grub
Boot sector info: Grub 0.97 is installed in the boot sector of sda2 and
looks at sector 603317824 of the same hard drive for
the stage2 file. A stage2 file is at this location on
/dev/sda. Stage2 looks on partition #7 for
/grub/menu.lst.
Mounting failed:
mount: unknown filesystem type ''
sda3: __________________________________________________ _______________________
File system: swap
Boot sector type: -
Boot sector info:
sda4: __________________________________________________ _______________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
sda6: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.04
Boot files/dirs: /etc/fstab
sda7: __________________________________________________ _______________________
File system: ext4
Boot sector type: Grub
Boot sector info: Grub 0.97 is installed in the boot sector of sda7 and
looks at sector 603317824 of the same hard drive for
the stage2 file. A stage2 file is at this location on
/dev/sda. Stage2 looks on partition #7 for
/grub/menu.lst.
Operating System:
Boot files/dirs:
=========================== 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 607,208,805 625,137,344 17,928,540 7 HPFS/NTFS
/dev/sda2 * 63 196,683,794 196,683,732 7 HPFS/NTFS
/dev/sda3 196,683,795 197,093,394 409,600 82 Linux swap / Solaris
/dev/sda4 197,101,546 607,207,423 410,105,878 5 Extended
/dev/sda5 197,101,548 563,910,141 366,808,594 8e Linux LVM
/dev/sda6 563,910,656 602,973,155 39,062,500 83 Linux
/dev/sda7 602,974,208 607,207,423 4,233,216 83 Linux
blkid -c /dev/null: __________________________________________________ __________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 86126BF0126BE421 ntfs Recovery
/dev/sda3 f27bbfea-8ab8-4f52-9c7c-47bf256e2395 swap
/dev/sda4: PTTYPE="dos"
/dev/sda5 771aa6f8-faee-44c6-b3ae-46a07886cfeb ext4
/dev/sda6 b675bb4b-bb32-4c16-9251-6f9c66746c71 ext4
/dev/sda7 e254056a-d7e3-4c93-ad6b-fb530a67b228 ext4
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found
error: /dev/sdc: No medium found
error: /dev/sdd: No medium found
error: /dev/sde: No medium found
============================ "mount | grep ^/dev output: ===========================
Device Mount_Point Type Options
aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda6 /mnt ext4 (rw)
/dev/sda7 /mnt/boot ext4 (rw)
=============================== 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=b675bb4b-bb32-4c16-9251-6f9c66746c71 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda7 during installation
UUID=e254056a-d7e3-4c93-ad6b-fb530a67b228 /boot ext4 defaults 0 2
# /home was on /dev/sda5 during installation
UUID=771aa6f8-faee-44c6-b3ae-46a07886cfeb /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=f27bbfea-8ab8-4f52-9c7c-47bf256e2395 none swap sw 0 0
=================== sda6: Location of files loaded by Grub: ===================
288.8GB: initrd.img
288.8GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============
sdb sdc sdd sde
I am using the liveCD of 11.04 to run update-grub in a chroot on my main hd (sda6) with the boot partition (sda7) mounted as boot.
It says it works, however, on boot, it goes to grub>.
This is clearly because the menu file isn't properly made...
update-grub in the chroot yields
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
done
root@ubuntu:/#
GRUB CONFIG FILE
Location(s): sda6/boot/grub/grub.cfg OR sda7/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b675bb4b-bb32-4c16-9251-6f9c66746c71
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
set locale_dir=($root)/grub/locale
set lang=en_US
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux /vmlinuz-2.6.38-8-generic root=UUID=b675bb4b-bb32-4c16-9251-6f9c66746c71 ro quiet splash vt.handoff=7
initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
echo 'Loading Linux 2.6.38-8-generic ...'
linux /vmlinuz-2.6.38-8-generic root=UUID=b675bb4b-bb32-4c16-9251-6f9c66746c71 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set=root e254056a-d7e3-4c93-ad6b-fb530a67b228
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Recovery Environment (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 86126BF0126BE421
drivemap -s (hd0) ${root}
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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
boot_info_script RESULTS.txt
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #7 for /grub/stage2 and /grub/menu.lst.
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:
Boot sector type: Grub
Boot sector info: Grub 0.97 is installed in the boot sector of sda2 and
looks at sector 603317824 of the same hard drive for
the stage2 file. A stage2 file is at this location on
/dev/sda. Stage2 looks on partition #7 for
/grub/menu.lst.
Mounting failed:
mount: unknown filesystem type ''
sda3: __________________________________________________ _______________________
File system: swap
Boot sector type: -
Boot sector info:
sda4: __________________________________________________ _______________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files/dirs:
sda6: __________________________________________________ _______________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.04
Boot files/dirs: /etc/fstab
sda7: __________________________________________________ _______________________
File system: ext4
Boot sector type: Grub
Boot sector info: Grub 0.97 is installed in the boot sector of sda7 and
looks at sector 603317824 of the same hard drive for
the stage2 file. A stage2 file is at this location on
/dev/sda. Stage2 looks on partition #7 for
/grub/menu.lst.
Operating System:
Boot files/dirs:
=========================== 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 607,208,805 625,137,344 17,928,540 7 HPFS/NTFS
/dev/sda2 * 63 196,683,794 196,683,732 7 HPFS/NTFS
/dev/sda3 196,683,795 197,093,394 409,600 82 Linux swap / Solaris
/dev/sda4 197,101,546 607,207,423 410,105,878 5 Extended
/dev/sda5 197,101,548 563,910,141 366,808,594 8e Linux LVM
/dev/sda6 563,910,656 602,973,155 39,062,500 83 Linux
/dev/sda7 602,974,208 607,207,423 4,233,216 83 Linux
blkid -c /dev/null: __________________________________________________ __________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 86126BF0126BE421 ntfs Recovery
/dev/sda3 f27bbfea-8ab8-4f52-9c7c-47bf256e2395 swap
/dev/sda4: PTTYPE="dos"
/dev/sda5 771aa6f8-faee-44c6-b3ae-46a07886cfeb ext4
/dev/sda6 b675bb4b-bb32-4c16-9251-6f9c66746c71 ext4
/dev/sda7 e254056a-d7e3-4c93-ad6b-fb530a67b228 ext4
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found
error: /dev/sdc: No medium found
error: /dev/sdd: No medium found
error: /dev/sde: No medium found
============================ "mount | grep ^/dev output: ===========================
Device Mount_Point Type Options
aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda6 /mnt ext4 (rw)
/dev/sda7 /mnt/boot ext4 (rw)
=============================== 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=b675bb4b-bb32-4c16-9251-6f9c66746c71 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda7 during installation
UUID=e254056a-d7e3-4c93-ad6b-fb530a67b228 /boot ext4 defaults 0 2
# /home was on /dev/sda5 during installation
UUID=771aa6f8-faee-44c6-b3ae-46a07886cfeb /home ext4 defaults 0 2
# swap was on /dev/sda3 during installation
UUID=f27bbfea-8ab8-4f52-9c7c-47bf256e2395 none swap sw 0 0
=================== sda6: Location of files loaded by Grub: ===================
288.8GB: initrd.img
288.8GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============
sdb sdc sdd sde