NavigationUser loginLinux NewsClick the above for your daily dose of Linux news. Food for ThoughtWhat signify a few lives lost in a century or two? The tree of liberty must be refreshed from time to time with the blood of patriots and tyrants. It is its natural manure. Spam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Grub Error 18 after installInstalled Debian 'Sarge' on a 1997 PC. I only have one HD installed (set as master - jumper settings are correct). It is 3.2 GB, so I don't need any DDO or anything for the BIOS to 'see' the whole drive. Before installing I used Win 98 Startup disk to delete all partitions on HD and then fdisk /mbr to erase the MBR. It was therefore a completely clean install. Install seemed to go well. Asked at end if wanted to install Grub, I said yes. Upon restart I get Grub Error 18. This error is apparently caused when the kernel is not close enough to the beginning of the drive for the BIOS to 'see' it. Debian is taking the whole HD, however, so I presume it put its kernel near the beginning of the first partition, so I can't really manually put it any closer to the beginning, can I? I wish the Debian installer was easier to use... I never have any problems installing Windows (ouch!) but I have been trying to install Debian for months and I just keep getting different errors... if I don't get it this time I am just going to give-up on it. Thanks |
Other reasons, not the position of the kernel
Hi there
There are other reasons why you can get this error too, not just the "position" of the kernel. I for example got it because on some machines, the bios hides a part of the hard drive to put a rescue partition on it (i.e. the BIOS reports a different geometry for the drive than the drive actually has, but the actual geometry is what Linux sees).
DOS (Windows9x) does use the BIOS settings though! So whatever the Win98 fdisk did is _NOT_ valid from the point of view that the geometry known to Win98 may be different than the actual geometry of the hard disk.
BTW: Linux behaves exactly like Windows 2000 and newer, so this probably was really the artifakt of the old days (DOS/BIOS).
Quoting "http://wiki.linuxquestions.org/wiki/GRUB":
This is (I admit it) a mess. But, if you feel like wanting to learn some stuff about partitions, MBRs and such, go on...
A floppy is not handy nowadays, so I suggest you use a Linux Live CD instead (like Knoppix or Ubuntu live CD or whatever).
Assuming your disk is hda:
Save your parition table in text form (e.g. parted /dev/hda print > /mnt/usbstick/my_old_partition).
Blank the MBR: dd if=/dev/zero of=/dev/hda bs=512 count=1
Recreate the disk label (the old Win98 label was probably erroneous): parted /dev/hda mklabel msdos
Recreate the partition with the same sizes as reported in your textual backup of your old partition table (you hopefully saved it ;-)). Again, you may use parted (parted /dev/hda) if you want.
Now all data that has been installed by Debian should be there again, and you really have a fresh new MBR.
Reinstall grub using grub-install.
I hope this helps and you don't give up... but, unfortunately, sometimes this is hwo it goes.
Cheers, Georg
Hi Georg, Thanks for the
Hi Georg,
Thanks for the great reply! I haven't tried your suggestion yet (and it sounds a bit daunting for a Linux newbie like myself) but I'll try it soon.
Hopefully it will work :)
Thanks again,
Alan
Perhaps this is easier...
Hi Alan
The directions I gave you are of the type "do everything manually". I'm sorry if they're a bit complicated. I did it this way several times when the partition table has been destroyed and I wanted to keep the data (just because the partition table is lost/overwritten or whatever doesn't mean the data itself is lost), i.e. my emphasis was on keeping the data.
In your case though you have a fresh Debian installation (i.e. nothing that is lost if something goes wrong ;-)). Is that right?
In this case it may even be simpler to only delete the MBR (this 'dd' thingy) and reinstall again (even though that takes some time again).
Admittedly, Debian is defenitely not the easiest Linux distro to start with.
I think the easiest way to install Debian is to download Knoppix (a Linux Live CD, i.e. no installation, automatic hardware detection and such; http://knoppix.org/) and run the hard disk installer. Of course, all the software that was on the CD will also be installed on the HD (i.e. not a minimal install).
Hopefully you read this post before getting your hands dirty on those awful commands I gave you in the last post (nevetheless, very powerfull).
Good luck,
Georg
Could be an issue with the BIOS
Check for some setting like 'LBA mode' for your disks in the BIOS. It has to be enabled.