Results 1 to 3 of 3

Thread: SLES 11 SP2 Creating bootable image

Threaded View

  1. #3

    Re: SLES 11 SP2 Creating bootable image

    Use "dump" and "restore" to create file system images. "Dump" and "restore" are provided by modern, production stable file systems. For example XFS:

    https://access.redhat.com/documentat...sbackuprestore

    https://forums.suse.com/showthread.p...0594#post40594

    Or even better, use a virtual machine (which is hardware independent):
    https://en.wikipedia.org/wiki/Virtual_machine

    Code:
    Boot from SLED Installation-DVD. Press button <F9>. Choose "More" => „Rescue System“
    Login „root“
    # mkdir /usr/lib/microcode/root
    # mkdir /usr/lib/microcode/home
    # mkdir /usr/lib/microcode/backup
    
    # mount /dev/sda1 /usr/lib/microcode/root
    # umount /dev/sda1
    
    # mount /dev/sda5 /usr/lib/microcode/home
    # umount /dev/sda5
    
    # mount /dev/sdb1 /usr/lib/microcode/backup
    # umount /dev/sdb1
    
    # mount
    # df -h
    
    # xfs_repair /dev/sda1
    # xfs_repair /dev/sda5
    # xfs_repair /dev/sdb1
    
    # mount -r /dev/sda1 /usr/lib/microcode/root
    # mount -r /dev/sda5 /usr/lib/microcode/home
    # mount /dev/sdb1 /usr/lib/microcode/backup
    # mount
    # df -h
    
    # Full Backup
    # xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/<image file> /dev/sda1
    
    # xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/<image file> /dev/sda5
    
    # df -h
    # umount /dev/sdb1
    # umount /dev/sda1
    # umount /dev/sda5
    # mount
    # poweroff
    
    Remarque: „-l“ => small "L" like  „Level“.
    Code:
    Complete restore
    => Preparation (boot SLED12 installation dvd ans so on)
    # mount /dev/sdb1 /usr/lib/microcode/backup
    # umount /dev/sdb1
    
    # mount
    # df -h
    
    # xfs_repair /dev/sdb1
    # mount -r /dev/sdb1 /usr/lib/microcode/backup
    
    # umount /dev/sda1
    # umount /dev/sda5
    # mkfs.xfs -m crc=1 -fL root /dev/sda1
    # mkfs.xfs -m crc=1 -fL home /dev/sda5
    
    # mount /dev/sda1 /usr/lib/microcode/root
    # umount /dev/sda1
    
    # mount /dev/sda5 /usr/lib/microcode/home
    # umount /dev/sda5
    
    # mount
    # df -h
    
    # xfs_repair /dev/sda1
    # xfs_repair /dev/sda5
    
    # mount /dev/sda1 /usr/lib/microcode/root
    # mount /dev/sda5 /usr/lib/microcode/home
    
    # xfsrestore -f <image file> /usr/lib/microcode/root
    # xfsrestore -f <image file> /usr/lib/microcode/home
    
    # df -h
    # ls -alh /usr/lib/microcode/root
    # ls -alh /usr/lib/microcode/home
    
    For SSD only:
    # fstrim -v /usr/lib/microcode/root
    # fstrim -v /usr/lib/microcode/home
    Code:
    Install Boot Manager
    => Preparation (boot SLED12 installation dvd ans so on)
    # mkdir /usr/lib/microcode/root
    
    mount /dev/sda1 /usr/lib/microcode/root
    umount /dev/sda1
    
    mount
    df -h
    
    # xfs_repair /dev/sda1
    # mount -o discard /dev/sda1 /usr/lib/microcode/root
    # mount --bind /dev /usr/lib/microcode/root/dev/
    # mount --bind /proc /usr/lib/microcode/root/proc/
    # mount
    # chroot /usr/lib/microcode/root
    # grub2-install /dev/sda
    # grub2-mkconfig -o /boot/grub2/grub.cfg
    # exit        (Exit chroot environment)
    # umount /usr/lib/microcode/root/dev
    # umount /usr/lib/microcode/root/proc
    # umount /dev/sda1
    # mount
    # poweroff
    Last edited by AndreasMeyer; 26-Dec-2017 at 10:44.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •