LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't boot XP with Grub (https://www.linuxquestions.org/questions/linux-newbie-8/cant-boot-xp-with-grub-701502/)

anon078 02-01-2009 06:04 PM

Can't boot XP with Grub
 
hey everyone,
i have installed fedora and xp on my computer
i have 2 partitions on my harddrive, 1st partition XP 2nd partition fedora10

this is my grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=1
timeout=15
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.9-159.fc10.i686)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.9-159.fc10.i686 ro root=UUID=592ccd22-e277-4fb2-be22-59930f820f34 rhgb quiet
initrd /boot/initrd-2.6.27.9-159.fc10.i686.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=592ccd22-e277-4fb2-be22-59930f820f34 rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title Other
rootnoverify (hd0,0)
chainloader +1


this is my fdisk

[root@localhost Andrew]# fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x18387c7d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 16519 132688836 7 HPFS/NTFS
/dev/sda2 16520 23046 52428127+ 83 Linux
/dev/sda3 23047 24321 10241437+ f W95 Ext'd (LBA)
/dev/sda5 23047 24321 10241406 b W95 FAT32


i tried booting using other, but xp does not load. ive searched around for about an hour trying various things to edit my grub.conf, but it did not work. any help would be greatly appreciated

sirlancealot 02-01-2009 06:12 PM

Quote:

title Other
rootnoverify (hd0,0)
chainloader +1
I might try these varieties for Other:

Code:

title Other
rootnoverify(hd0,1)
chainloader(hd0,1)+1

Code:

title Other
rootnoverify(hd0,1)
chainloader +1

Code:

title Other
rootnoverify(hd0,0)
chainloader(hd0,0)+1

That's all I can offer, good luck!;)

anon078 02-01-2009 06:32 PM

=/ none of those have worked, thanks for the effort though

syg00 02-01-2009 06:39 PM

Quote:

Originally Posted by shadows72 (Post 3428527)
i tried booting using other, but xp does not load.

Meaning what ?.
Does it start to load then fail, or does it just redisplay the grub menu, or a blank screen, or does it do nothing at all ... ???.

anon078 02-01-2009 07:09 PM

using the grub config from the original post, the screen would go black with a blinking underscore, hang for a bit then reboot

syg00 02-01-2009 08:46 PM

That sounds like the boot sector of your Windows partition may have been walked on (just the bit that handles the boot, not your data).
Try booting your XP CD and go into recovery console when you see the message. Run fixboot and see it it will load (from grub) after that.

This shouldn't have happened BTW - did you happen to re-start (re-do) the F10 install ?.

anon078 02-01-2009 11:48 PM

no i havent tried to redo the f10 install, i think that extra fedora boot option appeared i let it update. however, ill try to xp cd. thank you

anon078 02-02-2009 12:00 AM

i put my XP cd into the comp and let it start. when it got to the install page, there was no option for the recovery console. i think is happening because the XP i have installed is XP home but i ionly have a XP pro disk. i exited and now i cant boot anything. my computer boots into a loop, it shows my viao screen, then the screen turns black, hangs and reboots. any help?=[

syg00 02-02-2009 06:47 AM

Erk - that might be ugly.
You went too far with the CD - it offers "resource centre" prior to the install stage. I don't know where you are at now as regards Windoze.
Try a (Linux) liveCD and see what it can see - might be a good idea to ensure you have a decent backup of your data.

anon078 02-02-2009 09:07 AM

I'v fixed the mbr with super grub disk so i can boot into fedora, however if i use super grub disk and try to boot windows my computer reboots=[ but other than that i DO have the grub bootloader now

CJS 02-02-2009 09:33 AM

Shadows72, if your Windows boot sector is the problem, often you can use "testdisk" to repair it without having to use a Windows CD. And actually, testdisk can repair some specific problems with an NTFS boot sector that even Windows own "fixboot" can't. But before you try that, it would be good to see if your Windows boot sector is actually the problem, so how about downloading the Boot Info Script to your desktop, and then do the following as root user, but replace <username> with your username:
Code:

bash /home/<username>/Desktop/boot_info_script*.sh
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of that file to your next post. That will help clarify your setup and hopefully what it will take to get Windows booting again.

anon078 02-02-2009 11:31 PM

thanks for the help, this is the result.txt

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

=> Grub0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #2 for /boot/grub/stage2 and /boot/grub/menu.lst.

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /bootmgr /Boot/BCD /ntldr /NTDETECT.COM

sda2: _________________________________________________________________________

File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Fedora release 10 (Cambridge)
Kernel on an ()
Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.conf /etc/fstab

sda3: _________________________________________________________________________

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

sda5: _________________________________________________________________________

File system: vfat
Boot sector type: Windows XP: Fat32
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files/dirs:

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

Drive sda: _____________________________________________________________________

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x18387c7d

Partition Boot Start End Size Id System

/dev/sda1 * 63 265,377,734 265,377,672 7 HPFS/NTFS
/dev/sda2 265,377,735 370,233,989 104,856,255 83 Linux
/dev/sda3 370,233,990 390,716,864 20,482,875 f W95 Ext d (LBA)
/dev/sda5 370,234,053 390,716,864 20,482,812 b W95 FAT32


blkid -c /dev/null: ____________________________________________________________

/dev/sda1: UUID="68647A6F647A403C" TYPE="ntfs"
/dev/sda2: LABEL="/" UUID="592ccd22-e277-4fb2-be22-59930f820f34" TYPE="ext3"
/dev/sda5: LABEL="NDS" UUID="4869-0F1F" TYPE="vfat"

=============================== "mount" output: ===============================

/dev/sda2 on / type ext3 (rw)
/proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/Andrew/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=Andrew)

