0

I'm trying to run an existing debian img with QEMU, edit it by installing custom packages and adding various configs, verify that it works and then write it to an sd card so I can boot it from a single board computer.

I'm using fedora as my main distro. The debian image I want to install is debian 12 and my single board computer is a rock64 armv8.

The main issues I'm facing are:

  • I dont know if the qemu command below will edit my image after I complete the installation, does anyone know how can I verify with qemu that the installation was successful and the img was written, without booting the installation steps again?
  • When I'm on the debian shell during or after the installation steps, I dont have access to commands like apt-get or apt, I cant use sudo or su (commands not found) and also the home directory is missing (although it was created through the installation steps) and that beats the purpose of the whole attempt.

Some minor annoyances:

  • Extremely slow installation (every attempt it takes me 2-3+ hours), is this normal?
  • the dd command is very slow (1 hour+), is this normal?
  • Pressing ctrl+c when inside the emulation exits qemu (I've done this many times when I'm on shell to cancel commands and resulted on having to do the installation again)
  • The colors contrast of the emulation is poor and same for the viewport (adding a -vga std did not help)

The steps I'm following are:

qemu-system-aarch64 \
    -kernel installer-linux \
    -cpu cortex-a53 \
    -m 1024 \
    -M virt \
    -no-reboot -serial stdio \
    -append "rw root=/dev/mmcblk0p1 panic=0" \
    -initrd installer-initrd.gz \
    -hda debian-installer.img
  • Go through the installation (this is extremely slow - it usually takes 2-3 hours and I did it more than 10 times the last days, as Im trying to figure things out)
  • before completing the installation and rebooting, I go to the shell and try to install new packages and also add some configs for the users I created

If the above succeeds, I want to:

  • Write the img to the sd card: dd if=debian-installer.img of=/dev/mmcblk0
  • Boot the image to the single board computer
4
  • Which image files are you using in that downloads directory? Jul 24, 2023 at 11:34
  • 1
    from the sd-card-images directory I'm using the firmware.rock64-rk3328.img.gz and partition.img.gz combined into one image (as described in the README of that directory). from the debian-installer/arm64 I'm using the initrd.gz and linux (and then I renamed them as you can see in the qemu command)
    – user423896
    Jul 24, 2023 at 11:47
  • It's not feeling impossibly slow at the moment (running on a fairly old Xeon) Jul 24, 2023 at 12:20
  • @roaima are you referring to the emulation speed or the installation speed?
    – user423896
    Jul 24, 2023 at 17:36

1 Answer 1

0

Having tried it here on a Proxmox system running with a Xeon E3-1230 V2 (3.30GHz), the installation process doesn't seem impossibly slow, particularly considering it's entirely emulation. I didn't follow through to the end but it felt like it wouldn't have likely taken more than an hour.

The dd command you're using is very inefficient. Use cat debian-installer.img >/dev/mmcblk0 instead (followed by sync)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .