View Full Version : Restoring Boot Record for Linux
11-05-01, 06:52 PM
I have had this problem for a while but I cannot seem to get a good answer. I had Linux Mandrake installed on my drive and had installed Windows XP + 2000. Of course now the LILO has been removed and I cannot boot to Linux. How can I restore LILO without having to reinstall Linux? Some people have suggested to use a Linux boot disk but that only prompts to reinstall Linux. I could use boot magic but I would rather not. Is there some way I can do this within the files left for Linux?
Boot of a Linux boot disk, and get to the point where you have an interactive console to use the OS you booted, rather than just run the installer.
Slackware has this ability, I think it takes some fighting to get to that point from a mandrake disk.
Mount the partition that was "/" on the previous system. You will also need to recreate the directory structure that gave access to /boot and /etc, if those were on partitions other than "/".
Once you can access lilo.conf, run lilo (probably in /sbin/lilo. You might not have it on the rescue cd, and will need to mount the partition for that if it isn't mounted already) as: lilo -r </path/to/where/you/mounted/the/root/partition>. The -r tells lilo to pretend its root is actually at the dir you specify. At that point, it will run itself and read your config files and kernel images, and stick them into the mbr again, according to your lilo.conf.
11-06-01, 11:26 AM
That is my main problem getting the boot disk. Mandrake does not have any boot disk the only disk images they have are to setup the installation and those don't give you an option to exit to a prompt to run commands. I found a way to add Linux to the Windows 2000 boot menu but to set that up I need to actually boot to X Windows or to at least a prompt. I have searched around but I can't seem to find a general boot type disk for Linux. The instructions I found are to make a disk in Linux. Would a Slackware boot disk work on my Mandrake install?
go to slackware's site and get the stuff you need to make a boot floppy.
It will work on a mandrake distro because you aren't going to be running Mandrake, just accessing the files it left on your drive.
The only program you will run is lilo, and thats so basic noone bothers to tailor it to their distro.
11-09-01, 02:58 PM
This is probably already resolved, but I think that solution is too hard/long/bother some.
Easiest way is to download a RedHat boot disk ftp.redhat.com
It doesn't even really matter what one you have unless you've got a file system other than ext2.
When it comes to the first prompt where you would normally just hit enter to installed type:
It's try booting your system with that kernel, most things will fail, but we really don't care.
Log in as root and just type "lilo"
I've had this work on every distribution that is using ext2 for the file system. If you don't know what file system you're running, then it's most likely ext2
Yea, that is pretty simple now that I think about it. I always did it the hard way. Not that I get it screwed up much anyhow.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.