-2

I want to backup the SSD of a new laptop so that I can safely reinstall it (no user data, just system). I want to backup all necessary boot info too (e.g. MBR). I want to create an image stored in an external HD.

I was planning to use dd to clone the complete disk, including MBR. However, all examples I find use sda / sdb devices and SSD seem to use a different naming convention.

fdisk -l shows /dev/nvme0n1 as disk, and /dev/nvme0n1p1 to /dev/nvme0n1p4 partitions. However, if I list /dev, there is also a /dev/nvme0 entry.

Should I care about nvme0? Or which name should I use as input to get a complete backup?

Btw, would it be better to use bin image or iso image?

Would the following command achieve my objective?

dd if=/dev/nvme0n1 | gzip > /mnt/externalHD/backupimage.bin.gz

Feel free to suggest alternatives to dd if there are better ones for this purpose.

  • This question is opinion based and very broad. Better ask one precise question at once. – Jonas Stein Jan 2 at 13:47
2

The 'sd' in "sda" refers to the device type; it used to mean SCSI, but now also includes SATA drives in native mode. The devices you are quoting start with 'nvme' and aren't SATA SSDs, but rather SSDs attached using the NVME bus. You should read a modern tutorial on Linux device names to better understand what you are looking at and avoid making a mistake. Also, device naming is distribution-dependent; ie does the distro use UDEV or something else to manage devices.

However, if you don't want to read up on device names, and you are using Linux, here's a quick answer. /dev/nvme0n1p4 refers to NVME bus 0, device 1, partition 4. You probably have Windows 10 installed on the drive you are referencing; meaning that p1 is the system partition (containing the bootloader and info required to boot) and p4 the boot partition (containing the OS itself). You want both of these if you wan't to restore the laptop to how it was shipped. You can use dd to back them up individually. However, since you are new to Linux/etc. I would suggest you use a GUI tool to do this such as Clonezilla.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.