I have two disks each with two partitions, one SSD (/dev/sdb
) which had the main boot partition and another HDD (/dev/sda
) for backup.
Then I cloned the SSD's main partition (which had the boot) with dd
, within a USB live environment, to a partition in the backup HDD:
dd if=/dev/sdb2 of=/dev/sda2
Now, after I rebooted, the system is starting/booting from the cloned partition /dev/sda2
!!!
How do I set which partition the system should startup/boot? I want to startup with /dev/sdb2
and NOT /dev/sda2
, because SSDs are much faster than HDDs.
Further info:
Relevant output of fdisk -l
for both disks:
Disk /dev/sda: 1,84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20EZAZ-00L
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 350C6598-6531-43D3-9303-26B80124EDDA
Device Start End Sectors Size Type
/dev/sda1 2048 1953128447 1953126400 931,3G Linux filesystem
/dev/sda2 1953128448 3907028991 1953900544 931,7G Linux filesystem
Disk /dev/sdb: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 870
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 881AE800-FEC8-4EEA-B0C5-5CAE0E2B47F2
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 1953523711 1952473088 931G Linux filesystem
Relevant output of lsblk
:
...
sda 8:0 0 1,8T 0 disk
├─sda1 8:1 0 931,3G 0 part /mnt/backupA
└─sda2 8:2 0 931,7G 0 part /
sdb 8:16 0 931,5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 931G 0 part