What you are saying is type rsync /dev/driveA to /dev/driveB and boot then ? If so it's a great command with the proper syntax. I wonder if it would work if you're on driveA? But it's not a backup archive program. I'll have to read up on this one.
Correct me on the above if necessary. Thanks for sharing the rsync command.
Cheers,
Patrick013
For background, I only use
ext3 or
ext4 partitions for my OS, because both are
stable,
robust,
excellent for
general file handling such as that found in a
/ partition, and
all necessary filesystem
tools are
readily available.
I have numerous copied OS on this machine. I always
partition, and
format those partitions,
prior to installing or copying any OS. When
copying an OS, I do this from another running OS,
not the one being copied, so that all data to be copied is in a
non running state. (
This can be a liveCD if you only have one installed OS) I mount the partition to be copied on
/mnt/here and the receiving partition on
/mnt/there. (
I always copy from here, to there)
As
root, the command couldn't be simpler;
[root@localhost ~]# rsync -av /mnt/here/ /mnt/there <Enter>
The
-av argument makes sure all files are
bit perfect copies, with the
v part giving
verbose feedback of the process, as it progresses. Note the trailing
/ after the source partition,
/mnt/here/. Without the trailing
/ the copied data would be in a
directory named
here. With the trailing
/ only the
contents of the partition mounted there are copied, without the mount point directory, Part of the beauty of this method is that the copied partition and the receiving partition can have
different file system formats. You could copy from your present
xfs partition to an
ext4 partition and still have a
runnable copy. Very useful if you simply wish to
change file systems without having to reinstall.
When the copy is complete, the
/etc/fstab of the copy has to be edited to reflect the new location of its
/ partition.
[root@localhost ~]# kwrite /mnt/there/etc/fstab <Enter>
Edit as needed and
save the file.
A stanza pointing to the new
/ partition must also be added to the
master /boot/grub/menu.lst if the OS is to be operated on the
same machine. If the hard drive is to be
moved to another machine, the boot stanza in the copy's
/boot/grub/menu.lst must be edited to reflect the change of location, then grub must be installed to the MBR of that drive, using the new
/ partition as the
root (hdx,n) entry.
[root@localhost ~]# kwrite /mnt/there/boot/grub/menu.lst <Enter>
Edit as needed and
save the file. If this is to be a
boot drive, all references to the drive must be as
(hd0) in grub notation. If UUID numbers are used, the
correct UUID for the new
/ partition can be found with the
blkid command. I
label all my partitions, and use the labels, as they are easier to remember than UUID numbers when doing these edits to system files.
Examples:My boot stanza for this installation as originally installed.
title MiniMe 2010
kernel (hd2,13)/boot/vmlinuz BOOT_IMAGE=MiniMe_2010 root=LABEL=minime2010 resume=LABEL=swap1000 vga=791
initrd (hd2,13)/boot/initrd.imgThe boot stanza for this installation as it would appear in the
boot partition's master menu.lst on
this drive, if I were to use it to actually boot the OS from it's
own partition,
title MiniMe 2010
kernel (hd0,13)/boot/vmlinuz BOOT_IMAGE=MiniMe_2010 root=LABEL=minime2010 resume=LABEL=swap1000 vga=791
initrd (hd0,13)/boot/initrd.imgThe boot stanza for this installation as it
actually appears in the
boot partition's master menu.lst on
all installed drives, that I
actually use to boot the OS from the
boot partition itself.
title MiniMe 2010
kernel (hd0,0)/minime2010/vmlinuz BOOT_IMAGE=MiniMe_2010 root=LABEL=minime2010 resume=LABEL=swap1000 vga=791
initrd (hd0,0)/minime2010/initrd.imgNote: Where a partition is being booted
from, and where the kernel being used is
located, is always
relevant to which
drive is the current
boot drive on a multi-drive machine. By having a small
boot partition on
each drive, all containing the
exact same thing, (
another rsync copy) allows the use of the last stanza shown above to work from
whichever drive is designated the
current boot drive.
My fstab:LABEL=minime2010 / ext4 defaults,noatime 1 1
LABEL=TR5-Documents /home/polack/Documents ext3 rw,user,noauto,exec,noatime 0 0
LABEL=Documents2 /home/polack/Documents2 ext3 rw,user,noauto,exec,noatime 0 0
LABEL=share7 /share7 ext3 rw,user,auto,exec,noatime 0 0
LABEL=share9 /share9 ext3 rw,user,auto,exec,noatime 0 0
LABEL=movies /movies ext3 rw,user,auto,exec,noatime 0 0
LABEL=movies2 /movies2 ext3 rw,user,auto,exec,noatime 0 0
LABEL=TV-1 /tv ext3 rw,user,auto,exec,noatime 0 0
LABEL=storage00 /zstorage00 ext3 rw,user,noauto,exec,noatime 0 0
LABEL=120backup /zbackup ext3 rw,user,noauto,exec,noatime 0 0
LABEL=boot200 /mnt/boot ext3 rw,user,noauto,exec,noatime 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda2 :
LABEL=swap200 swap swap sw,pri=3 0 0
# Entry for /dev/sdc2 :
LABEL=swap1000 swap swap sw,pri=3 0 0
# Entry for /dev/sde2 :
LABEL=swap750 swap swap sw,pri=3 0 0
none /dev/pts devpts mode=0620 0 0
/dev/fd0 /mnt/floppy auto rw,user,noauto,exec 0 0
/dev/sr0 /mnt/cdrom auto ro,user,noauto 0 0
/dev/sr1 /mnt/dvd auto ro,user,noauto 0 0
# none /dev/shm tmpfs defaults 0 0
By changing only the label
name of the top line, I can use this
same fstab in
all Linux OS on this machine, so that no matter
which OS is running,
all my data is found in the
same relative place.