?
Solved

Getting Lilo Back

Posted on 2003-02-20
3
Medium Priority
?
294 Views
Last Modified: 2011-09-20
Hi,

A while ago I had to reinstall XP which I have duel booting with Mandrake 9. In doing this it got rid of Lilo. So I can't access Linux. Any idea how I can get it back up without reinstalling? Thanks

-Sam
0
Comment
Question by:samblake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:haydes007
ID: 7987092
If you made a Linux boot floppy you can boot from it. When you get to a login prompt, login as root then run the following command:

/sbin/lilo -v

This will reinstall LILO with the last settings you had. I assume that since you only reinstalled XP that those settings should work fine.

If you don't have a boot floppy, you should be able to boot your system from the mandrake install DISC. At the boot: prompt, type the following:

linux root=/dev/pathToYourLinuxPartition noinitrd ro

When you get back in, login ad root and run /sbin/lilo -v

This *SHOULD* fix your problem.
0
 
LVL 1

Accepted Solution

by:
manuelflury earned 150 total points
ID: 7990040
Hi,

After booting from the first CD (or DVD), press F1 for a list of advanced options, type "rescue" at the boot prompt, and press "enter".
After booting, Mandrake's rescue mode displays a menu of choices: "Re-install Boot Loader", "Restore Windows Boot Loader", "Mount your partitions under /mnt", "Go to console", "Reboot", and "Doc: what's addressed by this Rescue?".

"Go to console" is the most useful of these choices across a variety of Linux systems, because it gives you a root prompt and access to the tools that you can use to repair your system.

One thing you could be interested in is multiboot from XP :

Suppose that your boot sector is on /dev/sda, in /etc/lilo.conf you should have this line then :

boot=/dev/sda

From the linux root prompt do the following things :

dd if=/dev/sda of=bootsect.lnx bs=512 count=1

This will copy the boot sector to the file bootsect.lnx

Copy this file to a floppy :

mount -t msdos /dev/fd0 /mnt/floppy
copy bootsect.lnx /mnt/floppy
umount /mnt/floppy

Now reboot to windows and edit the boot.ini file (assuming you use C: )

From CMD.EXE execute this :

attrib -s -r c:\boot.ini

Edit this file with wordpad or notepad (I prefer gVim :-)
and add this line :

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows XP ...
C:\BOOTSECT.LNX="Linux"

From CMD.EXE execute this :

attrib +s +r c:\boot.ini

Don't forget to copy the file generated from Linux to C:\

After restarting you should obtain a new entry from windows prompt.
0
 

Expert Comment

by:dhaberx
ID: 7994638
You need to boot off some other linux media.  Usually boot/rescue disks will allow you to choose a partitiion to mount.  At the lilo prompt it's something like "root=/dev/hda1".  

I would highly reccomend Timos RescueCD.  It's a small debian based CD that will provide enough documentation to boot off your hard drive.  Once on log on as root and then run /sbin/lilo .

Timos RescueCD is available at:
http://rescuecd.sourceforge.net/download.html

If you would prefer to use floppy disks over a CD you can use something like:
http://www.debian.org/distrib/floppyinst


There is plenty of documentation there about retrieving the disk images and writing the disks.  With the floppy at the lilo prompt you can specify to boot off your hard drive and then just run /sbin/lilo, reboot, and everything should be fixed.
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question