LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub Error 17: Pls Help (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-17-pls-help-555845/)

taiwon45753 05-22-2007 02:01 PM

Grub Error 17: Pls Help
 
I am very new to Linux. I recently received the infamous Grub Error 17 at Grub Stage 1.5. I tried booting from the LiveCD Knoppix to find the following in fdisk and the grub menu.lst:

root@Knoppix:/media/hda1# fdisk -l

Disk /dev/hda: 2096 MB, 2096898048 bytes
65 heads, 62 sectors/track, 1016 cylinders
Units = cylinders of 4030 * 512 = 2063360 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 1016 2047209 16 Hidden FAT16
/dev/hda4 * 1 1 0 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(1065748, 46, 4)
Partition 4 does not end on cylinder boundary.

Disk /dev/sda: 1021 MB, 1021125120 bytes
255 heads, 63 sectors/track, 124 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 96 771088+ 6 FAT16

root@Knoppix:/media/hda1/boot/grub# more menu.lst
default 1
timeout 5
hiddenmenu
root (hd0,0)
title viki
kernel /boot/vmlinuz root=/dev/hda1 rw

root (hd0,0)
title WR_Linux
kernel /boot/bzImage root=/dev/hda1 rw

root (hd0,0)
title WR_Linux NFS
kernel /boot/bzImage root=/dev/nfs rw nfsroot=192.168.8.100:/home/lalabs/
parvus/export ip=192.168.8.1:255.255.255.0:eth0:off
boot

What should I do?

pixellany 05-22-2007 02:47 PM

For starters, what is supposed to be on those two drives?? They are showing as 2GB and 1GB respectively, which seems unlikely.
Also, what were you doing before this happened?

It seems that both partition tables have become corrupted.

Try dumping the partition tables like so--and post the results here:

Code:

dd if=/dev/hda bs=1 skip=446 count=64 | hexdump -C
<Same thing again but with sda instead of hda>>


taiwon45753 05-22-2007 08:04 PM

Well, on the hda drive, I had the OS and some files that I was using. The system should be booting from the hard drive. The SDA is merely a 1 GB USB stick that I am using to run the LiveCD.

Just before this whole grub thing was happening I was running this tar file that I got to update some things.

Here is the output of the 'dd' command

root@Knoppix:~# dd if=/dev/hda bs=1 skip=446 count=64 | hexdump -C
64+0 records in
64+0 records out
64 bytes (64 B) copied, 0.00316101 seconds, 20.2 kB/s
00000000 00 01 01 00 16 40 fe f7 3e 00 00 00 d2 79 3e 00 |.....@..>....y>.|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000030 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040
root@Knoppix:~# dd if=/dev/sda bs=1 skip=446 count=64 | hexdump -C
64+0 records in
64+0 records out
64 bytes (64 B) copied, 0.00168716 seconds, 37.9 kB/s
00000000 80 01 01 00 06 fe 3f 5f 3f 00 00 00 21 88 17 00 |......?_?...!...|
00000010 00 00 01 60 06 fe 3f 7b 60 88 17 00 1c dd 06 00 |...`..?{`.......|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000040

Thanks for all your help.

Junior Hacker 05-22-2007 08:58 PM

According to fdisk -l, you have a fairly old drive with 62 sectors/cylinder (never heard of such a thing). Also, the boot flag is at /dev/hda4 which is "Empty". It also says /dev/hda4 partition is not properly aligned within C.H.S. values, which is not entirely rare. Something upset that partition and the file system is not recognized no more, which is the reason for Error 17, grub does not recognize the "Empty" file system.
I would run testdisk from a Live CD (the USB) to see if it can recover the partition.

syg00 05-22-2007 10:29 PM

I would be guessing somebody opened the MBR in CHS mode - and updated it thus. Win95/98 was bad for doing that.
Testdisk will probably find the (LBA) partitions, but that won't help grub I wouldn't think. You'll need to reset the geometry - could be anyones guess; especially for the cylinder count.

taiwon45753 05-23-2007 04:21 PM

I tried running TestDisk from the LiveCD but I got stuck at the partition type. It showed as the choices:

PC/Intel
Apple
Non-Partitioned
XBox
Sun Solaris

I didn't see Linux. Which one should I choose or am I running the wrong testdisk?

taiwon45753 05-24-2007 11:36 AM

I tried testdisk with Intel/PC. This is what it showed:


TestDisk 6.5, Data Recovery Utility, October 2006
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hda - 2096 MB / 1999 MiB - CHS 4063 16 63
Current partition structure:
Partition Start End Size in sectors
test_FAT : Boot sector doesn't have the endmark 0xAA55
1 P FAT16 >32M 0 0 63 4061 15 47 4094418
1 P FAT16 >32M 0 0 63 4061 15 47 4094418

Warning: Bad ending head (CHS and LBA don't match)
No partition is bootable








*=Primary bootable P=Primary L=Logical E=Extended D=Deleted

[Proceed ] [ Backup ]
Try to locate partition


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