LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Fixing MBR with lilo with a non-boot drive (https://www.linuxquestions.org/questions/linux-kernel-70/fixing-mbr-with-lilo-with-a-non-boot-drive-859683/)

galapogos 01-30-2011 11:56 PM

Fixing MBR with lilo with a non-boot drive
 
Hi,

I'm trying to update the kernel on a hard drive with Linux installed on it. Let's call this HDD1. HDD1 doesn't allow me to boot up normally, so there's no way I can get a shell on it and apply lilo as a boot drive.

I have another Linux installation which I boot from. Let's call this HDD2. I then connect HDD1 to the system that is booted up to HDD2. HDD2 is detected as /dev/sda and HDD1 is detected as /dev/sdb.

I then mount HDD1 on some directory, say /fix, as follows:
Code:

mount /dev/sdb1 /fix
Then I go to /fix/etc and edit the lilo.conf to point to the new kernel in the "image = " section.

How can I apply lilo and write to the boot sector of HDD1 instead of HDD2? Is it the following?

Code:

chroot /fix/ /sbin/lilo -v -v
Thanks.

amani 01-31-2011 09:23 AM

no

http://linux.die.net/man/8/lilo

amani 01-31-2011 09:24 AM

what should you try to write to the boot sector?

galapogos 01-31-2011 02:04 PM

I've checked the man pages, but couldn't find any definitive guide to doing what I wish to do. Any help?


All times are GMT -5. The time now is 10:13 PM.