On Mon, Mar 14, 2016 at 3:43 PM, Per Jessen
cagsm wrote:
Now I have again a similar situation only this time I cannot use the same hdd again so different manufacturer this time and maybe or most probably different number of sectors here, so I cannot sector by sectory copy I guess.
what is the official way to re-create the boot mechanism of an opensuse / leap 42.1 properly from say usb key and rescue mode and then going into chroot?
I'm not sure quite what you're asking, but I copy systems around fairly frequently, either for cloning an existing system, moving physical to virtual or just moving hardware.
a) prepare the target filesystem - mkfs <fs-of-your-choice>. Depending on the situation, to do this you may need to boot a rescue system or Knoppix or some such.
Using default Leap layout this could be quite challenging - you need to create the same subvolumes and mount in the same place. So it is more than just mkfs.
b) mount target filesystem, rsync <sourcefs> to <targetfs> (excluding /dev, /proc and /sys). mkdir /dev /proc /sys.
Before continuing: Edit /etc/fstab, /etc/default/grub_installdevice, may be /boot/grub2/device.map, may be /etc/crypttab, may be /etc/mddadm.conf (different device paths, different UUIDs - replace with new ones).
c) re/create the initrd on target system: (mount -bind /proc proc ..... chroot, dracut ...).
d) reinstall your favourite boot-loader. (I use lilo, never got used to grub).
I've probably left something out.
In general, any place where disk device is referenced directly may need update. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org