LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-30-2011, 11:56 PM   #1
galapogos
Member
 
Registered: May 2008
Posts: 227

Rep: Reputation: 30
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.
 
Old 01-31-2011, 09:23 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
no

http://linux.die.net/man/8/lilo
 
Old 01-31-2011, 09:24 AM   #3
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
what should you try to write to the boot sector?
 
Old 01-31-2011, 02:04 PM   #4
galapogos
Member
 
Registered: May 2008
Posts: 227

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fixing boot/mbr via linux stevewm Linux - Newbie 9 05-20-2009 02:03 AM
How To:fixing Grub Re-install After Mbr Recovery In A Fedora/windows Multiple Boot DOTT.EVARISTI Fedora 8 06-01-2008 04:36 AM
Cloned harddisk doesn't boot with LILO in MBR Kristian2 Slackware 8 07-24-2007 01:00 PM
Lilo will not install to MBR and I get 99 99 99 at boot? M$ISBS Slackware 2 12-22-2006 02:40 PM
Ubuntu not overwriting MBR on my SATA drive, still getting LILO Timestampmismatch portwolf Ubuntu 2 07-27-2006 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration