Post by Paul Post by RobH Post by gerrit Post by RobH Post by Grant Taylor Post by RobH
I've just cloned an existing spinning 80Gb disk to a 120Gb SSD using dd.
Did you clone the entire drive or just the partition(s)?
If you cloned the entire drive, then the MBR, including the partition
table was copied. Though I question if it's correct for the new drive.
If you cloned just the partition, you might have missed things,
including a boot loader.
What command(s) did you run?
Post by RobH
When it finished I swapped them over but the ssd doesn't boot up.
I'm not that surprised.
Post by RobH
Is that normal or should it boot.
dd if=/dev/sda1 of=/dev/sdc bs=64K conv=noerror,sync
thats not good you copied the first partion not the whole disk, you need
Ok, but the disk is sda1 according to sudo blkid
1221069+1 records in
1221070+0 records out
80024043520 bytes (80 GB, 75 GiB) copied, 1714, 37 s, 46.7Mb/s
Now that's just too funny for words.
You're telling us an 80GB drive copied in 37 seconds ??? Um, Nooo.
Install package gddrescue and use executable "ddrescue"
to do the dd transfer instead. Create a logfile so you
can see which sector(s) didn't get transferred.
sudo apt install gddrescue
sudo ddrescue -n /dev/sda /dev/sdc rescued.log # First pass...
gedit rescued.log # examine to see
# if you are curious
sudo ddrescue -r 1 /dev/sda /dev/sdc rescued.log # Second pass
# fix the errored
# It reads
You can use "man ddrescue" to see what
other arguments it accepts. It claims the default
cluster size transferred is 64K (128 sectors).
I started again from scratch:
***@rob-nuc:~$ sudo dd if=/dev/sda of=/dev/sdc bs=64k conv=noerror,sync
1221105+1 records in
1221106+0 records out
80026402816 bytes (80 GB, 75 GiB) copied, 1723.91 s, 46.4 MB/s
***@rob-nuc:~$ sudo ddrescue -n /dev/sda /dev/sdc rescued.log
ddrescue: Output file exists and is not a regular file.
ddrescue: Use '--force' if you really want to overwrite it, but be
aware that all existing data in the output file will be lost.
Try 'ddrescue --help' for more information.
***@rob-nuc:~$ gedit rescued.log
***@rob-nuc:~$ sudo ddrescue --force /dev/sda /dev/sdc rescued.log
GNU ddrescue 1.22
ipos: 80026 MB, non-trimmed: 0 B, current rate: 7364 kB/s
opos: 80026 MB, non-scraped: 0 B, average rate: 42544 kB/s
non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s
rescued: 80026 MB, bad areas: 0, run time: 31m 20s
pct rescued: 100.00%, read errors: 0, remaining time: n/a
time since last successful read: n/a
Installed the ssd and waited for it to boot up. It only got as far as
the Ubuntu menu screen, and after I pressed enter on UBUNTU, it stalled.
Anyways I have solved it now by reinstalling Grub from a live session,
and it boots up just fine.