...
In case the replacement HDD is the same size and has the same partitions as a working HDD, the partitions can be created and GRUB installed in a single command. Assuming sda is the working HDD, partitioned with an MBR and sdb the replacement:
Code Block |
---|
dd if=/dev/sda of=/dev/sdb bs=512 count=1 |
...