Moving/merging a filesystem back into /

Kevin Korb kmk at
Tue Dec 3 07:37:43 MST 2013

Hash: SHA1

On 12/03/13 08:11, Charles Marcus wrote:
> On 2013-12-02 5:55 PM, Kevin Korb <kmk at> wrote:
>> mount /dev/sda3 /mnt/gentoo/ You might have to specify more
>> options here.  Check what they are before you shut down.
> Ok, thinking about this more... since booting off a liveCD means
> I'm not using the systems fstab, so I have to specify the
> filesystem too?
> / is ext3, so just use the same options as in fstab:
> mount -o noatime /dev/sda3 /mnt/gentoo/ ?
> Or do I need to specify the filesystem type?
> mount -t ext3 -o noatime /dev/sda3 /mnt/gentoo/ ?

I would expect to do this.  Also, you should be converting to ext4 not
ext3.  In fact, your kernel probably doesn't even have ext3 in it
anymore.  Standard kernels now use the ext4 code for ext3 mounts.

> Hmmm... and any concerns about the filesystem for /usr changing
> from reiserfs to ext3?

Concerns no.  Lack of terror, yes.  You will no longer be exposed to
an fsck that is almost as destructive as a mkfs.

>> - --numeric-ids won't matter if rsync isn't networking but it is
>> an important one to know about.
> Someone on the gentoo list claimed that because when booting from
> a liveDVD you're essentially accessing the filesystem from
> 'another system', that it was (possibly very) important to use
> --numeric-ids, someone else then backed him up, and no one has said
> anything to the contrary, so... are you sure?

Nonsense.  --numeric-ids disables the ownership translation between 2
different systems when rsync is networking.  When you are booted from
a live environment you still only have 1 user database.  It might
disagree with the one you normally boot from but you still have only 1
so there is nothing to translate.

> Doesn't matter though, since it can't hurt anything, I'll always
> use it regardless... ;)
>> ext[34] can remember acl as a default mount option. I have no
>> idea if reiserfs can do that or not and I recommend against using
>> reiserfs at all.
> I know, but this system was built over 8 years ago (when gentoo
> still recommended reiserfs), and runs like a champ, so no desire to
> 'fix what ain't broke'... anyway, acls are not enabled on it, so no
> worries...

If you ever have an instance where reiserfs needs an fsck you may as
well reformat and restore.  Reiserfs's fsck just deletes almost
everything then declares success.  Reiserfs was never recommended
except for /usr/portage which can always be re-downloaded.  It should
absolutely never be used for anything important.

> ;)
>> For Gentoo if you don't have USE=caps or USE=caps-ng set then
>> you probably don't have and xattrs in /usr
> emerge --info shows neither:
> USE="3dnow acl amd64 bash-completion berkdb bzip2 cli cracklib
> crypt curl cxx dovecot-sasl dri fam fortran gd gdbm iconv mmx
> modules mudflap multilib ncurses nls nptl openmp pam pcre readline
> sasl session snmp sse sse2 ssl tcpd truetype unicode vhosts xml
> zlib"

After you finish with this, try adding caps to that.  It is a
significant security improvement IMO.

> So, no -X...
>> That command will not list symlinks.  Anything it lists is a hard
>> link.
> Weird, you're right... dunno how I confused myself there...
>> - -H is only hard links. Symbolic links are handled in -a.
> Ok, good, thanks, definitely want -H......
>> If you want to watch the --progress output then -P is a perfectly
>> fine shortcut for it.  -p is --perms which is unrelated and part
>> of -a.
> Gotcha, thanks...
>>> So, to be safe, use --numeric-ids...?
>> It won't hurt.  It is just extra typing but it could be
>> considered to be a good habit for when it does matter.
> Understood... and since it can't hurt anything, but can prevent
> serious problems... :)
>> One more thing I didn't mention before...
>> Since /usr is pretty static you could "prime the copy" by doing
>> the rsync initially to / while the system is running.
>> Then you would really only have an mv and and fstab edit to do
>> from your live environment.  You could probably even do those
>> right before rebooting if you are careful.
>> Even on something more dynamic like /home you can still do an
>> initial copy then update it from the live environment.
> Ok, so... if I wanted to do this, would I need to add anything to
> the rsync command on the subsequent run(s)?


> So, looks like the command I'll be using:
> rsync -avHP --numeric-ids /mnt/gentoo/oldusr/ /mnt/gentoo/usr/


> Thanks very much Kevin for your time and help...
> --
> Best regards,
> */Charles/*

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the rsync mailing list