Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex-eri/ae299d0b70b992dc7455691b0a93b5cb to your computer and use it in GitHub Desktop.
Save alex-eri/ae299d0b70b992dc7455691b0a93b5cb to your computer and use it in GitHub Desktop.
Installing debian stretch mipsel on qemu

Installing debian "stretch" mipsel on qemu

Download debian iso

http://cdimage.debian.org/cdimage/release/current/mipsel/iso-cd/debian-9.1.0-mipsel-netinst.iso

Download initrd & vmlinux

http://ftp.debian.org/debian/dists/stretch/main/installer-mipsel/current/images/malta/netboot/initrd.gz

http://ftp.debian.org/debian/dists/stretch/main/installer-mipsel/current/images/malta/netboot/vmlinux-4.9.0-3-4kc-malta

Create a new hard disk

$ qemu-img create -f qcow2 hda.qcow 10G

Install debian

$ qemu-system-mipsel -cdrom debian-9.1.0-mipsel-netinst.iso \
-hda hda.qcow \
-M malta \
-kernel vmlinux-4.9.0-3-4kc-malta \
-boot d \
-initrd initrd.gz \
-m 512 \
-nographic \
-append "root=/dev/sda1 nokaslr" 

Allow for the installation to complete. When done copy over the vmlinux-4.9.0-3-4kc-malta file from the Debian VM to the host machine.

Boot from hda

$ qemu-system-mipsel -hda hda.qcow \
-M malta \
-kernel vmlinux-4.9.0-3-4kc-malta \
-initrd initrd.gz \
-m 512 \
-nographic \
-append "root=/dev/sda1 nokaslr" 

Note: vmlinux-4.9.0-3-4kc-malta is the file copied from the VM in the previous step and NOT the original one downloaded from ftp.debian.org.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment