Clone a block device to another
Use GNU ddrescue. (Do not confuse with dd_rescue.)
ddrescue -n -f input output mapfile
With mapfile, you can interrupt the copy anytime and resume it later.
Create EFI partition
- Create a primary partition with
fat32
file syste and setesp
flag. - Format the partition
mkfs.fat -F 32 /dev/sdxY
- Mount the partition on
/efi
or/boot/efi
/efi
is a replacement for the historical and now discouraged ESP mountpoint/boot/efi
.- The
/efi
directory is not available by default, you will need to first create it before mounting the ESP to it.
- Install grub (without partition number)
grub-install /dev/sdx
- Generate initramfs image
update-initramfs -u -k all
- Generate grub config file
update-grub
- Reboot
Check S.M.A.R.T
Use smartmontools
smartctl --all /dev/sda