Añadir “root-path” al DHCPD de m0n0wall 1.3
Montar un servidor LTSP en Ubuntu es relativamente fácil, pero en el caso de Fedora me he encontrado con un problemilla extra al querer usar el monowall bajo Soekris 45xx como DCHP. El caso es que resulta imposible añadir la opción “root-path” al dhcpd.conf del monowall de manera standard, así que tiré de google para buscar una solución.
El tema tiene miga, y el único apaño que he encontrado consiste en descomprimir la imagen, realizar los cambios oportunos y volverla a comprimir. Básicamente hay que instalar FreeBSD o PCBSD en una máquina física o virtual, descomprimir la imagen .img usando el script workon.sh, modificar el archivo services.inc, recomprimir e instalar la imagen. Yo he usado la versión bootonly de FreeBSD que solo ocupa 33MB y tiene todo lo necesario. Seguí los pasos de este post en el foro oficial de monowall:
My example shows my need for “option root-path” for Linux Terminal Server” and PXE bootingInstall PC-BSD on a spare PC or Virtual Machine.
Make a new directory. I used “mono”.
Download your needed monowall image into this directory.
Download “workon.sh” script from http://chrisbuechler.com/index.php?id=20 into this same directory.
Note: The “workon.sh” script has more instruction’s on how to use it.
Open a terminal and type “su”. enter your root password
cd into your mono directory and type “chmod +x workon.sh”
Now to extract the image type, for example “./workon.sh net48xx-1.23.img”
Now you can modify the image how you want before repacking it.
K, now I’m not real comfortable using VI for editing. I like to use a GUI editor and will explain how I used “KEdit” as root to do it. You need to edit as root.
Open a new terminal and type “su” and enter your root password.
Now type “kedit”. Your are running KEdit as root
Now the changes to the image.
With KEdit, click “File” then “Open” and Browse to and open <your-home-dir>/mono/mnt2/etc/inc/services.inc
Look for these lines in services.inc
if ($dhcpifconf['next-server'])
$dhcpdconf .= “ next-server {$dhcpifconf['next-server']};\n”;
if ($dhcpifconf['filename'])
$dhcpdconf .= “ filename \”{$dhcpifconf['filename']}\”;\n”;
Enter this line directly under it.
if ($dhcpifconf['root-path'])
$dhcpdconf .= “ option root-path \”{$dhcpifconf['root-path']}\”;\n”;
Save and exit KEdit.
Type “exit” in the terminal where you started the “workon.sh” script to repack the image.
That it, Your done.
Upload your new image
Now you have and extra option in your config.xml
Mine looks like this.
<next-server>192.168.1.101</next-server>
<filename>/ltsp/i386/pxelinux.0</filename>
<root-path>/opt/ltsp/i386</root-path>
Hope this helps get what you need.
You could probably setup something like this.
<option1>time server</option1>
<option2>something else</option2>
<option3>something else</option3>
<option4>something else</option4>
If you don’t enter the tag in the config.xml, it doesn’t get written to the dhcpd.conf.
Good Luck,
-slick
Kudo’s/Credits:
Manuel Kasper
Jeb Campbell
Chris Buechler
El problema que me encontré más adelante es que el script workon.sh no funciona correctamente para la rama beta de monowall (1.3), así que hay que modificarlo de esta manera:
Finally found the answer. For anyone curious, workon.sh doesn’t work for 1.3 series m0n0wall.you need to edit workon.sh:
changes to mount /dev/md90a mnt1
Regards
Modificación de la shell para la ejecución y del parámetro /dev/md90

Tras ejecutar el script

Modificación del archivo services.inc

Hay que renombrar la imagen modificada a embedded-1.3b14.img para que monowall la acepte

Nos dará un mensaje de advertencia diciendo que la imagen no está oficialmente firmada

Aceptamos y esperamos a que reinicie

Ahí lo tenemos en el config.xml!!
