Last active
October 8, 2017 09:57
-
-
Save pantuts/1102f9ec93d0fe8880ad2c892226a341 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Partitions | |
- HDD as /dev/sda | |
-- /boot sda1 ext4 | |
-- /swap sda2 swap | |
-- /root sda3 ext4 | |
-- /home sda4 ext4 | |
- SSD as /dev/sdc | |
Download Arch or Arch based distro (Manjaro). I use Manjaro for GUI. | |
Boot LiveCD. | |
Locate partitions, try: | |
`sudo blkid` | |
- Will list partitions with its UUID. Note all UUIDs. | |
Partition SSD to reflect similar partitions to HDD. | |
Mount HDD partitions. | |
Then mount SSD partitions. | |
``` | |
mkdir /mnt/boot /mnt/root /mnt/home | |
sudo mount /dev/sdc1 /mnt/boot | |
sudo mount /dev/sdc3 /mnt/root | |
sudo mount /dev/sdc4 /mnt/home | |
sudo cp -afp /DIRECTORY_OF_MOUNTED_HDD_BOOT/. /mnt/boot | |
sudo cp -afp /DIRECTORY_OF_MOUNTED_HDD_ROOT/. /mnt/root | |
sudo cp -afp /DIRECTORY_OF_MOUNTED_HDD_HOME/. /mnt/home | |
sudo umount /dev/sdc1 | |
sudo umount /dev/sdc4 | |
``` | |
Edit `sudo vi /mnt/root/etc/fstab` to reflect UUIDs of SSD partitions. | |
Then `sudo umount /dev/sdc3` | |
Unmount all HDD partitions. | |
And then. | |
``` | |
sudo mount /dev/sdc3 /mnt | |
sudo mount /dev/sdc1 /mnt/boot | |
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done | |
sudo chroot /mnt | |
grub-mkconfig -o /boot/grub/grub.cfg | |
exit | |
sudo reboot | |
``` | |
References: | |
http://blog.oaktreepeak.com/2012/03/move_your_linux_installation_t.html | |
https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows/88432#88432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment