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.

anon078 02-04-2009 09:27 AM

fixboot cannot find the system drive, or the drive specified is not valid

CJS 02-04-2009 09:47 AM

Were you able to login to the recovery console OK? And then you got that error after running the fixboot command? If so, how about first doing:
Code:

map
And that should show the drive letters of all your partitions. Choose the first NTFS partition (most likely it will be "C") and do:
Code:

fixboot C:
And what does that return?

anon078 02-04-2009 10:24 PM

now when i try to boot i get a "NTLDR is missing" prompt

syg00 02-04-2009 11:00 PM

CJS seems to be on top of things, but in the past I've found that message comes from the boot sector record on the Windows partition. After a (normal) fixboot, I have presumed this to mean more sectors were trampled on than fixboot fixes. When I have had this I have had to resort to a re-install of Windoze to rectify things.
Hopefully others will have a better solution.

anon078 02-05-2009 12:30 AM

i hope so too=[ i didnt now backup any of my data yet since that computer is a secondary and if a reformat is necessary ill have to go get a usb harddrive reader to transfer my files=/

CJS 02-05-2009 06:51 AM

Shadows72, how about next posting:
Code:

hexdump -s 128 -n 2 -e '"%x\n"' /dev/sda1
mount /dev/sda1 /mnt && ls -l /mnt

Also, please make sure you are using the following entry to boot Windows:
Code:

title Windows XP
rootnoverify (hd0,0)
chainloader +1

And we can work from there.

anon078 02-05-2009 10:17 PM

thanks for all the help again, i assume the prompts are for fedora? now i cant even boot fedora. i tried to boot fedora using super grub disk and i get "Error 18: Selected cylinder exceeds maximum supported by BIOS"

CJS 02-06-2009 08:22 AM

Did you do any kind of software updating in Fedora prior to the booting problem, especially a kernel upgrade? Or did you make any changes to Grub other than the menu.lst? If not, to get a Grub error 18 out-of-the-blue could mean you have hardware issues at this point. I would go to the manufacturer's website for your HDD and download their diagnostic tools to run on your HDD, and see if your HDD is OK. It would also be good to run "memtest86+" to check your RAM; I don't know about Fedora, but the Ubuntu Live CD comes with memtest86+ as an option, and there are many other CDs that have it too.

anon078 02-06-2009 11:08 PM

i think i have does a kernel upgrade before the booting problems. when i edit grub i edit grub.conf. i will look for the HDD diagnostics tonight

CJS 02-07-2009 07:42 AM

How about running the Boot Info Script again and posting its output, because that will give us a better idea if the issue might be with your new kernel upgrade.

anon078 02-07-2009 05:04 PM

how do i do that without linux? can i run it using the fedora repair ?

CJS 02-07-2009 05:14 PM

You can run the Boot Info Script from any Live CD you might have, you don't have to run it from an installed distro.

anon078 02-08-2009 03:12 AM

Quote:

Originally Posted by CJS (Post 3435110)
How about running the Boot Info Script again and posting its output, because that will give us a better idea if the issue might be with your new kernel upgrade.

here are the results

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

=> No known boot loader is installed in the MBR of /dev/sda

sda1: _________________________________________________________________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed:
mount: unknown filesystem type ''

sda2: _________________________________________________________________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed:
mount: unknown filesystem type ''

sda4: _________________________________________________________________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed:
mount: unknown filesystem type ''

=========================== 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: 0x69737369

Partition Boot Start End Size Id System

/dev/sda1 ? 1,869,771,365 2,038,460,886 168,689,522 69 Unknown
/dev/sda2 ? 1,701,519,481 3,571,400,945 1,869,881,465 73 Unknown
/dev/sda4 0 3,435,113,471 3,435,113,472 0 Empty

/dev/sda1 ends after the last sector of /dev/sda
/dev/sda1 overlaps with /dev/sda2
/dev/sda1 overlaps with /dev/sda4
/dev/sda2 ends after the last sector of /dev/sda
/dev/sda2 overlaps with /dev/sda4
/dev/sda4 ends after the last sector of /dev/sda

blkid -c /dev/null: ____________________________________________________________

/dev/loop0: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: LABEL="F10-i686-Live" UUID="51e0bdfc-1a89-45e0-b993-9953dc69e6b8" SEC_TYPE="ext2" TYPE="ext3"
/dev/dm-0: LABEL="F10-i686-Live" UUID="51e0bdfc-1a89-45e0-b993-9953dc69e6b8" TYPE="ext3"
/dev/sda: SEC_TYPE="msdos" UUID="0000-0000" TYPE="vfat"
/dev/dm-1: LABEL="F10-i686-Live" UUID="51e0bdfc-1a89-45e0-b993-9953dc69e6b8" SEC_TYPE="ext2" TYPE="ext3"

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

/dev/mapper/live-rw on / type ext3 (rw,noatime)
/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)
/dev/sr0 on /mnt/live type iso9660 (ro)
varcacheyum on /var/cache/yum type tmpfs (rw,mode=0755)
/tmp on /tmp type tmpfs (rw)
vartmp on /var/tmp type tmpfs (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/liveuser/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=liveuser)
/dev/sr1 on /media/FROGGER2 type iso9660 (ro,nosuid,nodev,uhelper=hal,uid=500)
/dev/sda on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)

