You are not logged in.
Pages: 1
Hello,
I want to install Arch through a VPN/offline, and thus I'm looking into installing it to a VM and then move it out of it and then "installing" on a real non VM partition since the offline installation guide seems to be outdated and I want to do it without unnecessary problems since it's my first time installing Arch. I want to replace current kubuntu partition with Arch, I'm also dual booting with Windows 10 with GRUB and want to replace it with systemd-boot.
How should I proceed after transfering the system from the VM via rsync (to a second disk)? The guide doesn't cover it afterwards, only states "Boot a 'live' GNU/Linux distribution, mount the root partition and chroot into it."
I'm probably missing something obvious. Should I boot eg. an Arch install USB medium, format the kubuntu partition, rsync the transferred system to that partition from that second drive and then proceed as in the guide (mount root, chroot, reinstall bootloader/boot manager, edit fstab, re-generate the initramfs image)?
What's the correct way to install Arch on a real partition when moved out of a VM? Also, will it retain the whole system including DE, installed packages, configs etc.?
Are there any additional caveats while using this method, isn't it a somewhat dirty way that could cause trouble in the future?
Last edited by belmokhtar (2021-02-21 17:17:17)
Offline
I'm probably missing something obvious. Should I boot eg. an Arch install USB medium, format the kubuntu partition, rsync the transferred system to that partition from that second drive and then proceed as in the guide (mount root, chroot, reinstall bootloader/boot manager, edit fstab, re-generate the initramfs image)?
Sounds good.
Assuming a raw VM image, you could also store that on an external medium right away and save one large copy operation. (Unless the image is not partitioned, you'll need to use losetup or mount the image's filesystem(s) with an offset from the Live System.)
Also, will it retain the whole system including DE, installed packages, configs etc.?
Yes, `rsync' should create an equivalent copy of the filesystem, given the correct options. In addition to those specified in the Wiki, I'd suggest `--hard-links --sparse --numeric-ids' (see rsync(1)).
To be sure, you could use `dd' instead to create an exact copy of the (raw) image / the partition(s) on it (likely takes more time). This should be done when the VM is off-line.
Are there any additional caveats while using this method, isn't it a somewhat dirty way that could cause trouble in the future?
Using `rsync' with the wrong options might cause problems somewhen later. Also, copying the file tree from a running VM (might yield an inconsistent state). I'd suggest to halt the VM and mount the image directly (if possible).
Using `dd' with an offline vm image is IMHO the safest way - assuming you specify the correct target partition(s) (You have backups, right?).
If you have free space on the disk (or can arrange it), you could also install Arch directly in there. Either using arch-install-scripts from within KUbuntu, or providing qemu (or some other vmm that works) directly with the main disk (e.g., /dev/sda). (Definitely do not do this without backups.)
Addendum: `--numeric-ids' is indeed not necessary when running rsync in the running VM (which I do not recommend).
Addendum': Added `-HS' / `--hard-links --sparse' to the Wiki.
Last edited by respiranto (2021-02-13 10:43:44)
Offline
Thanks for the reply and sorry for late response, I succeeded in the end, marking the thread as solved, system seems to be working great.
Approximate description of the process: I booted Arch install USB, backed up the .img, merged previous /home and / partition into one /, then using losetup with loop and dd the .img there, everything looked alright except mkinitcpio because the EFI partition was obviously missing the files from the VM EFI partiton. So I booted into my MXLinux Live USB GUI (for safety reasons), rsynced the EFI partition as a backup to be sure and then while booted back in Arch install USB rsynced the needed files to the EFI partition.
Offline
Pages: 1