G-forze
May 5th, 2010, 07:57 PM
Just got my last problem solved, right on to the next one! This one should be far easier for someone with the skills to point out where I fail.
I recently installed Ubuntu 10.04 on my new hardware, before which I also installed Windows 7. Doing it that way, I was hoping Win7 would appear automatically in GRUB as it usually does, but not this time. In my GRUB is my new Ubuntu install and an old one (9.10) that I never got around to using before my old hardware gave in.
GRUB2 file looks like this:
#
# 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 raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
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 raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
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-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro acpi=off noapic nolapic quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro single acpi=off noapic nolapic
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro acpi=off noapic nolapic quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
echo 'Loading Linux 2.6.31-20-generic ...'
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro single acpi=off noapic nolapic
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-20-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, Linux 2.6.31-19-generic (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode) (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro single
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode) (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### 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 ###I looked for some help online but just can't seem to get it right. I was hoping someone could point me in the right direction. I made a GRUB menuitem file named 11_Windows in /etc/grub.d/ like so:
#! /bin/sh -e
echo “Adding Windows” >&2
cat << EOF
menuentry “Windows 7″ {
set root=(hd3,1)
chainloader +1
}
EOF
When I run "sudo update-grub" i get
@Stronghold:/etc/grub.d$ sudo update-grub
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Generating grub.cfg ...
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
“Adding Windows”
Found memtest86+ image: /boot/memtest86+.bin
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found Ubuntu 9.10 (9.10) on /dev/sdd2
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
done
.. and the resulting GRUB file is what you see in the beginning of the post.
Windows 7 is installed on /dev/sdd1 while Lucid is installed on /dev/md1. The old Ubuntu (Karmic, not working) is installed on /dev/sdd2. The Win7 partition previously had a Win XP installation and Win 7 was working fine until I installed Ubuntu.
That's a long post... So, where do I go wrong? :)
Motherboard: Asus P7H55 Intel H55 LGA1156 ATX
Processor: Core i3 530
RAM: 4 Gb (2x 2Gb) DDR3 1066
Gfx: Asus ENGTS250 DK/DI/1GD3 nVidia GeForce GTS250 1GB
HDs: 2x Western Digital Caviar Green SATA II 1.5 Tb
I recently installed Ubuntu 10.04 on my new hardware, before which I also installed Windows 7. Doing it that way, I was hoping Win7 would appear automatically in GRUB as it usually does, but not this time. In my GRUB is my new Ubuntu install and an old one (9.10) that I never got around to using before my old hardware gave in.
GRUB2 file looks like this:
#
# 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 raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
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 raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
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-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro acpi=off noapic nolapic quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro single acpi=off noapic nolapic
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro acpi=off noapic nolapic quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
echo 'Loading Linux 2.6.31-20-generic ...'
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=02320179-41b4-4315-b547-68061b49f3d0 ro single acpi=off noapic nolapic
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-20-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 02320179-41b4-4315-b547-68061b49f3d0
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, Linux 2.6.31-19-generic (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode) (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro single
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode) (on /dev/sdd2)" {
insmod ext2
set root='(hd3,2)'
search --no-floppy --fs-uuid --set f574912e-fe34-45b9-9ecd-77822a2850d7
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=f574912e-fe34-45b9-9ecd-77822a2850d7 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### 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 ###I looked for some help online but just can't seem to get it right. I was hoping someone could point me in the right direction. I made a GRUB menuitem file named 11_Windows in /etc/grub.d/ like so:
#! /bin/sh -e
echo “Adding Windows” >&2
cat << EOF
menuentry “Windows 7″ {
set root=(hd3,1)
chainloader +1
}
EOF
When I run "sudo update-grub" i get
@Stronghold:/etc/grub.d$ sudo update-grub
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Generating grub.cfg ...
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
“Adding Windows”
Found memtest86+ image: /boot/memtest86+.bin
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
Found Ubuntu 9.10 (9.10) on /dev/sdd2
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
error: cannot seek `/dev/sdd'.
done
.. and the resulting GRUB file is what you see in the beginning of the post.
Windows 7 is installed on /dev/sdd1 while Lucid is installed on /dev/md1. The old Ubuntu (Karmic, not working) is installed on /dev/sdd2. The Win7 partition previously had a Win XP installation and Win 7 was working fine until I installed Ubuntu.
That's a long post... So, where do I go wrong? :)
Motherboard: Asus P7H55 Intel H55 LGA1156 ATX
Processor: Core i3 530
RAM: 4 Gb (2x 2Gb) DDR3 1066
Gfx: Asus ENGTS250 DK/DI/1GD3 nVidia GeForce GTS250 1GB
HDs: 2x Western Digital Caviar Green SATA II 1.5 Tb