cpio copy linux installation (FC3)?
Les Mikesell
lesmikesell at gmail.com
Fri Mar 31 18:00:32 UTC 2006
On Fri, 2006-03-31 at 08:58, Tony Nelson wrote:
> I used cpio to copy my FC3 installation from one volume to another on the
> same machine. It seems to work but I'd like to be sure I've done it
> properly and won't see wierd problems later when I upgrade to FC5. My
> procdeure was to:
>
> make a new LVM partition and filesystem the same size as original
> (actually I resized a FC5t3 partition and filesystem and
> did a "rm -rf /" on it)
> boot from (FC5) rescue CD
> mkdir /mnt/new
> mount /dev/VolGroup00/LogVol02 /mnt/new
> cd /mnt/sysimage
> find . -depth -noleaf -xdev -size -102400K -print0 | cpio -dumpa0 --sparse /mnt/new
> vi /mnt/new/fstab # edit to refer to LogVol02
> # here would have been a good time to: touch /mnt/new/.autorelabel
> umount /mnt/new
> exit
> boot original FC3
> cream /boot/grub/grub.conf # add new stanza for same kernel new LVM
> (gedit couldn't save the file)
> boot new installation with kernel option "enforcing=0"
> (eventually, after much horsing around with locking issues, etc.,
> I decided that selinux was the problem and found the solution,
> which was to setenforce 0, mount the new copy, touch its
> /.autorelabel, unmount it, setenforce 1, and reboot as above.)
>
> Some might say that I should have used dump and restore. Is there an
> advantage over using cpio? I could have just used dd, but I tried cpio both
> as a learning experience and in order to optimize the filesystem.
I think dump/restore is now supposed to take the extended attributes
that selinux needs. Other than that, 'cp -a' would be just as
good or 'tar -cf - ... | (cd target_path; tar -xpf - )'
--
Les Mikesell
lesmikesell at gmail.com
More information about the fedora-list
mailing list