How do you clean up grub?
I have installed Slackware on a hard drive whose master boot record contains grub. During the configuration step, it runs liloconfig. I was told that the best way to boot is off the mbr, so I selected install onto mbr as the place to install lilo. After installation was complete, I tried to boot up the computer, but it wouldn't recognize that /dev/hda was bootable. The BIOS gave me a "BOOT DISK ERROR - PLEASE INSERT SYSTEM DISK AND PRESS RETURN" error. No, there was no floppy in the drive at that time. :D The computer would, however, boot up off the floppy I created during installation and into Slackware. I was told that my problem is that grub wasn't removed properly, and that "grub is a bitch to clean up." I followed the instructions given to me: I reformatted the hard drive into FAT32 so that a Win98 boot disk would recognize it, made a Windows 98 boot disk, and ran 'fdisk /mbr' from the boot disk. I did this several times, from different locations (ie. A:\\> fdisk /mbr, C:\\> fdisk /mbr), and then repartitioned and reformated the drive so it was Linux-compatible, and reinstalled Slackware twice as I was instructed. Still wouldn't boot off the hard drive. I installed it one last time, installing lilo on the root partition instead. I booted off the floppy into Slackware, and used Linux's fdisk to make the root partition bootable. Rebooted, still didn't work. This worked when I was using Fedora and grub was on the mbr, and I haven't changed any BIOS settings. What is going on? I would be very appreciative if anyone could give me some help.
Thanks in advance. Regards, Edward S. Rice PS. I'm using the bare.i kernel and my hd is an ATI. That doesn't have anything to do with it does it? The setup installed Slackware on my drive properly with the same kernel. . . |
There is a command to free mbr in Gnu/Linux :
dd if=/dev/zero of=/dev/hda count=1 bs=446 But before that, did you try to change the switch on hd to auto/cable select and in the bios accordingly, a friend has a similar problem and solved it like that. |
Quote:
|
Well I don't know in your case, my friend have only one hd...
There is an interesting link for work with the mbr here like save and restore it and load a mbr from the ATAPI site to your hd, read closely. |
Well, I took out the second hard drive just to make things simpler. I set the Linux hd to cable select, and the BIOS recognizes it as master. I performed the dd command you mentioned, and just to make sure it worked, I used dd to do a reverse copy and copy the MBR to a text file. I then converted it to hexadecimal, and read it to confirm that it was completely all zeros. As I had thought, it was. I reinstalled LILO, copied the new MBR to a text file, and it wasn't zeros anymore. I don't know how to read it, but it did say LILO on the top row near the right, so I assume that it is correct.
I boot up, "DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER" :cry: That's not supposed to happen. . . Any ideas? Regards, Edward S. Rice |
Is the bootable flag set for the partition?
When using cable select with 2-on-1 they should both be set to cable select. |
The command :
dd if=/dev/zero of=/dev/hda count=1 bs=446 fills of zero's the boot sector of the mbr (= location where the bootloader is) but there is another : dd if=/dev/zero of=/dev/hda count=1 bs=512 fills of zero's the boot sector of the mbr and the data boot record too (dbr = partition table) So with this command your partitions are erased (but maybe it will cleanup the drive) If switching to cable select did not help, consider re switch the drive to master but do not connect your second drive yet to save it if you did an error in commands. [edit] If you save your mbr like : dd if=/dev/hda of=boot.mbr count=1 bs=512 and then : xdd boot.mbr Do you see the 55aa number at the end of the output ? |
Ah.. solved the problem. Yes, this is a weird way of doing it, but I reinstalled the operating system that included grub with it, but selected lilo as the boot loader while installing. I then booted up onto that operating system to make sure it worked. Then, I installed Slackware with lilo, and everything worked. I have no clue why it worked, it was just a random attempt... thank you for all your help.
Regards, Edward S. Rice |
All times are GMT -5. The time now is 04:58 PM. |