Skip to content

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.

109 points39 comments
Open on Reddit
About this post
Posted
Archived
Score
109 · 100% up
Kind
Text
ID
bmbbe3

Author

11
posts
19
comments
2
media
View profile

40 comments

Yup. Its also doable with qemu.

37 points

Real users use QEMU.

35 points

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.

2 points

I did the opposite. Used QEMU to pass in my second SSD to install Windows. Worked perfectly.

12 points

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.

2 points

It's easier than you think. You are already an Arch user. You just need invest some time on it.

2 points

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)

1 points

eh.... bootstrap + chroot not good enough???

11 points

Chrooting doesn't start an operating system, it just switches your current one's root directory. If you type uname -a in a chroot, you still see your running OS.

6 points

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...

9 points

I needed to install wifi drivers and didn't have access to a ethernet cable.

1 points

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.

1 points

This is neat! It's clever things like this that remind me every day why I love Linux.

7 points

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 ?

3 points

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?

4 points

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

2 points

That sounds cool, but I can't find usage for that. Can someone tell me, for what it can be used?

3 points

I didn't have access to an ethernet cable and needed to install wifi drivers. Also if you want to read documentation while installing.

2 points

Oh man, I am totally going to do this from now on! Thanks!

1 points

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.

1 points

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.

1 points

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!

1 points

You can also clone your system using rsync (with a couple modifications to config files)

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.