On 2014-08-25 13:38, Robert Moskowitz wrote:
So what is the magic command with all the directories like /dev/ and
/proc/ that you do not want to try and include their contents, but you
still need the directory tree?

I want to move a rootfs from one HD to another, and this seems to be
the most straightforward way.

I use this method:

mkdir -p /mnt/rootfs
mount --bind / /mnt/rootfs
cd /mnt/rootfs
tar -cf /some/other/filesystem/rootfs.tar .


The --bind will bind-mount a fs already mounted under a different
path, but without any of the other mounted file systems under it,
so it will give you the view of the bare rootfs without anything
mounted under it.

Gordan
_______________________________________________
users mailing list
[email protected]
http://lists.redsleeve.org/mailman/listinfo/users

Reply via email to