LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-09-2009, 07:37 PM   #1
pepsimachine15
Member
 
Registered: Jun 2008
Posts: 122

Rep: Reputation: 16
two boot drives with lilo


before i start messing with anything, i figured i better ask before i get myself into trouble. ive been searching around and havent seemed to have found anyone with a setup similar to what i am trying to do. here's what i'm doing:

i have two identical 20gb drives, hda and hdb. hda1 is root. i am setting up either rsync, dd, or cpio to copy hda1 to hdb1 possibly once a month with a cron job. I just want to have a monthly backup of root in case hda1 ever fails. no, i do not want to use fakeraid or mdadm to set up a raid1 array, just want a monthly backup.

should hda fail, and i need to set hdb as first boot device in bios, and boot off of that, i need to have a working lilo on that drive as well. if i copy the boot sector with lilo off of hda onto hdb, the boot= parameter in lilo would still be pointing to hda, and not hdb.

so is there a way to set two multiple boot drives in lilo? if not, how would i go about installing a separate lilo on hdb with its own conf? i was thinking something along the lines of modifying lilo.conf on hdb1 to point boot=/dev/hdb and root=/dev/hdb1 and chroot to hdb and run lilo -v? and if i do the above, and i do boot off of hdb1, will everything work as it should? what about needing to modify fstab for / being on hdb1 now?
 
Old 12-09-2009, 08:08 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If the original drive dies (or is removed) the remaining drive will be /dev/[sh]da
I haven't used lilo in years, but you'll probably need to copy more than just the MBR sector - best would be to re-run lilo for that disk to ensure things are set up correctly I would think. Can always be done later from a rescue CD if you do get stuck.
Better wait for a lilo cognisant person to respond.
 
Old 12-10-2009, 06:34 PM   #3
pepsimachine15
Member
 
Registered: Jun 2008
Posts: 122

Original Poster
Rep: Reputation: 16
removing hda does not cause hdb to take its place. the only way to make hdb show as hda is to physically disconnect hda, and set the jumper for hdb to master(making it primary master, i.e. hda). lilo just installs itself to the boot sector, i only need to copy that for a working lilo. however, the lilo config file is where i was getting confused. the boot= option is to tell lilo what hard disk contains the boot sector, so it seems that just tells the loader where to install itself. i re-ran lilo on the machine with a config file with option for booting root both hda1 and hdb1. after lilo installed itself to the boot sector of hda1, i copied it to hdb1 using dd. i then pulled hdb from the machine, and put it into a test system. lilo loads, and i can select hdb from the list, but i ran into a problem with fstab trying to remount root from hda1, when it should be hdb1. so it looks like after a backup of hda1 to hdb1, i will need to send over a modified fstab to hdb1 to take care of that issue. should there be anywhere else that i need to look for problems such as the fstab one? i'm thinking since everything runs off of the mount point / that i should be ok, as there dont need to be any more reference switches from hda1 to hdb1 other than fstab.
 
Old 12-10-2009, 06:50 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
ooops - my bad; too long since I use a system that still refers to /dev/hd?.
For fstab you'll need to change the nomenclature - use /dev/disk/by-label or by-UUID would probably be best.
 
  


Reply



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
2 hard drives, XP on my main sata drives, 10.2 on my IDE LILO doesnt show on boot up Dachy Slackware 14 01-03-2008 07:01 AM
How to config lilo to boot from two Hard Drives. mlsbraves Linux - General 4 09-13-2004 08:16 PM
Setting up lilo to boot two different drives DavidTempler Linux - Newbie 21 09-10-2004 03:00 PM
Lilo boot on two hard drives tr0j4n Linux - Newbie 5 02-16-2004 01:37 AM
how-to for using lilo to boot two separate drives jackopa Linux - General 4 04-19-2002 02:39 PM

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

All times are GMT -5. The time now is 11:51 PM.

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
Open Source Consulting | Domain Registration