Installing Debian Etch on a simulated DECstation using GXemul 1- Install GXemul apt-get install gxemul - or get it from http://gavare.se/gxemul/ 2- Get Debian Etch installation image Get a mipsel image from http://www.debian.org/devel/debian-installer/ I used the etch beta3 release netinst CD image. 3- Build (or get) a custom kernel For some reason I've been unable to run the Debian provided kernels within GXemul - they crash soon after booting. This seems to be an issue with the serial driver in Debian's kernel, thought there might be other issues too. Anyway, I've been able to install using a custom kernel. If you already have a mips system you can follow these instructions: - Get kernel from http://www.linux-mips.org/pub/linux/mips/kernel/v2.4 - Get my config file at http://zoy.org/~walken/gxemul-etch/config-2.4.33.2 - unpack kernel, go in that directory - make menuconfig - load my config file and exit - yes 'foo bar' | head -n 1048576 > arch/mips/ramdisk/dummy_initrd - make vmlinux Otherwise, get and unzip my compiled image from http://zoy.org/~walken/gxemul-etch/vmlinux-2.4.33.2.gz 4- Patch the initrd filesystem into the custom kernel The custom kernel contains a dummy initrd image. The idea is that before booting it, you replace the dummy image with something useful - such as the Debian installer initrd image for example. The initrd you use must be smaller than the dummy initrd, but I made the dummy initrd 8MB which should be plenty enough. First locate the offset where the dummy initrd data was placed: hd vmlinux-2.4.33.2 | grep 'foo bar' (In Debian, hd is part of the bsdmainutils package). In my kernel, the initrd data starts at offset 0x001df000 = 1961984 Mount the Debian iso image and make a copy of /boot/initrd.gz Copy the install initrd over the custom kernel's dummy initrd: dd if=initrd.gz of=vmlinux-2.4.33.2 bs=1961984 seek=1 conv=notrunc 5- Create an empty virtual disk dd if=/dev/zero of=etch_pmax.img bs=1024 count=1 seek=3300000 6- Start the emulator gxemul -X -e3max -M 128 -d etch_pmax.img \ -d debian-testing-mipsel-netinst.iso \ vmlinux-2.4.33.2 -o "DEBCONF_PRIORITY=medium" At this point, the kernel starts running. It will ponder a little, and then etch installer starts. 7- Follow the etch installation process There is not much to note that would be different from installing etch on a physical machine. A few minor poinst worth mentioning however: - When you first get the Debian installer menu, choose 'execute a shell' and type: mount -t devfs devfs /dev The Debian installer expects devfs to be available. I do not know why this does not happen automatically, despite CONFIG_DEVFS_MOUNT being selected in my custom kernel configuration file. - Skip the 'Select a keyboard layout' step - it does not work on DECstations, wether real or emulated. This is a known issue in linux. - In the 'load installer components' step, the installer will complain about not finding modules for our custom kernel. Choose 'yes' to continue. - When asked which kernel to install to make the system bootable, I chose none, since GXemul in effects acts as a kernel bootloader for us. - We do not need a boot loader, so I chose 'continue without boot loader' instead of installing Delo. 8- After the installation is done, reboot into the installed system gxemul -X -e3max -M 128 -d etch_pmax.img \ vmlinux-2.4.33.2 -o "devfs=nomount root=/dev/sda1" You now have a working etch installation running on an emulated DECstation. Have fun ! Credits I want to thank: - Anders Gavare for his work on GXemul and for looking at the failures when using the default Debian kernel, - Kaj-Michael Lang for publishing a working kernel config file and for hinting me to use the linux-mips tree, - The Debian team for making available a great multiplatform OS and for dealing with my misguided problem report before I figured out about embeded initrd images.