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.
The original looks like
mbr on boot sector
/dev/sda1 ext3 /boot
VolGroup00/LogVol00 is root
VolGroup00/LogVol01 is swap
This is what I am doing.
• This seemed like an efficient way to dup the filesystems of the
source to the target.
sfdisk -d /dev/sda | sfdisk /dev/sdb
•Duplicate the MBR
dd if=/dev/sda1 of=/dev/sdb1 bs=512k
•Copy the entire /boot from a to b
dd if=/dev/sda of=/dev/sdb bs=664 count=1
•Add the /dev/sdb2 to LVM
create the VolGroup for /
vgcreate -s 32m VolGroup01 /dev/sdb2
Create the logical volume for / and swap
lvcreate -l 1562 -n LogVol00 VolGroup01
lvcreate -l 62 -n LogVol01 VolGroup01
Create the swap area
Format the / filesystem
mkfs -t ext3 /dev/VolGroup01/LogVol00
Create the snapshot
lvcreate -L 20g -s -n snap /dev/VolGroup00/LogVol00
Mount the snapshot
mount /dev/VolGroup00/snap /snapshot
Mount the target
mount /dev/VolGroup01/LogVol00 /target
Rsync over the snapshot
rsync -vXxpr /snapshot/* /target
Unmount the snapshot
lvremove -f VolGroup00/snap
At this point I fixed the initrd, the fstab and grub.conf on the
target to point to VolGroup01 instead of VolGroup00.
I would think this should be it.
What I get is.
Filesystem type is .....
kerne /vmlinuz ......
initrd / initrd ....
Decompresing Linux ... Done
Booting the kernel
Red Hat nash version 6,0,52 starting
Reading all physical volumes this make take awhile ....
Found volume group VolGroup01 now active
ERROR: exec of init (/sbin/init) failed failed!!!! No such file or
ERROR: failed in exec of /bin/echo: No such file or directory
a couple messages about not finding /bin/sleep
I am not really sure where this is getting to. I thought it was
getting to the initrd but now I am not sure.
fedora-selinux-list mailing list