Aesir
August 28th, 2008, 11:37 PM
I've been installing different OS on an available drive over the past couple of days and on the last install (this time, Ubuntu 8.04.1) I think I have a syntax and/or mapping error in my menu.lst and I can't boot to XP anymore. From within linux I can see the data on the XP drive so I'm hoping that it's not toasted and that I just have to edit something in menu.lst to sort things out like they were.
BIOS has four drives in order of priority as:
80gb primary master (Ubuntu 8.04.1 i386)
80gb slave (unused)
250 primary on SATA 3 (XP Pro operating system, program and data partitions)
250 primary on SATA 5 (unused)
BIOS has boot priority set to CD drive, then the 80gb master, then floppy.
On power on, GRUB menu selection for XP results in a reboot of the system back into the grub menu. Editing the relevant line to experimentally change the HD2,0 value to any other values (hd0,0 to hd2,1 were tested) results in no such partition error except for hd2,0 which gives the aforementioned reboot then back to the menu cycle.
Here are the files I think are relevant to the issue, starting with fdisk -l output:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x97899789
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1533 12313791 7 HPFS/NTFS
/dev/sda2 1534 30400 231874177+ f W95 Ext'd (LBA)
/dev/sda5 1534 14281 102398278+ 7 HPFS/NTFS
/dev/sda6 14282 20655 51199123+ 7 HPFS/NTFS
/dev/sda7 20656 21166 4104576 7 HPFS/NTFS
/dev/sda8 21167 21548 3068383+ 7 HPFS/NTFS
/dev/sda9 21549 29579 64508976 7 HPFS/NTFS
/dev/sda10 29580 30400 6594651 7 HPFS/NTFS
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9745e817
Device Boot Start End Blocks Id System
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x65c4263a
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9327 74919096 83 Linux
/dev/sdc2 9328 9729 3229065 5 Extended
/dev/sdc5 9328 9729 3229033+ 82 Linux swap / Solaris
Disk /dev/sdd: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4fbc4fbb
menu.lst, which I've tried editing by hand with little success, though with each edit something did change (indicating I was editing the correct file).
# 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=f16d4727-d66f-4a01-968d-7106a8fe257d ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,0)
## 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 Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f16d4727-d66f-4a01-968d-7106a8fe257d ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f16d4727-d66f-4a01-968d-7106a8fe257d ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,0)
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 Microsoft Windows XP Professional
root (hd2,0)
savedefault
makeactive
chainloader +1
Finally, XP's boot.ini. I have not edited this since installing an AMD CPU a few years ago:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=OPTIN /fastdetect /usepmtimer
As best I can tell, I've not managed to blow up the XP MBR or partition, but I really can't confirm without booting into the OS. So I tried to disable all drives in BIOS except for the XP drive. Grub puked a little bit on that with grub error 22 (iirc). It never tried to boot XP that time, it just gave out the error and I had to reboot, and undo the changes in the BIOS to get a proper boot menu for linux again.
TIA for any help/guidance.
P.S. The end-goal is that I have a fully operational XP drive for my day to day stuff, along with 1 to 3 different other operating systems to experiment with. (short list so far is OpenSolaris if I can sort out a sound driver issue, one flavor of Ubuntu, and one nasty test drive for things that are beyond my skill in setting up ... like Gentoo). But for now, I'd like to get back to one Ubuntu and one XP drive like I've had for the past few months.
P.P.S. I should add that the non-hand edited menu.list originally had ubuntu, ubuntu recovery, and memtest pointed at hd2,0 - and XP on hd0,0. The problem there was that not one of the operating systems or memtest would load. When I changed those three ubuntu related entries to hd0,0, they worked, but XP still won't try to boot.
BIOS has four drives in order of priority as:
80gb primary master (Ubuntu 8.04.1 i386)
80gb slave (unused)
250 primary on SATA 3 (XP Pro operating system, program and data partitions)
250 primary on SATA 5 (unused)
BIOS has boot priority set to CD drive, then the 80gb master, then floppy.
On power on, GRUB menu selection for XP results in a reboot of the system back into the grub menu. Editing the relevant line to experimentally change the HD2,0 value to any other values (hd0,0 to hd2,1 were tested) results in no such partition error except for hd2,0 which gives the aforementioned reboot then back to the menu cycle.
Here are the files I think are relevant to the issue, starting with fdisk -l output:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x97899789
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1533 12313791 7 HPFS/NTFS
/dev/sda2 1534 30400 231874177+ f W95 Ext'd (LBA)
/dev/sda5 1534 14281 102398278+ 7 HPFS/NTFS
/dev/sda6 14282 20655 51199123+ 7 HPFS/NTFS
/dev/sda7 20656 21166 4104576 7 HPFS/NTFS
/dev/sda8 21167 21548 3068383+ 7 HPFS/NTFS
/dev/sda9 21549 29579 64508976 7 HPFS/NTFS
/dev/sda10 29580 30400 6594651 7 HPFS/NTFS
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9745e817
Device Boot Start End Blocks Id System
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x65c4263a
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9327 74919096 83 Linux
/dev/sdc2 9328 9729 3229065 5 Extended
/dev/sdc5 9328 9729 3229033+ 82 Linux swap / Solaris
Disk /dev/sdd: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4fbc4fbb
menu.lst, which I've tried editing by hand with little success, though with each edit something did change (indicating I was editing the correct file).
# 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=f16d4727-d66f-4a01-968d-7106a8fe257d ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,0)
## 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 Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f16d4727-d66f-4a01-968d-7106a8fe257d ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f16d4727-d66f-4a01-968d-7106a8fe257d ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,0)
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 Microsoft Windows XP Professional
root (hd2,0)
savedefault
makeactive
chainloader +1
Finally, XP's boot.ini. I have not edited this since installing an AMD CPU a few years ago:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=OPTIN /fastdetect /usepmtimer
As best I can tell, I've not managed to blow up the XP MBR or partition, but I really can't confirm without booting into the OS. So I tried to disable all drives in BIOS except for the XP drive. Grub puked a little bit on that with grub error 22 (iirc). It never tried to boot XP that time, it just gave out the error and I had to reboot, and undo the changes in the BIOS to get a proper boot menu for linux again.
TIA for any help/guidance.
P.S. The end-goal is that I have a fully operational XP drive for my day to day stuff, along with 1 to 3 different other operating systems to experiment with. (short list so far is OpenSolaris if I can sort out a sound driver issue, one flavor of Ubuntu, and one nasty test drive for things that are beyond my skill in setting up ... like Gentoo). But for now, I'd like to get back to one Ubuntu and one XP drive like I've had for the past few months.
P.P.S. I should add that the non-hand edited menu.list originally had ubuntu, ubuntu recovery, and memtest pointed at hd2,0 - and XP on hd0,0. The problem there was that not one of the operating systems or memtest would load. When I changed those three ubuntu related entries to hd0,0, they worked, but XP still won't try to boot.