Most of this comes from https://wiki.qemu.org/Documentation/Platforms/m68k
Download the ISO image:
wget https://cdimage.debian.org/cdimage/ports/current/m68k/iso-cd/debian-10.0-m68k-NETINST-1.iso
Make a 10G disk image:
qemu-img create -f qcow2 m68k-deb10.qcow2 10G
Extract these files from from debian-10.0-m68k-NETINST-1.iso
:
/install/cdrom/initrd.gz
/install/kernels/vmlinux-4.16.0-1-m68k
Install from CD image:
qemu-system-m68k -boot d \
-M q800 -serial none -serial mon:stdio -m 1000M \
-net nic,model=dp83932 -net user \
-append "console=ttyS0 vga=off" \
-kernel vmlinux-4.16.0-1-m68k \
-initrd initrd.gz \
-drive file=m68k-deb10.qcow2,format=qcow2 \
-drive file=debian-10.0-m68k-NETINST-1.iso,format=raw,media=cdrom \
-nographic
Use the following for the source for network-based installation:
- Server: http://ftp.ports.debian.org
- Directory: debian-ports/
After installation, extract the kernel and initrd from the hard disk image:
sudo qemu-nbd --connect=/dev/nbd0 m68k-deb10.qcow2
Extract /boot/vmlinux-4.16.0-1-m68k
Extract /boot/initrd.img-4.16.0-1-m68k
sudo qemu-nbd --disconnect /dev/nbd0
To boot from the HD image, you can use:
./qemu-system-m68k -boot c \
-M q800 -serial none -serial mon:stdio -m 1000M \
-net nic,model=dp83932 \
-net user,ipv6=off,id=mynet0,dns=10.10.1.1 \
-append "root=/dev/sda2 rw console=ttyS0 console=tty" \
-kernel vmlinux-4.16.0-1-m68k \
-initrd initrd.img-4.16.0-1-m68k \
-drive file=m68k-deb10.qcow2,format=qcow2 \
-drive file=debian-10.0-m68k-NETINST-1.iso,format=raw,media=cdrom \
-nographic
I can only ssh
to a local box; Internet connectivity isn't working.
So I'm running a web proxy on 10.10.1.90:8123 as shown by the apt
configuration below.
Seems the kernel cannot cope with big TCP windows, so lower them:
net.core.rmem_default = 32767
net.core.rmem_max = 32767
net.core.wmem_default = 32767
net.core.wmem_max = 32767
net.ipv4.tcp_rmem = 4096 16384 32767
net.ipv4.tcp_wmem = 4096 16384 32767
The apt
repository http://ftp.ports.debian.org isn't signed, so we need
to do come configuration to ignore this.
apt.conf:
Acquire::http::Proxy "http://10.10.1.90:8123";
Allow-Insecure "true";
Allow-Downgrade-To-Insecure "true";
sources.list:
deb http://ftp.ports.debian.org/debian-ports sid main
apt.conf.d/99fred:
APT::Get::AllowUnauthenticated "true";
Then do:
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update --allow-unauthenticated
followed by:
apt-get update --allow-unauthenticated
These seem to ensure the system ignores the missing keys and updates the list of packages.
Then you can apt-get install
after that. I installed gcc
to get a C compiler.
Thank you.
The link to the ISO was broken.