You are not logged in.

#1 2025-09-03 16:59:14

dsl101
Member
Registered: 2025-09-03
Posts: 3

Installing arch-32 in qemu-kvm

I'm trying to set up a 32-bit vm using virt-install, and struggling to get serial console working. This seems to be a known issue on virt-install, in that it requires a kernel argument 'console=ttyS0' to be passed. The 2 options I've found for doing this are (1) editing the ISO, or (2) using the '--location=' and '--extra-args' options of virt-install. For (2), which I've used successfully before with other distributions that offer a file tree install option (e.g. Ubuntu), I tried mounting the arch-32 ISO using nfs. I have '/mnt/arch-32 *(ro,insecure,all_squash)' in /etc/exports and then used 'mount -o loop,unhide -t iso9660 -r /ISOs/archlinux32-2024.07.10-i686.iso /mnt/arch-32'. That mount only contains the following 2 directories:

/mnt/arch-32] # ll
total 10
dr-xr-xr-x 1 root root 2048 Jul 10  2024 ./
drwxr-xr-x 3 root root 4096 Sep  3 13:16 ../
dr-xr-xr-x 1 root root 2048 Jul 10  2024 arch/
dr-xr-xr-x 1 root root 2048 Jul 10  2024 boot/

and pointing virt-install to it, I get the error "Error validating install location: Could not find an installable distribution at '/mnt/arch-32'"

So I then explored customising the ISO to add the kernel arguments there. My process was:

  1. Extract the ISO with '7z x -oarch-32 /ISOs/archlinux32-2024.07.10-i686.iso'

  2. Edit 'boot/syslinux/archiso_sys-linux.cfg'

  3. Replace both APPEND lines with 'APPEND archisobasedir=arch archisosearchuuid=2024-07-10-19-34-54-00 console=ttyS0'

  4. Make a new ISO with 'mkisofs -JRV -no-emul-boot -o /ISOs/qemu-archlinux32-2024.07.10-i686.iso ./arch-32'

The full virt-install command I'm using is:

virt-install \
    --virt-type kvm \
    --name=arch-32 \
    --vcpus=2 \
    --memory=4096 \
    --disk size=15,path=/kvm/images/arch-32.qcow2 \
    --network="bridge=br0" \
    --graphics none \
    --os-variant="linux" \
    --arch="i686" \
    --cdrom="/ISOs/qemu-archlinux32-2024.07.10-i686.iso"

This produces the following output from:

Starting install...
Connected to domain 'arch-32'
Escape character is ^] (Ctrl + ])

and then nothing more, just like when using a file-tree install (using --location) and no '--extra-args console=ttyS0'.

My question for this community really is whether those edits I made to the ISO make sense, or am I misunderstanding how the boot / install process works?

Offline

#2 2025-09-04 07:55:13

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,171
Website

Re: Installing arch-32 in qemu-kvm

I tried real quick with `console=ttyS0,115200` appending after hitting tab when the standard installation CD is booting.
This gives me output to the QEMU serial (qemu-system-i386 -cpu pentium3 -cdrom archlinux32-2023.03.02-i686.iso -hdd test.qcow2
was my call).

Then I got again the syslinux menu. The ISO uses syslinux, so your process is correct to remaster the CD. In theory
there is also an adapted version of archiso in https://git.archlinux32.org/archiso32/ for creating a boot CD from scratch, but
you can probably tell by the age of the last avaiable boot cd, that this might not have worked for some time now. :-)

We should try with the 64-bit CDROM first and see if that works..

Offline

#3 2025-09-04 08:00:36

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 1,171
Website

Re: Installing arch-32 in qemu-kvm

qemu-system-i386 -cpu pentium3 -cdrom archlinux32-2022.12.01-i486.iso  -hdd test.qcow2

with TAB arch32 console=ttyS0

boots, but the auto-login shell is on tty0 (VGA) and on ttyS0 I get a login shell (getty) which
asks for user/password (which doesn't exist for an ISO).

So using the i486 is also not a workaround..

Offline

#4 2025-09-04 14:57:33

dsl101
Member
Registered: 2025-09-03
Posts: 3

Re: Installing arch-32 in qemu-kvm

Thanks—with the qemu-system-i386 command, I end up in a loop; I get the menu, can TAB and add the console argument, but then end up back at the menu (there are 2 Loading... lines I see, but they're too quick to read). Is that what you got too?

Offline

#5 2025-09-04 18:36:26

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 839
Website

Re: Installing arch-32 in qemu-kvm

Yes, exactly. Don't really know. Maybe the serial output can be logged to a file, so it can be inspected afterwards?

Offline

#6 2025-09-05 10:11:07

dsl101
Member
Registered: 2025-09-03
Posts: 3

Re: Installing arch-32 in qemu-kvm

OK, I've now been able to extract & remake the ISO using 7z and mkisofs, and can successfully boot an edited ISO on the ttyS0 console. But, as you say, it ends at the login prompt with the auto-login running on tty0. Since I don't have a graphical environment on this vm host, I can't use virt-viewer easily.

So, is there a route to success by editing configuration files inside the ISO, now that I can do that and still boot the vm? E.g. a way to get the autologin running on ttyS0 instead?

Offline

Board footer

Powered by FluxBB