LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Installing lilo on another disk.

[ILUG] Installing lilo on another disk.

Niall O Broin niall at linux.ie
Tue Jul 30 15:40:30 IST 2002


I'm installing warm standby disks on a number of boxes. These disks will be
the same size (sometimes bigger) than the main disk. The idea is that every
night I'll rsync the partitions on the main disk to the standby disk so that
in the case of disaster, the first port of call, before the tapes, is the
standby disk. (We did consider running Linux md RAID on the disks but RAID
gives you no protection against slips of the finger)

So, in the event of finger slips we can mount the relevant partition and
retrieve the banjaxed file. In the case of a disk crash, the plan is that
we'll put the standby disk in place of the main disk and the workstation
will be back up ASAP. Then we can deal with replacing the disk without the
pressure of a broken box on our back.

However, I'm stumped as to how to install LILO on the backup disk. Let's say
the master disk is /dev/hda and the backup disk is /dev/hdb. lilo.conf
currently looks like this:

boot    = /dev/hda
change-rules
reset
read-only
menu-scheme = Wg:kw:Wg:Wg
lba32
prompt
timeout = 80
message = /boot/message

  image  = /boot/vmlinuz
  label  = linux
  root   = /dev/hda3
  vga    = 791
  initrd = /boot/initrd



There are a couple more boot stanzas, but they're not germane. As you can
see, / is on /dev/hda3 and /boot is on /dev/hda1. So if for instance I had
booted from a CD and wanted to re-install LILO on this disk I'd do something
like

mount /dev/hda3 /mnt
mount /dev/hda1 /mnt/boot
lilo -r /mnt

which is OK because I'm installing lilo on /dev/hda and I want it to boot
from /dev/hda so it'll plug in all the right numbers.

However, in the case of the standby disk, I'll have to do something like

mount /dev/hdb3 /mnt
mount /dev/hdb1 /mnt/boot
lilo -r /mnt

But I'm obviously going to have to do something different here because I
want to install onto /dev/hdb in such a way that the disk will boot when it
becomes /dev/hda after a disaster (like the one I had this morning :-( -
shutting the stable door was on the to-do list, but the bloody horse decided
to do a bunk early). The machine already has its spare disk - just hadn't
yet been used :-(

I thought perhaps I should just do   lilo -b /dev/hdb -r /mnt  but I think
that -b is analogous to the boot keyword in lilo.conf. Or will this just
work automagically ?  i.e. boot = /dev/hda tells lilo what numbers to poke
where, and it figures out where the disk is from the -r ?

Unfortunately suck and it and see is rather tricky - the machines concerned
are not to hand.


Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell