--
Mike Gore - 2021-10-01
Custom Clonezilla USB Key for UEFI installations
- For more then on image I suggest a fast 128GB key with known high speed read and write specs
Requirements
- We assume you will be building the USB key on a Linux computer
- Assumptions:
- You have a fast USB key with > 64GB space Note: even at 30MB/s it will take over a half hour to create the key - so faster is better
- You have root access on your Linux computer via sudo
- Physical access to USB ports attached to the system
- An account on asimov.uwaterloo.ca - all CSCF staff have one
- Network access to asimov.uwaterloo.ca
Location of images on ASIMOV
- Location *asimov:/coregroup/images/research/CSCF-CLONEZILLA-USB-KEY
Creating a USB key using automated scripts
- Open a terminal window on your linux system
- Get the two scripts that you will need
- In the terminal window run the command dmesg -w
- Insert the usb key and note any NEW message that appear. You are looking for the block device name such as [sdf]
- Example output of dmesg -w
[441958.259714] usb 9-2.4: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[441958.282160] usb 9-2.4: New USB device found, idVendor=0781, idProduct=55a3, bcdDevice= 1.00
[441958.282162] usb 9-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[441958.282164] usb 9-2.4: Product: SanDisk 3.2Gen1
[441958.282165] usb 9-2.4: Manufacturer: USB
[441958.282166] usb 9-2.4: SerialNumber: 010160253a1d8f5d6947b26fdaae692d2d062441d07caff0178ab93935e1b8ee247500000000000000000000521a62e4ff0e1700a355810735aacb8d
[441958.287971] usb-storage 9-2.4:1.0: USB Mass Storage device detected
[441958.288217] scsi host9: usb-storage 9-2.4:1.0
[441959.296658] scsi 9:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[441959.297039] sd 9:0:0:0: Attached scsi generic sg8 type 0
[441959.297242] sd 9:0:0:0: [sdh] 240353280 512-byte logical blocks: (123 GB/115 GiB)
[441959.297816] sd 9:0:0:0: [sdh] Write Protect is off
[441959.297818] sd 9:0:0:0: [sdh] Mode Sense: 43 00 00 00
[441959.298589] sd 9:0:0:0: [sdh] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[441959.339906] sdh: sdh1
- press CTRL+C to break out of dmesg -w
- run the command ./makeusb.sh /dev/sdh username
- You will be prompted twice for your CS-GENERAL password on asimov.uwaterloo.ca
- Notes:
- The first prompt will take about a minute or two and then you will be prompted for your password again to copy the images
- Grab a coffee this will take a while - when the script finishes you can remove the usb key
Manual Key creation steps - OLD manual instructions - kept only for reference
Download Clonezilla
Format USB key on Linux
Install Clonezilla on USB Key
- Open a terminal window
- sudo bash to become root
- dmesg -w
- Plug USB key back into computer
- On most systems the partitions will auto mount and you will get two popup windows showing the contents of CLONEZILLA and IMAGES
- If not you will see the same messages as before followed by something like this sdh: sdh1 sdh2
- The numbers are the partitions
- CTRL+C to exit dmesg -w
- mount the partition manually if required like this: mount /dev/sdh1 /mnt - change sdh1 with the your device
- Unzip the clonezilla image into /mnt
- Easy way is to cp clonezilla-live-*-amd64.zip /mnt*
- unzip -x clonezilla-live-*amd64.zip
- copy the grub.cfg file to /mnt/boot/grub
- cd /
- umount /mnt
Adding images to the USB key
- You can boot the USB key if you have secure boot enabled and pick the CSCF menu item to add images
- The images are saved in the second partition by default
- You can also copy the images to the images partition as follows:
- Open a terminal window
- sudo bash to become root
- dmesg -w
- Plug USB key back into computer
- On most systems the partitions will auto mount and you will get two popup windows showing the contents of CLONEZILLA and IMAGES
- If not you will see the same messages as before followed by something like this sdh: sdh1 sdh2
- The numbers are the partitions
- CTRL+C to exit dmesg -w
- mount the partition manually if required like this: mount /dev/sdh2 /mnt - change sdhs with the your device
- Copy any images you want to /mnt for example : cp -r win10-21h1-updates-drivers-sysprep-t470s-2021-10-01-20-img /mnt
- cd /
- umount /mnt
Adding a custom menu item to grub.cfg