[ Home ]
This is a walk-through guide to creating a fresh Debian Woody installation under User Mode Linux. Compared to some distributions, it's actually pretty painless.
First, build your kernel. I was successful with a 2.4.26 kernel. I do not have a definitive list of what is required by the installer, but you will certainly need:
The starting point for the debian installer is the rescue floppy, rescue.bin. You can download this from any debian mirror, for example:
http://http.us.debian.org/debian/dists/woody/main/disks-i386/current/images-2.88/rescue.bin.
Once you have this you need to extract the root.bin file. Do this by mounting rescue.bin as a loopback file system:
mkdir rescue-mnt mount rescue.bin rescue-mnt -o loop cp rescue-mnt/root.bin ./
You will need to create a file to contain your root filesystem. This command will create a 3Gb file:
dd if=/dev/zero of=rootfs bs=1M count=1 seek=3072
You're now ready to boot the installer:
linux mem=64M initrd=root.bin fakehd fake_ide ubd0=rootfs con0=fd:0,fd:1 \ root=6201 ubd=3 ramdisk_size=16384 con1=pts con2=pts con3=pts \ con4=pts con5=pts
NB you will also need to include an "eth0" option to configure networking. If you're doing this on a box running X, it's probably simplest to do use specify "con=xterm". The Debian installer uses the additional consoles to provide a shell and logging output.
You should now have the Debian installer in front of you. You should now proceed as normal. The rootfs will appear in the UML as /dev/hda, and you can partition this to create a /dev/hda1 root partition.
The only difficulty with the installer is a the "Configure Device Drivers" stage. This is because your kernel version is unlikely to match the installer's standard kernel version, and so the installer is unable to find the modules directory for the current kernel. This is trivial to fix by using the shell option on the installer menu and typing:
mkdir /target/lib/modules/2.4.26-1um # insert your kernel version here depmod -a exit
The installer should now proceed happily. Do not install the LILO boot loader when asked if you wish to make the system bootable. When done, do not reboot the system. Instead, drop to a shell and type halt. This allows you to remove the initrd option before rebooting the kernel.
You should now be in a position to boot your new install and finish off the Debian install process:
linux mem=64M fakehd fake_ide ubd0=rootfs con0=fd:0,fd:1 \ root=6201 ubd=3 ramdisk_size=16384 con1=pts con2=pts con3=pts \ con4=pts con5=pts
Be aware that once booted, Debian will use /dev/tty1 as its first console (this corresponds to the con1 command-line option). This means that you'll need to specify con1=xterm, or alternatively use con1=pts and then use screen to connect to the allocated pseudo-terminal. I tend to change all my UML installs to run a getty on /dev/tty0, so that I get everything on one console. To do this, edit /etc/inittab and add tty0 to /etc/securetty.
If you have any additions of changes to these instructions, please drop me an email. A patch to the source HTML would be ideal. If you're having trouble, please post to the user-mode-linux-user mailing list.
Paul Warren 10:03:10 23-Dec-2014