Re: cpio copy linux installation (FC3)?



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@xxxxxxxxx


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: cpio copy linux installation (FC3)?
    ... I used cpio to copy my FC3 installation from one volume to another on the ... make a new LVM partition and filesystem the same size as original ... boot from rescue CD ...
    (Fedora)
  • Re: fsckd
    ... filesystem errors on boot, with the "hit control-D to continue or give root ... to fix the errors with fsck. ... filesystem and inability to reboot. ...
    (Debian-User)
  • Re: fsckd - FIXED
    ... filesystem errors on boot, with the "hit control-D to continue or give root ... to fix the errors with fsck. ... filesystem and inability to reboot. ...
    (Debian-User)
  • Strange case of root filesystem corruption
    ... Yesterday GRUB would suddenly not display the boot menu anymore. ... Looking at filesystems on the disk with the free ufs2tools program, ... Subfolders of / on the same filesystem are affected as well. ... sectors/track: 63 ...
    (freebsd-questions)
  • Re: Cant run WINCE from a flash drive on my AMD M/B
    ... SECTION/END HIVE BOOT SECTION in your registry, ... bootable filesystem, so it won't boot. ... Initializing Memory Mapped File Support ... FS: Creating signal event SYSTEM/DevMgrApiSetReady ...
    (microsoft.public.windowsce.embedded)