Remotely installing Debian using a web browser

This wiki page is about a frontend module for ?cdebconf, debian-installer's installation core, that i wrote to allow people to perform remote graphical Debian installations using a simple tool as a web browser on the client side.

Some screenshots are available to illustrate what a typical web Debian installation would be.

Why was this built?

Imagine you're a sysadmin who has to install Debian on a blind target machine ( no monitor nor input devices available ), then you would probably have to remove the machine from its location, carry it to the laboratory, connect I/O devices, installing the software and moving back the server to its place (whew, what a sweat!).

Wouldn't be nice if you could boot the target machine with a cdrom and continue the installation from your office using a web browser ?

The idea is booting the target machine with a Debian installation image preseeded with a fixed / dynamicaly assigned ip address that start up a web server that allows the sysadmin to connect to with a simple web browser and perform the whole installation process comfortaby sat at his desk.

How about if you add ssh server to installer and do install with ssh conection? sshd.udeb maybe exsist already. Add pereseed file to install sshd.udeb and get root ssh key. After that do ssh connect and perform installation.

Where do i get it ?

You can download sourcecode and comanion CGI files from this location

http://nausicaa.polito.it/~attilio/debian/web_frontend/web/

Can i give it a try "on the road" ?

Pick this installation ISO

http://nausicaa.polito.it/~attilio/debian/web_frontend/mini.iso

boot it as usual, configure the network so that the target machine is reachable on your local net and then, by both opening a shell or switching to VT2, do

debian-installer-web

Now, a web server should be running on the target machine, listening at port 8000: point your web browser at

http://<target machine's ip address>:8000/cgi-bin/cdebconf.cgi

and have a happy web-installation! :)

How does it work?

Two distinct components take part to a Debian web installation on the target machine side: a cdebconf frontend module and a generic HTTP server capable of CGI support: original project included developing a minimal web server for the frontend living in its own thread, but later i had second toughts as i felt i was "reinventing the wheel" because many reliable CGI capable small web servers already exist.

The HTTP server is started togheter with the debian-installer and listens for user's input at a fixed IP address and user input is sent through unix pipes to the frontend module by a simple bash script that operates as a CGI application.

I successfully experimented THTTPD web server: it proved to be small, well maintained and offers needed CGI suport, but of course the web frontend can cooperate with any existing, CGI capable, web server.

The frontend module parses the input string coming from the pipe, replies back to cdebconf, waits for the next question(s) to be displayed to arrive and sends an HTML page back to the HTTP server as final answer to the user.

Pending issues

Specific issues that already have been spotted and need to be fixed include

Further development

Some ideas for further development

Also, any future integration in the d-i would require packaging both the web frontend and the web server into udebs and some work to fit everything into the iso building process: here help would be needed in the case the d-i team should decide to include this frontend module into the d-i.

Contacts

Please contact me at attilio.fiandrotti@gmail.com