Be sure to have a current and valid backup of all your important data before messing aroud with disks
Say the third disk is connected as /dev/sdc
, you booted from /dev/sdb
(as you said grub is there), but the running OS is on /dev/sda
. Then dd
would be the simplest way to clone sdb
to sdc
. sdc
should at minimum be equal in size as sdb
First make sure you have the correct devices by issuing mount
(should only show partitions on /dev/sda
) and sudo fstab -l
(if the third disk is new, there should be no partitions on it, or only one FAT or NTFS).
After being very sure (the following will destroy all data on /dev/sdc) you might use different ways:
Use the standard block copy program:
sudo dd if=/dev/sdb of=/dev/sdc bs=1M
This will copy each block from /dev/sdb to /dev/sdc. See man dd
for more information. If you want more options, e.g. a progress indicator, install dcfldd
(should be in the default repositories), and run
sudo dcfldd if=/dev/sdb of=/dev/sdc bs=1M
which will give you a status report every 256 blocks. Adding the option statusinterval=N
will report every N blocks.
After you copied the disk block by block, you will have to adapt the partition table, as this will not reflect the new disk geometry. For that, start gparted
, select the new disk, and resize (enlarge) the last partition to use the whole disk, depending on your partition layout.
If you prefer an all-in-one solution, you may install clonezilla
from the default repositories. This program is able to make partition/disk images and to clone partitions/images (see Clonezilla. I did not work with that for long time, so I cannot give any advice here.