You are not logged in.

#1 2018-05-04 05:09:37

Registered: 2017-10-07
Posts: 4

Installing Arch from existing Linux but copy chroot instead

I have a server that is currently running Debian 9 and I would like to replace the OS with Arch without having to wipe the drive. The HDD is 4TB and only has 16GB free, so if I followed this: … ting_Linux I would have to resize the two partitions and copy files from the old partition to the new partition 16GB at a time until all of the data was copied. Could I instead install arch in a chroot, delete everything in / I don't want, and then copy everything in / of the chroot installation (excluding /dev /run /proc etc.) to the root of the old partition? What kind of problems would I run into doing this "backwards?"


#2 2018-05-04 12:10:05

Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,153

Re: Installing Arch from existing Linux but copy chroot instead

This seems slightly backwards. Why not delete everything you don't need on the HDD *first*, then install arch on top? Arch Linux's pacstrap command used in the installation process does not care if there's already content there. It should just throw file conflict errors if it tries to install files which already exist... but the base system at least shouldn't conflict with anything you need to preserve. Obviously /home won't conflict with anything.

Deleting / and copying things over and resizing the / partition etc. cannot be done while booted into / for obvious reasons... so I'm not sure how the "Install from existing linux" directions are relevant.

Managing AUR repos The Right Way -- aurpublish (now a standalone tool)


#3 2018-05-04 12:55:26

Registered: 2010-05-06
Posts: 5,138

Re: Installing Arch from existing Linux but copy chroot instead

I do this regularly. I don't use separate system partitions (beyond the UEFI stuff) on most devices*, because the root partition is NEVER big enough while wasting precious HDD space by being TOO BIG at the same time in some sort of Schrödinger's Partitioning Scheme. Delete everything that's not data and rename everything you want to keep but are not sure whether it'll cause conflicts, then use pacstrap normally like Eschwartz suggested, from the normal Arch installer. No need for fancy hoops.

* Most devices mostly being Laptops with only one drive. I generally prefer to have a drive only for the OS.

Last edited by Awebb (2018-05-04 12:56:56)


#4 2018-05-06 16:07:45

Jens Clasen
Registered: 2018-01-27
Posts: 14

Re: Installing Arch from existing Linux but copy chroot instead

That's about exactly what I did with my server system. I prepared the whole install inside a virtual machine, I configured and tested and only afterwards I've made the directories available, moved away everything I didn't need any longer and replaced it with the directories and links from arch. The whole downtime was less than an hour and the whole thing worked like a charm.

I wouldn't do a fresh install inside an old partition, though. The major benefit of a chroot or virtual machine install is that you can setup the whole thing, while the old system is still up and running, therefor you're definitely have less downtime with the install and copy over approach.

Regards, Jens

Last edited by Jens Clasen (2018-05-06 16:08:24)


Board footer

Powered by FluxBB