Re: Clone root partition
- From: Dances With Crows <danSPANceswitTRAPhcrows@xxxxxxxxx>
- Date: Sat, 30 Dec 2006 16:25:25 -0600
On Sat, 30 Dec 2006 20:26:00 +0000, Timothy Murphy staggered into the
Black Sun and said:
* Tong * wrote:
I'm trying to compile a comprehensive document on cloning root
partitions. My immediate goal is to clone my current working Linux
to [an] external USB HD, so that I can use it wherever I go.
This requires an x86 that can boot from USB devices in a sane and
reproducible manner. Not every x86 machine can do this, but it's more
common than it used to be.
By comprehensive I mean it should not be as simple minded as
dd if=/dev/hda2 of=/dev/sda2
cp -a / /mnt/point
tar -p -m cf - / | (cd /mnt/point; tar xf - )
I know they work, but so many things have been left out. By
comprehensive, I mean I want to know all relevant things that need to
be considered.
cp -a all directories that aren't /proc, /sys, or /dev (if using
udev/devfs), edit /etc/fstab to reflect new position of drive, reinstall
bootloader. 3 steps--which one are you having trouble with?
For example for dd
dd is not a backup method. Forget it.
modern Linux that uses udev, the /dev and /sys don't need to be
copied either. Anything else (besides distro specifics like
/var/cache/apt/archives)?
Copy the directories that contain actual data. This excludes /proc,
/sys, /dev if you're using udev/devfs, and any removable media and
network filesystems under /mnt or /media .
the clone partition should be made bootable, by grub or lilo.
No, really? Are you having trouble with this step? Explain the trouble
you're having. I'd say it's a better idea to use GRUB here, since
booting from things that aren't IDE can cause weird rearrangements in
BIOS boot order depending on the x86 you're using. (Boot from IDE
CD-R*, SATA disk is (hd2). Boot from SATA disk, SATA disk is (hd0).
BTDT.) GRUB gives you a shell you can use to try to recover. LILO
doesn't.
I'm not an expert in this area, but I would have thought it was
advisable not to clone / while it is mounted
Why not? If you're super-paranoid, take it down to single-user and
remount / ro, but if the machine's a single-user orkstation, there
should be no problem.
--
Love is a laser.
DO NOT LOOK INTO LASER WITH REMAINING HEART.
--Tori and Greg Andrews
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.
- Follow-Ups:
- Re: Clone root partition
- From: * Tong *
- Re: Clone root partition
- References:
- Clone root partition
- From: * Tong *
- Re: Clone root partition
- From: Timothy Murphy
- Clone root partition
- Prev by Date: Re: need more serial ports
- Next by Date: Re: Weird Problem: no contact to selected websites only on one linux machine in local subnet
- Previous by thread: Re: Clone root partition
- Next by thread: Re: Clone root partition
- Index(es):
Relevant Pages
|