================================ sda1/boot.ini: ================================

;

;Warning: Boot.ini is used on Windows XP and earlier operating systems.

;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.

;

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /FASTDETECT


========================== sda2/boot/grub/grub.conf: ==========================

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/sda2
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.12-170.2.5.fc10.i686)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.12-170.2.5.fc10.i686 ro root=UUID=592ccd22-e277-4fb2-be22-59930f820f34 rhgb quiet
initrd /boot/initrd-2.6.27.12-170.2.5.fc10.i686.img
title Fedora (2.6.27.9-159.fc10.i686)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.9-159.fc10.i686 ro root=UUID=592ccd22-e277-4fb2-be22-59930f820f34 rhgb quiet
initrd /boot/initrd-2.6.27.9-159.fc10.i686.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=592ccd22-e277-4fb2-be22-59930f820f34 rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title Other
rootnoverify (hd0,1)
chainloader +1


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


#
# /etc/fstab
# Created by anaconda on Sun Jan 25 14:47:39 2009
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more info
#
UUID=592ccd22-e277-4fb2-be22-59930f820f34 / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

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


136.1GB: boot/grub/grub.conf
136.1GB: boot/grub/menu.lst
136.1GB: boot/grub/stage2
136.2GB: boot/initrd-2.6.27.12-170.2.5.fc10.i686.img
136.2GB: boot/initrd-2.6.27.5-117.fc10.i686.img
136.2GB: boot/initrd-2.6.27.9-159.fc10.i686.img
136.1GB: boot/vmlinuz-2.6.27.12-170.2.5.fc10.i686
136.2GB: boot/vmlinuz-2.6.27.5-117.fc10.i686
136.1GB: boot/vmlinuz-2.6.27.9-159.fc10.i686

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

sdb .
sdc .
sdd .
sde .

CJS 02-03-2009 01:09 AM

It looks like you had Vista installed at some point, because Vista's boot files are in your XP sda1 partition, and also your sda1 partition has a Vista boot sector rather than an XP boot sector. So to try and fix the boot sector with testdisk, how about downloading the testdisk-6.10.linux26.tar.bz2 package to your desktop, and then run it as root user:
Code:

tar xvf testdisk-6.10.linux26.tar.bz2
testdisk-6.10/linux/testdisk_static

After starting testdisk, choose "No log", choose the correct HDD and "Proceed", choose "Intel", choose "Advanced", select the Windows partition, choose "Boot", then choose "Backup BS"; if testdisk gives you a warning that the "Extrapolated boot sector and current boot sector are different", then choose "Write". After you are done doing the "Backup BS" in testdisk, reboot and let me know exactly what happens when you boot Windows XP from the Grub menu. Or if testdisk doesn't give you the option to choose "Backup BS", let me know. Also, make sure you use the (hd0,0) entry you had in your original menu.lst to boot Windows. We can work from there.

anon078 02-03-2009 10:37 PM

Quote:

Originally Posted by CJS (Post 3429928)
Or if testdisk doesn't give you the option to choose "Backup BS", let me know. Also, make sure you use the (hd0,0) entry you had in your original menu.lst to boot Windows. We can work from there.

I don't have the "Backup BS" option

this is the text in the terminal
Disk /dev/sda - 200 GB / 186 GiB - CHS 24321 255 63
Partition Start End Size in sectors
1 * HPFS - NTFS 0 1 1 16518 254 63 265377672

Boot sector
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.





[ Quit ] [ List ] [Org. BS ] [Rebuild BS] [ Dump ]
Copy boot sector over backup sector

CJS 02-04-2009 08:14 AM

OK, since testdisk won't let you use the "Backup BS" option, how about instead downloading this XP Recovery CD, boot that, go to the recovery console and do:
Code:

fixboot
If that completes successfully, I think you should be all set. Let me know how it goes or if you run into problems.


All times are GMT -5. The time now is 08:31 AM.