LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Reinstall lilo to hda, using hda lilo.conf (https://www.linuxquestions.org/questions/linux-general-1/reinstall-lilo-to-hda-using-hda-lilo-conf-302472/)

tomjermy 03-16-2005 05:18 PM

Reinstall lilo to hda, using hda lilo.conf
 
Hi.

Before you go on, if you may know how to do what I need to do, with
grub, then do read on because I am sure that it should be possible with
grub too.

I want to make a machine boot from a hard disk that already has a linux
install on it. I basically need to reinstall lilo to the mbr, using the
files from /mnt/hda1/boot (chain.b, boot.0300 & boot.b) and
/mnt/hda2/etc/lilo.conf.

If anyone can tell me how, please do so asap!!! I would be very
grateful.

Here is my lilo.conf:

root@ttyp0[/mnt/hda2/etc]# cat lilo.conf
delay=40
append="panic=20"
boot=/dev/hda1
map=/boot/map
install=/boot/boot.b
#prompt
#timeout=50
message=/boot/message
linear
default=linux

image=/boot/vmlinuz-2.2.16-22smp
label=linux-mp
read-only
root=/dev/hda4
append="hdc=ide-scsi"

image=/boot/vmlinuz-2.2.16-22
label=linux
read-only
root=/dev/hda4
append="hdc=ide-scsi"


I copied 2 partitions off the drive as I through that the machine would
no longer be needed as a RH7 server, and put FC2 on it.

I now find out that the machine is needed in bootable state (quickly!).
I have copied the two images of the partition back on to the drive -
hda1 which I have as /boot/ and hda2 which I have the rest of the old
system on.

I am using the knoppix live CD.

If someone can help me with this I would most grateful!

Thanks,
Tom Jermy

root@ttyp0[hda1]# ls
System.map kernel.h-2.4.0 os2_d.b
System.map-2.2.16-22 lost+found vmlinux-2.2.16-22
System.map-2.2.16-22smp map vmlinux-2.2.16-22smp
boot.0300 message vmlinuz
boot.b module-info vmlinuz-2.2.16-22
chain.b module-info-2.2.16-22 vmlinuz-2.2.16-22smp
kernel.h module-info-2.2.16-22smp

root@ttyp0[hda2]# ls
bin dev fsckoptions home loadconfig.sh lost+found opt root
tmp usr
boot etc getdomain lib loadrc.sh mnt proc sbin
todo var

root@ttyp0[hda2]# uname -a
Linux Knoppix 2.4.27 #2 SMP Mo Aug 9 00:39:37 CEST 2004 i686 GNU/Linux

root@ttyp0[/mnt/hda2/etc]# cat redhat-release
Red Hat Linux release 7.0 (Guinness)

Komakino 03-16-2005 05:27 PM

Boot your live cd and mount your own root partition somewhere. For the sake of argument we'll say that your root partition is /mnt/hda2 (looks like it is from what you've said).

In a terminal:
Code:

chroot /mnt/hda2
should be all you need, assuming the lilo.conf file is present and correct.


All times are GMT -5. The time now is 03:07 AM.