<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am attempting to create a bootable copy of a running SELinux box on FC9. I think I am close but I am coming up with a kernel panic (text at end) Here are the steps and a brief reason. If anyone has any suggestions where I might have made a mistake or left something out a comment would be appreciated. The only requirements so far is that it has to be a disk to disk copy with no CD/DVD rescue involved and it has to use LVM Snapshot.<br><br>The original looks like<br><br>mbr on boot sector<br>/dev/sda1  ext3 /boot<br>/dev/sda2  LVM<br><br>VolGroup00/LogVol00 is root<br>VolGroup00/LogVol01 is swap<br><br>This is what I am doing.<br><br>• This seemed like an efficient way to dup the filesystems of the source to the target.<br>sfdisk -d /dev/sda | sfdisk /dev/sdb<br><br>•Duplicate the MBR<br>dd if=/dev/sda1 of=/dev/sdb1 bs=512k<br><br>•Copy the entire /boot from a to b<br>dd if=/dev/sda of=/dev/sdb bs=664 count=1<br><br>•Add the /dev/sdb2 to LVM<br>pvcreate /dev/sdb2<br><br>create the VolGroup for /<br>vgcreate -s 32m VolGroup01 /dev/sdb2<br><br>Create the logical volume for / and swap<br>lvcreate -l 1562 -n LogVol00 VolGroup01<br>lvcreate -l 62 -n LogVol01 VolGroup01<br><br>Create the swap area<br>mkswap /dev/VolGroup01/LogVol01<br><br>Format the / filesystem<br>mkfs -t ext3 /dev/VolGroup01/LogVol00<br><br>Create the snapshot<br>lvcreate -L 20g -s -n snap /dev/VolGroup00/LogVol00<br><br>Mount the snapshot<br>mount /dev/VolGroup00/snap /snapshot<br><br>Mount the target<br>mount /dev/VolGroup01/LogVol00 /target<br><br>Rsync over the snapshot<br>rsync -vXxpr  /snapshot/* /target<br><br>Unmount the snapshot<br>umount /snapshot<br><br>lvremove -f VolGroup00/snap<br><br>At this point I fixed the initrd, the fstab and grub.conf on the target to point to VolGroup01 instead of VolGroup00.<br><br>I would think this should be it.<br><br>What I get is.<br><br>root (hd0,0)<br>Filesystem type is .....<br>kerne /vmlinuz ......<br>Linux bzimage.....<br>initrd / initrd ....<br>Linux initrd<br><br><br>Decompresing Linux ... Done<br>Booting the kernel<br>Red Hat nash version 6,0,52 starting<br>Reading all physical volumes this make take awhile ....<br>Found volume group VolGroup01 now active<br>ERROR: exec of init (/sbin/init) failed failed!!!! No such file or directory<br>ERROR:  failed in exec of /bin/echo: No such file or directory<br>a couple messages about not finding /bin/sleep<br>Kernel Panic<br><br>I am not really sure where this is getting to. I thought it was getting to the initrd but now I am not sure.<br><br>Thanks Nick<br><br><br>--<br>fedora-selinux-list mailing list<br><a href="mailto:fedora-selinux-list@redhat.com">fedora-selinux-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/fedora-selinux-list">https://www.redhat.com/mailman/listinfo/fedora-selinux-list</a></body></html>