LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-03-2017, 10:45 AM   #1
Toutatis
Member
 
Registered: Feb 2013
Posts: 412

Rep: Reputation: Disabled
remove lilo


Hello,

I have windows 7 and slackware linux installed on a computer, using lilo to boot one or the other.
I want to remove completely linux from this computer. Which of the two commands (if any)

lilo -u
lilo -M /dev/sda mbr

will remove lilo and allow to boot directly on windows 7 ?
 
Old 08-03-2017, 10:48 AM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
Removing Lilo won't remove linux, just the bootloader. The easiest way to remove linux would be to format the partitions you have it installed on. You will probably want to restore the Windows bootloader
 
Old 08-03-2017, 12:10 PM   #3
Toutatis
Member
 
Registered: Feb 2013
Posts: 412

Original Poster
Rep: Reputation: Disabled
@TheEzekielProject yes I know how to remove linux and its partitions, but I don't know how to restore the mbr. I don't find the old windows 7 CD, so I thougth it could be done from linux.
 
Old 08-03-2017, 12:23 PM   #4
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Before you kill lilo, try booting into Windows and running the following from an elevated command prompt.

Code:
bootrec /fixmbr
If that doesn't work, the following should:

Code:
bootrec /fixboot
I found the info here.
 
Old 08-03-2017, 01:41 PM   #5
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,500

Rep: Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453Reputation: 8453
Quote:
Originally Posted by Toutatis View Post
@TheEzekielProject yes I know how to remove linux and its partitions, but I don't know how to restore the mbr. I don't find the old windows 7 CD, so I thougth it could be done from linux.
The syslinux package comes with a binary MBR (/usr/share/syslinux/mbr.bin) which can be written to the boot drive with dd in order to restore MBR booting. See this link for instructions:

http://www.syslinux.org/wiki/index.php?title=Mbr
 
5 members found this post helpful.
Old 08-03-2017, 02:41 PM   #6
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,781

Rep: Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431
Someone please help that man up. It seems the screen door hit him right on his bum and knocked him silly. jk Good luck when you're force "upgraded" to Win 10.
 
Old 08-03-2017, 06:54 PM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
When lilo is first run, it leaves a copy of the original MBR in /boot named boot.*
You can restore the original MBR using 'dd', as detailed in the previous syslinux link.
 
2 members found this post helpful.
Old 08-04-2017, 12:51 AM   #8
Toutatis
Member
 
Registered: Feb 2013
Posts: 412

Original Poster
Rep: Reputation: Disabled
Thank you for the answers. I will try with dd. The next owner will take care of Win 10
 
1 members found this post helpful.
Old 08-04-2017, 03:28 AM   #9
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,471
Blog Entries: 2

Rep: Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980Reputation: 980
He is selling the box !
Phew!
Fora moment I thought we're loosing one...
 
  


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?? deftone Linux - Newbie 3 02-12-2007 01:09 AM
#lilo -u to remove lilo.....what for grub ??? b0nd Linux - General 1 05-27-2006 04:09 PM
remove lilo gazman1 Linux - Newbie 4 02-05-2005 10:14 PM
How to Remove LILO Murdock1979 Slackware 3 10-13-2003 08:49 PM
how to remove LILO Nooooobie Linux - General 5 10-08-2001 07:27 PM

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

All times are GMT -5. The time now is 11:15 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