Replace local linux OS with rsynced linux OS?

Jason Haar Jason.Haar at trimble.co.nz
Tue Dec 17 02:45:01 EST 2002


On Sat, Dec 14, 2002 at 12:41:51PM -0600, Dr. Poo wrote:
> Hi everyone, again. My question today is, how can i replace my development 
> boxs' local OS with a resynced version of the production OS (which currently 
> has it's home on the dev box)? 

I do it all the time! :-)

Obviously you'll probably need an exclude list as the IP address/hostname of
the dev box will differ (I assume) from your production box, but unlike
Windows, all files will go over fine. Just make sure you re-run lilo (if
that's your boot manager) after the rsync otherwise you won't be able to
reboot :-)

[BTW. exclude /proc]

> After the new OS is running, i'd like to be able to boot up and have the new 
> OS be mounted as root., but still then be able to mount the old dev box OS 
> and copy files from it that were being developed previously...then remove the 
> old dev OS all together. Make sense?
> 
> I know this will require chroot, and changing fstab? and stuff like that.... 
> Has anyone done anything like this (or this exactly)? (A shell script 
> possibly? or a better mailing list to be asking this question on?)

Ahh - trust you to make it harder :-)

You can't chroot at boot time - doesn't really make any sense. All I can
think of is that your dev box will need more partitions that the production
box, and use lilo to choose between booting off the dev or the production
image:

e..g

production box running 2.4.18 with /dev/hda1 as / and /dev/hda2 as swap

dev box running 2.4.20 with /dev/hdb1 as root and /dev/hdb2 as /

Then configure lilo to boot off /dev/hda1 for production (and therefore
/etc/fstab on /dev/hda1 refers to /dev/hda* partitions). When booting off
/dev/hdb1, the fstab in there refers to /dev/hdb* partitions.

Then when booted under dev, you can mount the production partition under
"/mnt" and rsync the live system onto it, etc.

...should work :-)
-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1



More information about the rsync mailing list