How to move Arch installation from USB drive to hard drive
I am dual booting Windows 10 and Arch Linux. I am presently running Arch off of a USB drive, with GRUB set up to boot from the USB drive. I have Windows running on my hard drive, set up with the Windows boot manager to boot into Windows by default - that is to say, the Windows installation came first and then I set up Arch on my USB drive. I've decided I want to give Arch a permanent home on my hard drive, and ideally I'd like to be able to seamlessly move everything over to my hard drive. Can I shrink my Windows partition, use the space to create an ext4 partition, and then somehow move my Arch setup onto that partition? Any and all advice or questions are welcome. Thanks very much!
Solution by PavelPivovarov and nik_tavu worked perfectly. Thanks!
Edited 22 Sep 2021. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 27 · 89% up
- Kind
- Text
- ID
- prn2vu
17 comments
Migrating linux installation from one drive to another is pretty easy, here are the steps to take:
/etc/fstabfile so your mount points will be using new partition/partitions. Optionally if you are using or going to use encryption also update/etc/crypttabaccordingly.rsync is a great tool. Using rsync -aAXH preserves everything (permissions, timestamps, links, etc) . Also you have to exclude the system directories ( /dev , /sys, /proc) and the directory of the destination if you copy from /.
So Let's say that the USB drive is mounted at /mnt.
Then the actual command is:
Did parent comment with this command and got everything working handily. Thank you!
Yes you can just copy the files with
cp -avx src dest
Be sure to mount all partitions beforehand and later don't forget to install GRUB separately
if you're gonna shrink your windows partition, do it in windows. i did it with cfdisk and learned the hard way
cfdisk shrinks partitions, but not filesystems. You can use gparted, parted, or other tools that can shrink the filesystem first.
the issue i'm talking about is windows failing to boot after shrinking the partition, would that be solved by shrinking the fs instead? sorry, i'm new
I am not sure about
parted.gparteddoes shrink both, filesystems and partition. There are tools in ntfs*someting package that can shrink ntfs. It actually works better than doing it from windows - i was able to get more space and it moved the swap too. It is a miracle what you can achieve when windows is not running :-)P.S.: There is also
clonezillaon Arch ISO. I'd probably use that instead ofrsync.Yep, lost the part
tfw the diagnostic program bluescreens too
Use the windows partitioning tool to shrink your windows partition.
dd your existing installation to the new partition.
Set up efi.
https://wiki.archlinux.org/title/Migrate_installation_to_new_hardware
definitely shrink the windows partition in windows, then I would use clonezilla and point it to the partition on the drive that you want to move to. It worked for me a while ago