LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-09-2016, 06:25 PM   #1
Widgeteye
Member
 
Registered: Mar 2005
Posts: 130

Rep: Reputation: 17
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
 
Old 09-09-2016, 06:33 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
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 :-(

Last edited by STDOUBT; 09-09-2016 at 06:35 PM.
 
Old 09-09-2016, 06:51 PM   #3
Widgeteye
Member
 
Registered: Mar 2005
Posts: 130

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by STDOUBT View Post
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.

Last edited by Widgeteye; 09-09-2016 at 06:53 PM.
 
Old 09-09-2016, 07:06 PM   #4
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
Quote:
Originally Posted by Widgeteye View Post
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.

Last edited by Skaendo; 09-09-2016 at 07:07 PM.
 
Old 09-09-2016, 09:29 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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?

Last edited by yancek; 09-09-2016 at 09:32 PM.
 
Old 09-10-2016, 01:01 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Uefi ?.
 
Old 09-10-2016, 06:05 AM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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?
 
Old 09-10-2016, 09:23 AM   #8
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
I would try to delete grub from the boot directory /boot/grub/
Next, as root run liloconfig
 
Old 09-10-2016, 02:41 PM   #9
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
As root:
Code:
lilo -M /dev/sda
 
Old 09-10-2016, 05:53 PM   #10
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
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/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to remove lilo or grub from mbr cezarrangel Linux - Desktop 5 08-01-2015 08:26 PM
[SOLVED] Can I remove Grub by just running LILO on the mbr? harryhaller Slackware 6 03-02-2013 08:40 AM
12.4 new install grub 2 boot problem with grub put on it's own partition not on MBR james2b Ubuntu 14 12-07-2012 09:34 AM
How can I wipe the MBR clean and remove GRUB stevod333 Linux - General 7 04-03-2006 09:51 AM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration