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-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 04:37 PM.