LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to remove grub from mbr (https://www.linuxquestions.org/questions/slackware-14/how-to-remove-grub-from-mbr-4175589125/)

Widgeteye 09-09-2016 06:25 PM

How to remove grub from mbr
 
I made the mistake of trying out Mint and it installed grub on my mbr, now I have installed Slack 14.2 but lilo won't overwrite grub and I can't boot except from the DVD install disk. Let me make it clear I want Lilo and not grub so there is no point in saying "use grub it's better." I have never in over 20 years had a problem with Lilo and I have had nothing BUT problems trying to use grub.

I have already tried to use DD to wipe the MBR off, I have tried several times running lilo but every time I reboot all I get is a grub error and I can't boot.

This error began after I installed Slack and I DID NOT run lilo during the installation, I was going to try and use grub instead and even though I did not run lilo upon installation of Slack, as soon as I rebooted grub errored out.

Any ideas?
Thanks

STDOUBT 09-09-2016 06:33 PM

What did your dd command look like?
AFAIK, you'd need to use something like
Code:

dd if=/dev/zero of=/dev/sda
as opposed to /dev/sda1 for example.
This method has never failed for me when attempting to remove malingering boot code.
The dd only needs to run for about 30 seconds.
EDIT!
________the above will be destructive and require a re-install. As for simply removing GRUB and using LILO while preserving your installation I have no idea :-(

Widgeteye 09-09-2016 06:51 PM

Quote:

Originally Posted by STDOUBT (Post 5603144)
What did your dd command look like?
AFAIK, you'd need to use something like
Code:

dd if=/dev/zero of=/dev/sda
as opposed to /dev/sda1 for example.
This method has never failed for me when attempting to remove malingering boot code.
The dd only needs to run for about 30 seconds.
EDIT!
________the above will be destructive and require a re-install. As for simply removing GRUB and using LILO while preserving your installation I have no idea :-(

I used this "dd if=/dev/zero of=/dev/sda bs=446 count=1" The first 446 bytes is the Bootstrap.

Skaendo 09-09-2016 07:06 PM

Quote:

Originally Posted by Widgeteye (Post 5603152)
I used this "dd if=/dev/zero of=/dev/sda bs=446 count=1" The first 446 bytes is the Bootstrap.

You could try
Code:

fdisk -w /dev/sda
or
fdisk --wipe /dev/sda

which should wipe out the partition table. You will then have to create a new partition table then partitions.

I had a similar problem, but I forgot how I fixed it.

yancek 09-09-2016 09:29 PM

Have you logged in to a terminal as the root user and run liloconfig? You should see the same options you do with a Lilo install during the OS installation including the install to MBR option. What exactly happens? There should be no need to overwrite the Grub code as installing Lilo to the MBR will do that. If you've been using Lilo that long I expect you are familiar with the expert option?

syg00 09-10-2016 01:01 AM

Uefi ?.

ReaperX7 09-10-2016 06:05 AM

LILO should install it's information to the mbr overwriting Grub's without incident, unless you were doing so from a non-root account.

Truth be told, Grub is a more feature-filled bootloader, but Mint is a strange distribution, and often they do things that don't make sense, but you should not be locked out of assigning the mbr.

The question I would ask is, when you ran liloconfig, did you install LILO to the superblock, mbr, or a bootdisk?

Gordie 09-10-2016 09:23 AM

I would try to delete grub from the boot directory /boot/grub/
Next, as root run liloconfig

zk1234 09-10-2016 02:41 PM

As root:
Code:

lilo -M /dev/sda

Skaendo 09-10-2016 05:53 PM

I remember what I did now, I used a live USB of GParted and wiped the partition table then made a new one. Worked great.

http://gparted.sourceforge.net/


All times are GMT -5. The time now is 07:47 AM.