Click to See Complete Forum and Search --> : Really Easy question to answer


Convert
08-19-2001, 07:27 PM
I feel so stupid that i forgot this. I fdisk'd my MBR and now lilo is gone. I cannot boot my pc. How do i reinstall lilo from the cdrom. I am running RH7.1.

Here's what i did, i typed Linux Rescue at the prompt when i booted from the cd rom. Is that correct? i got to a weird shell prompt, and my filesystem was a ramdrive. /sbin/lilo was not found so i could not do anything there. How can i just boot to my normal linux partition.

Thanks

scoutt
08-19-2001, 08:13 PM
did you fdisk and not fdisk /mbr

if you did the first one there is no hope of getting lilo back on. you will have to reinstall linux or another OS as you just destroyed the boot record.

bdg1983
08-19-2001, 08:21 PM
Just typing fdisk will not destroy your partitions as you have to select the proper fdisk option to delete any of the partitions.

fdisk /mbr on the other hand will clear out Lilo if it is installed in the mbr.

If /mbr is the case, then I hope you have a bootdisk. Use that to get to your Linux root partition and then rerun /sbin/lilo to write Lilo back to the mbr.

Siskmarek
08-19-2001, 08:57 PM
Okay, I know nothing substantial about Linux, but can't you use your installation CD as a boot disk of sorts? I'm pretty sure there's a way to do this - I've read it somewhere.

You stick CD in... it gives you a prompt on what you want to do. You type in "boot /boot/vmlinuz" or some weird junk like that, but don't try it because I'm a clueless newbie. o.0;; Do some research on it!

~ Siskie

Red Lotus
08-19-2001, 09:01 PM
If you don't have a boot disk then I can send you the files necessary to create one. I have Red Hat 7.1 too and created a boot disk. I think that all you need to do is put files on the floppy and there's your boot disk. You don't need to do any special formatting to the floppy, do you?

Convert
08-19-2001, 09:01 PM
That is exactly my problem, i don't remember how to boot with my rescue cdrom. It boots, but i have nothing mounted. Basically, i want to know how to create a new linux boot disk from the cdrom, or how to reinstall lilo to the mbr. I just overwrote it with nt by accident. I want my linux back.

p.s., I had a boot disk, but it does not boot, the disk is damaged. All i have know is the red hat cd.

Red Lotus
08-19-2001, 09:06 PM
Yar, Windows NT :mad:. What was the purpose of putting some stupid boot loader on WinNT anyway? Did Microsoft do that just so they could annoy some unsuspecting users running linux?

OK I'll upload the boot files in a .zip file(you know how to decompress that, right?), and post back with the URL.

Convert
08-19-2001, 09:09 PM
Will that boot me into my Linux system? I have the whole thing there, i just need to get to it. Remember, i don't need to reinstall linux, i just need to boot to my OS. I am using NT right now to type this. NTFS files system, i don't think that i can format my disk with this. Anyway, you can email the files to chrs@enrayconsulting.com.

Thanks.

Convert
08-19-2001, 09:11 PM
****, i am sorry, chris@enrayconsulting.com

Red Lotus
08-19-2001, 09:34 PM
Thanks, but I'll post it here in case anyone else has the same problem. Here are the files:

members.fortunecity.com/lotus5/rhbootdisk.zip (http://members.fortunecity.com/lotus5/rhbootdisk.zip)

This is a compressed file which you must use an unzipper utility to decompress, but this file type is only supported in windows. This is OK in your case, but linux users won't find this file useful. I could do the compressing in linux, but I'm a n00b and don't know how to yet :D.

Unzip this file and inside you will find the following files:

boot.msg
initrd.img
syslinux.cfg
vmlinuz
LDLINUX.SYS

Put these files onto a floppy disk, then get a marker or a black pen and label it "Red Hat Linux 7.1 Boot Disk." Try not to lose or damage this, and make a backup of it if you feel necessary.

I'll explain how this works. Whenever you use LILO to boot up linux, your system searches for vital boot files stored in the directory /boot. These files were damaged somehow, I think, so now linux can't boot. All of your personal files and everything are still there, it's just that you can't boot into linux. The files on the floppy disk you created above contain sufficient information your system needs to boot linux. Thus, put the floppy into your floppy drive, reboot, and when the computer reads the floppy at startup, the floppy will tell the system to boot into linux and it will aid in the boot process.

If you'd like, you don't even have to worry about LILO anymore. Many users simply use a boot disk each time they want to boot linux, and never install LILO at all. You can reinstall LILO if desired, however. An easy solution would be to use this boot disk to boot into linux, back up all of your personal files, reinstall linux and make sure LILO is installed to the root directory (/) and not the MBR, and then use a third-party boot loader to configure your system so that at startup, you will have the option of booting either NT or linux.

I hope this helps, and I'm sure others can give you a hand if it doesn't (cause I'm a n00b after all :)). Windows NT sure does screw up linux installs that have LILO on the MBR, so your best bet (if you can't find a third party boot loader or reinstall linux) is to use the boot disk, which is a fine way to start linux. I don't have NT (I have Windows ME, arg the shell for that sucks :o), but I don't have LILO installed on the MBR anyway. What I did is I installed a utility called BootMagic, which allows you to boot up different operating systems at start up. Then I chose to install LILO on the root directory rather than on the MBR, and when I choose "Linux" at the BootMagic menu, it calls upon LILO at the root directory, which aids in the process of loading up linux.

I don't know where you can find a third party boot loader unfortunately. So good luck :).

[ 19 August 2001: Message edited by: Red Lotus ]

Convert
08-20-2001, 03:17 AM
Thankyou so much!! IT worked perfectly... ALMOST.

My hard drives reside on a off board ata raid controller. That image does not allow kernel parameters to be passed to it such as the location of the ide controllers (ide2=0xXXXX ide3=0xXXXX) and so on. I had to open it in a binary hex editor and append the necessary changes. It works now though, and i am happy. Thanks again.