How to move Ubuntu to an SSD

My existing scenario is:

  • One hard drive
  • Dual boot Ubuntu 11.04 and also Windows 7. Partitions:
    • 100MB Windows System thingy
    • 144GB Main Windows
    • 160GB Ubuntu
    • 4GB Swap
    • 12GB System Restore things

Now I intend to install an 80GB SSD and also relocate Ubuntu to it. AFAIK I require to:

  • Shrink the 160GB Ubuntu partition to 80GB
  • Copy it over to the SSD
  • Change fstab to place the SSD as /

How do I do the 2nd? And also what do I require to do concerning Grub?

2022-06-07 14:37:47
Source Share
Answers: 2

Considering your HDD is/ dev/sda and also SSD is/ dev/sdb and also dividings are effectively sized, you might make use of straightforward cp:

cp /dev/sdaX /dev/sdbY

Where X and also Y are equivalent dividing numbers.

Nonetheless this method will certainly replicate 80GB of information and also all fields on your SSD will certainly be noted as "occupied" originally.

2022-06-07 15:06:58

1) Copying documents

You intend to replicate the FILES, not the entire dividing (including its vacuum ), so you do not require to resize the dividing first. Boot from the livecd and also place both the HD and also SSD (after formatting a dividing on the SSD certainly ), after that replicate every one of the documents over:

sudo cp -Tax /media/hd /media/ssd

Use the proper names for the hd and also ssd place factors certainly. After that you simply require to modify the/ etc/fstab on the ssd to indicate the new fs UUID (you can look it up with blkid ). Ultimately you require to install grub on the ssd.

2) Dealing with GRUB

a) Command line:

sudo -s
for f in sys dev proc ; do mount --bind /$f /media/ssd/$f ; done
chroot /media/ssd
grub-install /dev/ssd

Of training course, make use of the proper tool for/ dev/ssd. The entire disk, not a dividing number.

b) "Recommended repair" magic switch in Boot - Repair:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Finally reboot and also see to it your biographies is readied to boot from the SSD.

2022-06-07 14:47:34