I've done this a number of times, but there are some tricky manual steps. If you are new to Linux, this method might be daunting (sorry):
I assume you deleted the sda1 partition earlier, which is why you have the unallocated space at the beginning of the disk, the high-level procedure is:
- re-create the sda1 partition
- format the new sda1 partition as ext4
- I recommend you label the new partition something like:
- e2label /dev/sda1 ssdroot1
- mount the new sda1 partition
- copy your current system to the new sda1
- To do this, I use a trick to copy a running system:
Assuming your new sda1 is mounted at /mnt/sda1/:
mount -o bind / /bind
cp -a . /mnt/sda1/
- Finally, you will need to edit the /mnt/sda1/etc/fstab to make the
new sda1 the / (root) partition.
- put the new UUID in place of the sda5 UUID
You can see the UUID and labels by doing:
blkid | grep sda
Before rebooting, make note of the sda1 label or UUID.
For the first boot into sda1 you will need to manually override the root at the grub prompt by editing the boot parameters. Not that these edits only affect this boot, they will not be persisted to disk.
Press 'e' to edit
find the linux line with root=UUID=....
change it to the new UUID, or remove the root=UUID=... and put in root=LABEL=ssdroot1
(assuming you labeled your new sda1 partition)
Press F10 to continue the boot, with any luck you will boot into your sda1 copy of Linux.
Check that you are really in your new Linux:
Once into your new Linux copy, I recommend you run:
Note that the Master Boot Record will still refer to your old sda5 Linux.
If you want to make these changes permanent, so you can remove sda5, you must update the MBR to refer to the sda1 Linux by running, from the sda1 Linux: