Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.