Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 03-10-2003, 04:28 PM   #1
LQ Newbie
Registered: Jun 2002
Posts: 8

Rep: Reputation: 0
Unhappy Can I rewrite lilo to mbr?

I had to reinstall XP on a dual boot with Slackware 8.1 and now lilo is gone. It just boots directly into XP. Is it possible to rewrite lilo to mbr again?
Old 03-10-2003, 04:45 PM   #2
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
boot to linux from CD/floppy and run "lilo" as root
Old 03-10-2003, 04:45 PM   #3
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
yes... Use your instalation media (CD) to boot from it again
and at the boot prompt enter: root = /dev/hda1 (or whateve your partition is installed on) and after that enter the setup program and go to configure and follow the instructions
Old 03-10-2003, 05:06 PM   #4
Registered: Jul 2002
Posts: 141

Rep: Reputation: 15
You could also use the bootloader for xp to boot into your linux system.
write the lilo on the / drive instead of MBR.

Then use a program called bootpart in xp to create the file needed for the bootloader to boot your / partition .

In that way you don't have to mess with the MBR every time you reinstall XP.
Old 03-11-2003, 04:58 PM   #5
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Since you have a new XP install, you may want to do that over again after repartioning your drive with a small Dos or dos32 partition (hda1) before the XP's (ntsc) partition. This would allow you to use lilo instead of the ndldr. If the first two partitions are primary, linux will still start in the hda5 partition. I have an HP laptop with XP preinstalled, and it does this, so I didn't have to mess with boot.ini entries when I installed linux.
Old 03-12-2003, 10:20 AM   #6
Registered: Dec 2002
Location: Plains
Distribution: Slackware 13
Posts: 465

Rep: Reputation: 30
This is an example using the Windows "ntldr" to boot XP,Debian,Slackware. I created a softlink from the /boot/vmlinuz-ide-2.4.18(vmlinuz or bzimage) to "/" in order to forego the pleasure of having 2 bootscreens and booting straight to the kernel. The examples are from Slackware but they're generic. Here's an example of lilo.conf with everything commented out except the essentials.

# LILO configuration file
# generated by 'liloconfig'
# Start LILO global section
boot = /dev/hdb6
#message = /boot/boot_message.txt
#timeout = 1
# Override dangerous defaults that rewrite the partition table:
# Normal VGA console
vga = normal
# End LILO global section
# DOS bootable partition config begins

# DOS bootable partition config ends
# Linux bootable partition config begins
image = /vmlinuz-ide-2.4.18
root = /dev/hdb6
label = Slackware
# Linux bootable partition config ends

Note that the image= is not in the /boot. Run "/sbin/lilo" If you get a "Warning" that this is not the first partition. You did good. Now create your bootsect file.

root@whatever#dd if=/dev/hdb6 of=/bootsect.slk bs=512 count=1

Copy the bootsect.slk to the drive where "ntldr" and "boot.ini" reside. (Normally C)by using a dos format floppy or e-mail it to yourself.If your Windows drive is vfat just mount the drive and copy straight to it. Then add a line to "boot.ini" Here's mine.

[boot loader]
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\bootsect.dbn ="Debian"

Reboot and pic your flavor.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
L 80 80 ... How to rewrite MBR? manudath Linux - Software 2 02-27-2005 10:00 AM
Lilo on MBR tez Slackware - Installation 3 10-22-2004 09:20 AM
Lilo only on MBR? Teoryn Slackware - Installation 9 03-30-2004 04:10 AM
LILO on the MBR Culbert Linux - Newbie 6 03-21-2003 07:01 PM
mbr had over write so lilo is gone how to rewrite lilo to mbr mch Linux - Software 4 10-25-2002 02:55 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:14 PM.

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