[blfs-support] p.s. -- Re: moving lfs

akhiezer lfs65 at cruziero.com
Wed Mar 20 11:57:13 PDT 2013

> Date: Wed, 20 Mar 2013 18:33:37 +0000
> From: lfs65 at cruziero.com (akhiezer)
> To: BLFS Support List <blfs-support at linuxfromscratch.org>
> Subject: Re: [blfs-support] moving lfs
> > From blfs-support-bounces at linuxfromscratch.org Wed Mar 20 18:26:50 2013
> > Date: Wed, 20 Mar 2013 19:19:46 +0100
> > From: Sven Bartscher <svenbartscher at yahoo.de>
> > To: BLFS Support List <blfs-support at linuxfromscratch.org>
> > Subject: [blfs-support] moving lfs
> >
> > i want to move my lfs-system on a logical partition because i have 
> > already four primary partitions on my drive and can't create any new but 
> > want a few more. So to do that i would:
> > copy (with rsync) all the files from the lfs partition on another 
> > temporary partition (on another drive)
> > delete the old partition and create the new logical partitions
> > copy everything from the temporary partition back on the logical one
> > edit /etc/fstab (obviously)
> > i don't have to create a initramfs because i already have one.
> >
> > I there something i forgot? Something i don't need to do? Something i 
> > have to take care about? I'm really scared about something goes wrong, 
> > or something goes lost and all my work on my lfs-system is gone. How can 
> > i make sure that everything is copied right? Can i just be sure that 
> > rsync does everything right? Is there something else i should be 
> > scared/afraid of?
> > with hopefull (and scared) regards
> > Sven
> >
> I tend to find that dd and cpio are better than rsync &c for such stuff, as 
> there's less hassle over device-files and such like.

 - meant to add a small general-ptr note about verifying. rsync and cpio have, 
of course, got some 'verify' options. But one usually wants extra belts'n'braces 
beyond that.

Some _very_ rough'n'ready 'naive' ways would be: 'diff -qr /  /mntpt-of-copy'; 
'find / -ls' vs 'find /mntpt-of-copy -ls'; and judicious use of sort/grep to 
compare outputs.

The general problem of comparing two hierarchies is a bit more involved, and 
more interesting. I use a homebrew script that does find(), pipes to xargs(), 
and from there do ls/stat/md5*/sha*/&c calcs on each object, output to a log, 
sort the log, and then compare src.log with tgt.log  .

Also, concerning your partitions: if it was me, I would be happier if the 
partition that you're going to be deleting and then re-making as a logical 
partition, is presently the last of the four partitions on the drive (instead 
of, say, the second or third). (P.S. you may wish at some point to investigate 
use of gpt partitioning - much more sane, if your machine/sw supports it).

The 'other disk' that you are backing-up to: try to be able to boot your lfs 
from that, as a further test that the backup-copy looks ok.

As for fstab, you might want to use (if not already) 'LABEL=' to help avoid 
partition-renaming hassles. I'd expect if it's a recent-version lfs build, and 
you've not done anything unusual, then 'LABEL=' would be supported OK. I'd be 
less inclined to use UUID for what you're doing.



More information about the blfs-support mailing list