Re: Move directory from one petition/device to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cameron Beattie wrote:
I would like to move a directory from one petition to another. For example /dev/sdb1 is mounted on /.
I would like to move directory /etc to /dev/sda2.

Could anyone offer advice on the easiest way to achieve this?

It is, unfortunately, impossible. The way that file systems get
mounted is under the control of /etc/fstab, which must be present
during boot. You have a "chicken-and-egg" problem with this.
If you move /etc to a partition/file system other than the
initial root, then there is no way to mount it, because the control
file telling the system how to do that is on the unmounted
partition.

I have had a look at dd but that seems to allow for copying files or an entire device, not a directory.

You can use tar for doing that sort of thing, or cpio, but you can't
move /etc.


Many thanks

Cameron


--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux