Gustavo Franco: Debian testing (wheezy) keyboardless install
I couldn't find an end-to-end document online about this just bits and pieces here and there. Let me describe how to install Debian testing (wheezy) without a keyboard using an USB flash drive and ssh.
I've got an HP Microserver a month or so ago and this is the step by step of my second install. The first one was also keyboardless but didn't involve an USB flash drive to bootstrap. I've used tftpd and dhcp from my laptop, but forgot to capture the notes to make a blog post. Shame on me.
Here's what you need:
Create a preseed.cfg in the root directory of the USB flash drive containing the following:
Edit syslinux.cfg in the root directory of the USB flash drive to look like this:
I've got an HP Microserver a month or so ago and this is the step by step of my second install. The first one was also keyboardless but didn't involve an USB flash drive to bootstrap. I've used tftpd and dhcp from my laptop, but forgot to capture the notes to make a blog post. Shame on me.
Here's what you need:
- A machine that will boot from USB. (HP Microserver comes with USB, Net and Disk boot order by default);
- USB flash drive (>=256MB, mine is 1GB);
- Machine with an ssh client to answer d-i's questions;
- A DHCP server in your network.
The last two requirements are optional for hardcore preseeders. If you don't know what I mean. You aren't one of them. :)
Here's the step by step to install using SSH:
- Download the right debian installer boot image. Pay attention to "amd64" here since your architecture might be different. - http://d-i.debian.org/daily-images/amd64/daily/hd-media/boot.img.gz
- Gunzip boot.img.gz.
- Transfer the image to the USB flash drive using dd if=boot.img of=/dev/<tokendev> . It will give you a few files in the USB flash drive. It's like you are mirroring what's in boot.img into it. Syslinux will be there.
- Download an ISO image - http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/. I've got netinst. Pay attention again to the architecture (amd64).
- Mount the USB flash drive.
- Copy the ISO image as is to the root directory of the USB flash drive. Using cp, yeah.
Create a preseed.cfg in the root directory of the USB flash drive containing the following:
d-i netcfg/get_hostname string HOSTNAME d-i netcfg/get_domain string DOMAIN d-i anna/choose_modules string network-console d-i network-console/password password INSERT_A_PASSWORD_HERE d-i network-console/password-again password INSERT_A_PASSWORD_HERE
Edit syslinux.cfg in the root directory of the USB flash drive to look like this:
default netinst prompt 0 timeout 5 label netinst menu label netinst kernel linux append auto=true vga=normal file=/preseed.cfg initrd=initrd.gz priority=critical
- Umount the USB flash drive.
- Boot your new machine using the USB flash drive.
- d-i should do its thing and show and only stop to show you the screen pointing out that you can ssh as installer@<ip>.
- ssh from another machine as user installer to <ip>. Remember you've provided the password in the preseed.cfg above. You will be all set to install from there.
My wishlist to the d-i hackers out there:
- A boot-ssh.img.gz with the syslinux.cfg and preeseed.cfg above. In this case, it would be much more trivial to document in the installer manual how to use such a great feature.