TIL that you can install and repair Arch using Virtualbox.
You guys might already know this, but I found it out today and I think it's pretty cool. You can can use a physical disk in virtualbox like this, and also insert the install ISO. Just boot into that, install, and restart the physical hardware into your new Arch installation.
About this post
- Posted
- Archived
- Score
- 109 · 100% up
- Kind
- Text
- ID
- bmbbe3
40 comments
Yup. Its also doable with qemu.
Real users use QEMU.
Real users use kvm directly.
I have QEMU running in virtualbox at one point, I forget the exact reason why. But QEMU in Linux was the only thing that supported whatever I was running in QEMU.
And Docker, you can mount `/` to a vm, that's an exploit to get root on servers where you don't have sudo but they gave you docker
hmmm, that sounds like a bug tbh.
I did the opposite. Used QEMU to pass in my second SSD to install Windows. Worked perfectly.
Damn I could install archlinux etc. But never gotten Qemu and virt-manager to work and get the network etc. Felt like every step forward was a step backward. Envious on people who could get more complicated things done by it.
It's easier than you think. You are already an Arch user. You just need invest some time on it.
How are you trying to do it? I find the archwiki instructions to be very clear. Very hard to screw up unless you skip reading parts.
I installed arch on very problematic hardware aswell, and it is the easiest to install compared to ubuntu lets say (that doesn't have a lot of my device drivers to begin with)
eh.... bootstrap + chroot not good enough???
Chrooting doesn't start an operating system, it just switches your current one's root directory. If you type
uname -ain a chroot, you still see your running OS.It serves the same purpose, just without the massive overhead of a VM.
From within the current running system:
Format and partition the drive, mount the root and boot partitions, bootstrap, chroot, pacman, configure, reboot.
For Arch, it is the same process as the disc installation, but without the ISO or VM...
I needed to install wifi drivers and didn't have access to a ethernet cable.
When you bootstrap a new drive/partition from a running system, you are already connected to the internet from your running system... you install the WiFi drivers by mounting the partition, chrooting into that partition and running pacman to install the WiFi driver into that environment.
It’s ridiculously simple, there’s nothing to gain from using a VM to install Arch unless your end goal is a VM.
Again, partition your new drive, mount it, bootstrap it, chroot it, install your needed packages through pacman, copy your home dir / dot files, efibootmgr your new installation’s EFI stub and reboot.
Yeah, I did that one time when I didn't have a flash drive handy. Pretty neat!
Now neat is that!
This is neat! It's clever things like this that remind me every day why I love Linux.
I will pass as an idiot but I don't understand the idea. Compared to booting the machine with a arch live usb for instance, any differences ?
It means you have a full GUI desktop on which you can keep a browser open at the Arch Wiki for reference - or any other resources you require.
Maybe?
But you need a second pc for it anyway, so you can just surf on that? The only case where it's useful is if you have 2 OS's on the same machine on different hard drives
That sounds cool, but I can't find usage for that. Can someone tell me, for what it can be used?
I didn't have access to an ethernet cable and needed to install wifi drivers. Also if you want to read documentation while installing.
Well, then it is really useful. Thanks for answering!
Oh man, I am totally going to do this from now on! Thanks!
Best way I've found to image and reinstall drives outside the host. Just fire up some kind of VM host (+1 for QEMU) and get it done.
10 gold stars for sharing!
When I migrated to Arch Linux I kept my Windows installation intact in a separate drive and I can boot into it with QEMU and virt-manager. I was also surprised when it worked perfectly.
Yep, this is what I use in addition to dual-booting on my laptop. Usually I boot straight into Arch, but sometimes I'm already in Windows and want to do whatever with Linux or my data there so I just use the "physical" Arch install through virtualbox. Works great, and it's kind of fun!
You can also clone your system using rsync (with a couple modifications to config files)