=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown MBR on /dev/sda

00000000 eb 3c 90 4d 53 44 4f 53 35 2e 30 00 02 08 01 00 |.<.MSDOS5.0.....|
00000010 02 00 02 03 51 f8 08 00 11 00 04 00 01 00 00 00 |....Q...........|
00000020 00 00 00 00 80 00 29 00 00 00 00 4e 4f 20 4e 41 |......)....NO NA|
00000030 4d 45 20 20 20 20 46 41 54 31 32 20 20 20 33 c9 |ME FAT12 3.|
00000040 8e d1 bc f0 7b 8e d9 b8 00 20 8e c0 fc bd 00 7c |....{.... .....||
00000050 38 4e 24 7d 24 8b c1 99 e8 3c 01 72 1c 83 eb 3a |8N$}$....<.r...:|
00000060 66 a1 1c 7c 26 66 3b 07 26 8a 57 fc 75 06 80 ca |f..|&f;.&.W.u...|
00000070 02 88 56 02 80 c3 10 73 eb 33 c9 8a 46 10 98 f7 |..V....s.3..F...|
00000080 66 16 03 46 1c 13 56 1e 03 46 0e 13 d1 8b 76 11 |f..F..V..F....v.|
00000090 60 89 46 fc 89 56 fe b8 20 00 f7 e6 8b 5e 0b 03 |`.F..V.. ....^..|
000000a0 c3 48 f7 f3 01 46 fc 11 4e fe 61 bf 00 00 e8 e6 |.H...F..N.a.....|
000000b0 00 72 39 26 38 2d 74 17 60 b1 0b be a1 7d f3 a6 |.r9&8-t.`....}..|
000000c0 61 74 32 4e 74 09 83 c7 20 3b fb 72 e6 eb dc a0 |at2Nt... ;.r....|
000000d0 fb 7d b4 7d 8b f0 ac 98 40 74 0c 48 74 13 b4 0e |.}.}....@t.Ht...|
000000e0 bb 07 00 cd 10 eb ef a0 fd 7d eb e6 a0 fc 7d eb |.........}....}.|
000000f0 e1 cd 16 cd 19 26 8b 55 1a 52 b0 01 bb 00 00 e8 |.....&.U.R......|
00000100 3b 00 72 e8 5b 8a 56 24 be 0b 7c 8b fc c7 46 f0 |;.r.[.V$..|...F.|
00000110 3d 7d c7 46 f4 29 7d 8c d9 89 4e f2 89 4e f6 c6 |=}.F.)}...N..N..|
00000120 06 96 7d cb ea 03 00 00 20 0f b6 c8 66 8b 46 f8 |..}..... ...f.F.|
00000130 66 03 46 1c 66 8b d0 66 c1 ea 10 eb 5e 0f b6 c8 |f.F.f..f....^...|
00000140 4a 4a 8a 46 0d 32 e4 f7 e2 03 46 fc 13 56 fe eb |JJ.F.2....F..V..|
00000150 4a 52 50 06 53 6a 01 6a 10 91 8b 46 18 96 92 33 |JRP.Sj.j...F...3|
00000160 d2 f7 f6 91 f7 f6 42 87 ca f7 76 1a 8a f2 8a e8 |......B...v.....|
00000170 c0 cc 02 0a cc b8 01 02 80 7e 02 0e 75 04 b4 42 |.........~..u..B|
00000180 8b f4 8a 56 24 cd 13 61 61 72 0b 40 75 01 42 03 |...V$..aar.@u.B.|
00000190 5e 0b 49 75 06 f8 c3 41 bb 00 00 60 66 6a 00 eb |^.Iu...A...`fj..|
000001a0 b0 4e 54 4c 44 52 20 20 20 20 20 20 0d 0a 4e 54 |.NTLDR ..NT|
000001b0 4c 44 52 20 69 73 20 6d 69 73 73 69 6e 67 ff 0d |LDR is missing..|
000001c0 0a 44 69 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 |.Disk error...Pr|
000001d0 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 72 |ess any key to r|
000001e0 65 73 74 61 72 74 0d 0a 00 00 00 00 00 00 00 00 |estart..........|
000001f0 00 00 00 00 00 00 00 00 00 00 00 ac bf cc 55 aa |..............U.|
00000200

Unknown BootLoader on sda1


Unknown BootLoader on sda2


Unknown BootLoader on sda4



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

sdb .
sdc .
sdd .
sde .

=============================== StdErr Messages: ===============================

hexdump: /dev/sda1: No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/sda1: No such file or directory
hexdump: /dev/sda1: Bad file descriptor
/home/liveuser/Desktop/boot_info_script024.sh: line 1043: [: =: unary operator expected
hexdump: /dev/sda2: No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/sda2: No such file or directory
hexdump: /dev/sda2: Bad file descriptor
/home/liveuser/Desktop/boot_info_script024.sh: line 1043: [: =: unary operator expected
hexdump: /dev/sda4: No such file or directory
hexdump: stdin: Bad file descriptor.
hexdump: /dev/sda4: No such file or directory
hexdump: /dev/sda4: Bad file descriptor
/home/liveuser/Desktop/boot_info_script024.sh: line 1043: [: =: unary operator expected


looks like fixboot has f**ed my harddrive, before fixboot i could still boot fedora. Now it look like everything it one mushed up partiton. i popped gparted into the computer and what i saw was one big 180gb partition. then i put acronis true image into the comp to try to back up some files and it found some unreadable sectors x_X is there a way to fix this? or is recovering my files out of the question

CJS 02-08-2009 06:14 AM

I don't think I would blame "fixboot" at this point, because it looks to me like you most likely have a hardware problem, especially if Acronis also found bad sectors. In addition, fixboot returned some strange errors previously with "fixboot cannot find the system drive, or the drive specified is not valid". I noticed the script printed out your sda drive's MBR since it couldn't identify it, and it looks like "fixboot" somehow installed XP's boot sector code ("ntldr") to the MBR rather than XP partition's boot sector. But again, I would tend to think that's a result of a hardware issue. Can you go to the manufacturers website for your HDD and download their diagnostic software to check your HDD? You could also run some of the HDD tests that come on the Ultimate Boot CD, because that CD has many of the HDD diagnostic software that manufacturer's include with their HDDs. And since you don't know what the hardware issue could be, I would also recommend running "memtest86+" just to make sure your RAM is OK; that test comes with the Ultimate Boot CD and also comes with some Live CDs (like Ubuntu for example). If you really want to try and salvage some of your files from that HDD, you could try "dd_rescue" to image that HDD to another drive, and then work on it on another computer. Depending on your hardware issue though, you might have to pull that HDD out and plug it into another computer in order to work on it. Good luck and let me know what you find.

anon078 02-08-2009 12:32 PM

well in order to run the seagate diagnostics tests on the drive i removed the drive and put in into another computer in order to run the program. the drive passed both the short and the long dst tests. I'll download ultimate boot cd and run the diagnostics again to see what i find. i was running memtest86+ yesterday, when i got to 50 percent i got tired of waiting and i cancled it to run the live image, ill redo the test again today also

anon078 02-08-2009 05:36 PM

Ok i ran diagnostics on the hard drive. it passed the both the long and shorts driveselftests. then i ran msmtest86+ and it passed 3 times before i closed it. I ran testdisc and it shows my hard drive as having no partitions

CJS 02-08-2009 06:26 PM

1 Attachment(s)
Actually, you shouldn't need testdisk to recover your partitions in your case; since you posted the results from the Boot Info Script which includes your partition configuration in units of sectors, we can use that to reconstruct your correct partition table. I would strongly recommend doing the following procedure while your HDD is attached to another computer, because I don't think you can trust yours at this point. So anyway, how about downloading the attached "partition_table.txt" file to your desktop, and then do the following as root user:
Code:

cd /home/<username>/Desktop
sfdisk --no-reread -f /dev/sda < partition_table.txt

Replace <username> with your user name, and also make sure that "sda" is indeed your 200 GB drive, otherwise change it. Also, please post the output of the above sfdisk command. Then reboot, and please post the output of:
Code:

fdisk -lu
sfdisk -d
parted -l

And we can go from there.

anon078 02-08-2009 07:44 PM

I ran this from the came comp since i dont have access to the other comp right now.



[liveuser@localhost ~]$ su
[root@localhost liveuser]# 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: 0x69737369

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sda1 ? 116388 126889 84344761 69 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 ? 105915 222310 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary.
/dev/sda3 ? 1 1 0 74 Unknown
Partition 3 does not end on cylinder boundary.
/dev/sda4 1 213826 1717556736 0 Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
[root@localhost liveuser]# cd /home/<username>/Desktop
bash: username: No such file or directory
[root@localhost liveuser]# cd /home/liveuser/Desktop
[root@localhost Desktop]# sfdisk --no-reread -f /dev/sda < partition_table.txt


Disk /dev/sda: 24321 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 ? 116387+ 126888- 10501- 84344761 69 Unknown
start: (c,h,s) expected (1023,254,63) found (68,13,10)
end: (c,h,s) expected (1023,254,63) found (288,115,43)
/dev/sda2 ? 105914+ 222309- 116395- 934940732+ 73 Unknown
start: (c,h,s) expected (1023,254,63) found (371,114,37)
end: (c,h,s) expected (1023,254,63) found (366,32,33)
/dev/sda3 ? 0+ 0- 0 0 74 Unknown
/dev/sda4 0 213825- 213826- 1717556736 0 Empty
start: (c,h,s) expected (0,0,1) found (0,0,0)
end: (c,h,s) expected (1023,254,63) found (0,0,0)
New situation:
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sda1 * 63 265377734 265377672 7 HPFS/NTFS
/dev/sda2 265377735 370233989 104856255 83 Linux
/dev/sda3 370233990 390716864 20482875 f W95 Ext'd (LBA)
/dev/sda4 0 - 0 0 Empty
/dev/sda5 370234053 390716864 20482812 b W95 FAT32
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
[root@localhost Desktop]# fdisk -lu

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: 0x69737369

Device Boot Start End Blocks Id System
/dev/sda1 * 63 265377734 132688836 7 HPFS/NTFS
/dev/sda2 265377735 370233989 52428127+ 83 Linux
/dev/sda3 370233990 390716864 10241437+ f W95 Ext'd (LBA)
/dev/sda5 370234053 390716864 10241406 b W95 FAT32
[root@localhost Desktop]# sfdisk -d
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start= 63, size=265377672, Id= 7, bootable
/dev/sda2 : start=265377735, size=104856255, Id=83
/dev/sda3 : start=370233990, size= 20482875, Id= f
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=370234053, size= 20482812, Id= b
[root@localhost Desktop]# parted -l
Model: ATA ST3200822AS (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 136GB 136GB primary ntfs boot
2 136GB 190GB 53.7GB primary ext3
3 190GB 200GB 10.5GB extended lba
5 190GB 200GB 10.5GB logical fat32


Model: Linux device-mapper (dm)
Disk /dev/mapper/live-osimg-min: 3221MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 3221MB 3221MB ext3


Model: Linux device-mapper (dm)
Disk /dev/mapper/live-rw: 3221MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 3221MB 3221MB ext3


Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label

[root@localhost Desktop]#
ill restart now and see how things go

anon078 02-08-2009 07:53 PM

i didnt realize that i ran those last 3 commands before restarting. well i restarted and it wouldnt boot, so i used super grub disk to boot fedora and it works now. here are the outcomes of those 3 promts after a restart


[root@localhost Andrew]# fdisk -lu

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: 0x69737369

Device Boot Start End Blocks Id System
/dev/sda1 * 63 265377734 132688836 7 HPFS/NTFS
/dev/sda2 265377735 370233989 52428127+ 83 Linux
/dev/sda3 370233990 390716864 10241437+ f W95 Ext'd (LBA)
/dev/sda5 370234053 390716864 10241406 b W95 FAT32
[root@localhost Andrew]# sfdisk -d
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start= 63, size=265377672, Id= 7, bootable
/dev/sda2 : start=265377735, size=104856255, Id=83
/dev/sda3 : start=370233990, size= 20482875, Id= f
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=370234053, size= 20482812, Id= b
[root@localhost Andrew]# parted -l
Model: ATA ST3200822AS (scsi)
Disk /dev/sda: 200GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 136GB 136GB primary ntfs boot
2 136GB 190GB 53.7GB primary ext3
3 190GB 200GB 10.5GB extended lba
5 190GB 200GB 10.5GB logical fat32


Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.


im going to see if i can get supergrubdisk to boot windows

anon078 02-08-2009 08:03 PM

Quote:

Originally Posted by CJS (Post 3432956)
Shadows72, how about next posting:
Code:

hexdump -s 128 -n 2 -e '"%x\n"' /dev/sda1
mount /dev/sda1 /mnt && ls -l /mnt

Also, please make sure you are using the following entry to boot Windows:
Code:

title Windows XP
rootnoverify (hd0,0)
chainloader +1

And we can work from there.



[root@localhost Andrew]# hexdump -s 128 -n -e '"x\n"' /dev/sda1
[root@localhost Andrew]# mount /dev/sda1 /mnt && ls -l /mnt
total 2092311
drwxrwxrwx 1 root root 0 2008-12-19 19:21 7e8ea4b883cf0cbf43c3c9130fe8a6
-rwxrwxrwx 1 root root 0 2005-03-02 16:57 AUTOEXEC.BAT
drwxrwxrwx 1 root root 4096 2008-03-26 00:15 Boot
-rwxrwxrwx 1 root root 338 2008-03-26 00:15 Boot.BAK
-rwxrwxrwx 1 root root 338 2008-08-30 21:47 boot.ini
-rwxrwxrwx 2 root root 338 2008-03-26 00:15 Boot.ini.saved
-rwxrwxrwx 1 root root 438840 2006-11-02 01:53 bootmgr
-rwxrwxrwx 1 root root 8192 2008-03-26 00:15 BOOTSECT.BAK
-rwxrwxrwx 1 root root 104 2008-07-10 16:58 change.bat
-rwxrwxrwx 1 root root 1401 2009-01-07 22:07 cmdline.txt
drwxrwxrwx 1 root root 163840 2009-01-24 23:18 Config.Msi
-rwxrwxrwx 1 root root 0 2005-03-02 16:57 CONFIG.SYS
drwxrwxrwx 1 root root 4096 2008-03-28 19:20 Documents and Settings
drwxrwxrwx 1 root root 0 2008-04-08 22:26 Downloads
drwxrwxrwx 1 root root 0 2008-03-08 13:44 EPSONREG
drwxrwxrwx 1 root root 4096 2008-04-19 16:46 Fraps
-rwxrwxrwx 1 root root 2137833472 2009-01-25 00:03 hiberfil.sys
drwxrwxrwx 1 root root 0 2008-03-14 20:16 ijji
drwxrwxrwx 1 root root 0 2008-12-31 20:28 Intel
-rwxrwxrwx 1 root root 0 2005-03-02 16:57 IO.SYS
-rwxrwxrwx 1 root root 443 2008-03-08 14:31 IPH.PH
-rwxrwxrwx 2 root root 3379200 2005-05-03 05:00 logonui_blue.exe
-rwxrwxrwx 2 root root 332 2007-01-28 09:07 logon uninstall.reg
-rwxrwxrwx 1 root root 184370 2004-08-18 21:38 macshift.exe
-rwxrwxrwx 1 root root 0 2005-03-02 16:57 MSDOS.SYS
drwxrwxrwx 1 root root 0 2008-05-17 20:09 Nexon
-rwxrwxrwx 1 root root 47564 2004-08-04 05:00 NTDETECT.COM
-rwxrwxrwx 1 root root 250032 2004-08-04 05:00 ntldr
drwxrwxrwx 1 root root 28672 2009-01-17 19:52 Program Files
drwxrwxrwx 1 root root 0 2008-03-27 07:54 $RECYCLE.BIN
drwxrwxrwx 1 root root 4096 2008-07-17 10:06 RECYCLER
drwxrwxrwx 1 root root 0 2008-06-23 19:07 Sierra
-rwxrwxrwx 2 root root 268 2008-05-28 22:57 sqmdata00.sqm
-rwxrwxrwx 2 root root 268 2008-05-31 23:19 sqmdata01.sqm
-rwxrwxrwx 2 root root 268 2008-06-01 21:40 sqmdata02.sqm
-rwxrwxrwx 2 root root 268 2008-06-03 19:15 sqmdata03.sqm
-rwxrwxrwx 2 root root 244 2008-05-28 22:57 sqmnoopt00.sqm
-rwxrwxrwx 2 root root 244 2008-05-31 23:19 sqmnoopt01.sqm
-rwxrwxrwx 2 root root 244 2008-06-01 21:40 sqmnoopt02.sqm
-rwxrwxrwx 2 root root 244 2008-06-03 19:15 sqmnoopt03.sqm
drwxrwxrwx 1 root root 4096 2008-03-08 12:42 System Volume Information
drwxrwxrwx 1 root root 147456 2009-01-18 17:06 WINDOWS


windows still can not be booted, it just reboot when i try to boot into windows

anon078 02-10-2009 10:24 PM

i tried to boot xp with using
rootnoverify (hd0,0)
chainloader +1
but it didnt not work.
then i tried to boot xo with super grub disk, still did not work. i tried to use recovery console to fix boot again, and it did now work and i had to re write my partitions again. any ideas?


All times are GMT -5. The time now is 10:31 PM.