I am using liveCD to clone the file system from one drive (hdd) to an ssd (I am trying to migrate my system to use SSD)
I mounted /dev/sdb1
(my former hdd) to /media/hdd
I mounted /dev/sda1
(my ssd) to /media/ssd
I am using the command
sudo cp -ax /media/hdd/ /media/ssd/
when I do a dir /media/ssd
I see a folder called hdd !??? Why is this happening?
Update:
Now I will edit the /etc/fstab
on the ssd to point to the new fs UUID ( I will look it up with blkid ).
Here is the output of the command:
cp -ax /media/hdd/* /media/hdd/.* /media/ssd/
The errors that you see there are the reason why I am migrating to SSD. This PC is always up and the HDD seems to have problems.
Now ..should I worry about the hard links not being created ?
Now I will edit the /etc/fstab
on the ssd to point to the new fs UUID ( I will look it up with blkid ).
My next move is to update grub on ssd using the following:
sudo -s
for f in sys dev proc ; do mount --bind /$f /media/ssd/$f ; done
chroot /media/ssd
grub-install /dev/ssd
update-grub
Considering the above and the errors shown in the picture should I expect any problems?
Edit2: I restored GRUB using the procedure described here https://help.ubuntu.com/community/Boot-Repair very easy for a beginner. The above command lines did not work for me
rsync
way in @A.B.'s answer. The IO errors mean the files there are essentially gone for good. Luckily, though, they're all Linux headers. That means that, once you get everything else copied over and you boot from the SSD, you can usesudo apt-get purge linux-headers-generic
thensudo apt-get autoremove
thensudo apt-get install linux-headers-generic
to reinstall the headers.apt-get
, though.