Monday 1 April 2019

Fixing F4 rescue shortcut on Samung laptop from Linux

Introduction


Samsung laptop provides a shortcut to run its Samsung Recovery Solution (SRS) software which allows you to backup the system and/or restore from a image. It involves making a bootable Windows USB flash disk. There are posts on Sammy Mobile that discusses how to do it from another Windows box. This article focuses on how to make the bootable USB Disk from Linux.


Issues with the AdminTool for SRS from 


dosibox made a few ISO images of the AdminTool for SRS. (See the Reference section at the bottom of the page.) Usually a Linux user can make the bootable USB disk with the dd command. 

Unfortunately it does not work with dosibox's images. The resulting USB disk just can't boot. 

That's where ms-sys comes to the rescue. It is nifty little program that creates Windows MBR on your USB device in case your .iso doesn’t contain proper one. Now go ahead install it and let the fun begins.


Note about the AdminTool USB versions


There are a few versions of the Samsung Recovery Solution available. Download the version for the  Windows you intend to install. At least that's what works for me.

AdminTool USB 4 - up to Windows 2000
AdminTool USB 5 - up to Windows 7
AdminTool USB 6 - up to Windows 8 (it might work for Windows 10)


Before we begin making the bootable USB, download the correct version of AdminTool USB image.


Making the bootable USB


Consider the USB disk is /dev/sdb. Run
cfdisk /dev/sdb

Delete all existing partitions and create a new one. Mark it bootable and set 07 for Filesystem Type (NTFS).

In case you can’t see /dev/sdb1, type: partprobe

Make NTFS on sdb1:
mkfs.ntfs -f /dev/sdb1
Be sure to add -f or else you will wait quite some time, since default procedure is long and will zero-write the device.

Now we have to mount the AdminTool USB ISO and our newly created NTFS partition to a mount point. My Samsung laptop will run Windows 7 so I use AdminTool_USB_5.iso:
mkdir /mnt/iso /mnt/memory 
mount -o loop AdminTool_USB_5.iso /mnt/iso  
mount /dev/sdb1 /mnt/usb
Copy the data over:
rsync -av --progress /mnt/iso/* /mnt/usb/

Once finished, type: sync To flush data on USB.


Now the interesting part. Fire up ms-sys program (For Windows 7 I use -7 flag, check help for additional options):
ms-sys -7 /dev/sdb
When it's done, run sync again. 

Now plug the USB disk to your Samsung laptop. Make sure to set it as the first boot device. You should see the boot screen of Windows 7 and after a while the Samsung Recovery Solution screen.

Have fun.


Reference


This post that discusses making the AdminTool for SRS on Windows

Download the AdminTool for SRS images

Creating a bootable Windows USB from Linux

ms-sys