Move Linux partition to Another Hard disk

in #linux8 years ago

My laptop has 128GB SSD, and has both linux and window running short of capacity.
I bought new 275GB SSD, and want to move partition without installing OS's.
As for window, it is easy to move for I installed VHD boot.
However on linux side, I need some tool like Ghost (backing up the whole file system).

I found FSArchiver which is on the System rescue cd.
http://www.system-rescue-cd.org/

Here is my 128GB SSD partition table, linux ext4 and window ntfs.
part_128GB.png

  1. download iso file and burn on CD or make USB stick bootable. (I prefer USB)
  2. prepare a USB external hard disk which is formatted NTFS or EXT4.
  3. put USB and external USB HDD, and boot to USB stick. (You can do pressing BIOS boot select key, for example F10 or F12)
    20170406_141327.jpg
  4. Continue with default boot
    20170406_141401.jpg
  5. You can do job on text console, but GUI would be better.
    % startx
    open terminal, My laptop has high-density LCD so I change font size bigger.
    20170406_141806.jpg
  6. For my case, sda is internal SSD, sdb is external USB HDD, sdc is USB stick
    Mount /dev/sdb1 to /mnt/backup.
    External USB HDD has a NTFS partition and /dev/sda1 (linux native) will be stored.
    20170406_142922.jpg
  7. Now save partition to file : /dev/sda1 to linux_0406.fsa
    % fsarchiver savefs -o /mnt/backup/image/linux_0406.fsa /dev/sda1 -j2
    20170406_145918.jpg
  8. Replace internal SSD and boot systemrescue USB.
    run gparted to make partitions
    20170406_153200.jpg
  9. restore /dev/sda1
    % fsarchiver restfs /mnt/backup/image/linux_0406.fsa id=0,dest=/dev/sda1
    id=0 means first parttion in fsa file (fsa file can contains multiple partitions)
  10. If you failed to boot linux, set /dev/sda1 boot flag in gparted.
    You can find "Manage flags" right click on the partion in gparted, set boot flag.
    comment out swap partition in /etc/fstab
  11. After boot install grub2.
  12. Continue work on NTFS, copying vhd file and run bcdboot.exe.

That's all

Sort:  

cool info! Thanks!

Thanks~~ I hope it helps...