# SLES 11 SP2 Creating bootable image

**URL:** <https://forums.suse.com/t/sles-11-sp2-creating-bootable-image/30641>\
**Category:** SLES Install-Boot\
**Created:** [December 7, 2017, 10:23am UTC](https://forums.suse.com/t/sles-11-sp2-creating-bootable-image/30641 "2017-12-07T10:23:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alokpandey](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alokpandey](https://forums.suse.com/u/alokpandey)\
**Post date:** [December 7, 2017, 10:23am UTC](https://forums.suse.com/t/sles-11-sp2-creating-bootable-image/30641/1 "2017-12-07T10:23:19Z")

</div>

I have a running SLES 11 SP2 physical server (Dell R series). I wish to create its image on a usb hard disk such that I can install its exact replica on another physical server. Is it possible? If yes, what is the best method to do so?

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [December 7, 2017, 1:21pm UTC](https://forums.suse.com/t/sles-11-sp2-creating-bootable-image/30641/2 "2017-12-07T13:21:41Z")

</div>

On 07/12/17 08:24, alokpandey wrote:  
[color=blue]

> I have a running SLES 11 SP2 physical server (Dell R series). I wish to  
> create its image on a usb hard disk such that I can install its exact  
> replica on another physical server. Is it possible? If yes, what is the  
> best method to do so?[/color]

Is the new physical server exactly the same make, model, hardware  
specification, etc. as the running one?

Obviously the USB hard disk storage would need to be larger than the  
running server’s disk(s) - this could come done to bytes as formatted  
capacity will be less than advertised capacity. USB hard disk will also  
need to be formatted with a file system that can take large files (I’m  
guessing your hard disks are bigger than 2-4GB!).

I would boot the running server from a rescue disk then use dd to make  
an image of the disk(s) saving them to the USB hard disk. Note image the  
disk(s) not the individual partitions.

Use something like “dd if=/dev/sda of=/mnt/usb/disk1.img” where /dev/sda  
is the disk to image and /mnt/usb is where USB hard disk is mounted.

You can then boot the new server from the same rescue disk then copy  
image to hard disk with something like “dd if=/mnt/usb/disk1.img  
of=/dev/sda”.

If it’s the same hardware, etc. it should then boot though the network  
configuration will need adjusting to take account of different MAC  
addresses.

If it’s not the same hardware then you may need additional and/or newer  
drivers. Storage could be different so disk may not be /dev/sda.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![Andreas1](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Andreas1](https://forums.suse.com/u/Andreas1)\
**Post date:** [December 26, 2017, 11:41am UTC](https://forums.suse.com/t/sles-11-sp2-creating-bootable-image/30641/3 "2017-12-26T11:41:59Z")

</div>

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/documentation/en-us/red\_hat\_enterprise\_linux/7/html/storage\_administration\_guide/xfsbackuprestore](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/xfsbackuprestore)

[https://forums.suse.com/showthread.php?10294-about-partition&p=40594#post40594](https://forums.suse.com/showthread.php?10294-about-partition&p=40594#post40594)

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

[CODE]Boot from SLED Installation-DVD. Press button . 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/ /dev/sda1

# xfsdump -l 0 -f /usr/lib/microcode/backup/Linux/ /dev/sda5

# df -h

# umount /dev/sdb1

# umount /dev/sda1

# umount /dev/sda5

# mount

# poweroff

Remarque: „-l“ =\> small “L” like „Level“.[/CODE]

[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 /usr/lib/microcode/root

# xfsrestore -f /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]

[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[/CODE]
