[Wylug-help] Switching the system to a new hard drive

James Holden wylug at jamesholden.net
Mon Feb 11 12:22:05 GMT 2008


On Mon, Feb 11, 2008 at 12:09:00PM +0000, Jim Jackson wrote:
> 
> On Sun, 10 Feb 2008, John Hodrien wrote:
> >On Sun, 10 Feb 2008, Felix Ulrich-Oltean wrote:
> >>- mount the new partitions and copy across all the data (with rsync or
> >> cp?)
> >
> >I'd be more of a fan of dump and restore.  This is the sort of thing I 
> >do like LVM for, as it'd let you move from the old disk to the new disk 
> >without unmounting or a reboot...
> 
> I'm a fan of tar for this job - but it helps if the root partition is not
> mounted, so boot Knoppix or similar from a cdrom.

Seconded, but there is an alternative if you're not able to take the
system down or boot from CD-ROM.

By bind-mounting the root filesystem, you'll be able to grab a copy of
it without getting unwanted /proc or /dev udev cruft.

Create a temp directory somewhere, eg: /tmp/rootfs

Then, bind-mount it as follows:

mount -o bind / /tmp/rootfs

You can then back-up from /tmp/rootfs and you'll get a copy of the
filesystem before the extra stuff gets mounted over the top of it. You
can see this in action by comparing /dev to /tmp/rootfs/dev or /proc to
/tmp/rootfs/proc.

You'll need to repeat the process for your /var and /usr if they're on
separate partitions.

James

> 
> Having said that, I'd not thought about the joys of LVM, which so far I've 
> pretty much ignored. Mmmm food for thought there, thanks John.
> 
> 
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://list.wylug.org.uk/pipermail/wylug-help/attachments/20080211/e71fad60/attachment.bin


More information about the Wylug-help mailing list