Menu.lst

From TUDOS-Wiki

The menu.lst specifies the menu that GRUB presents the user on boot. A basic entry looks like this:

title GRUB Menu Test
kernel (nd)/tftpboot/user/bootstrap -serial
module (nd)/tftpboot/user/fiasco
module (nd)/tftpboot/user/sigma0
module (nd)/tftpboot/user/roottask

The title keyword specifies the text to be shown in the GRUB menu. The kernel keyword specifies the name of the binary that should be started after all modules were loaded into memory. The module keywords specified additional modules. See the list of GRUB commands for a full reference.

The above order of modules has to always be the same for an L4 system:

  1. bootstrap starts the
  2. fiasco kernel, which in turn expects the next two modules to be
  3. sigma0 and
  4. roottask.

Because bootstrap enlarges its size when running, there has to be some free space after the bootstrap binary. To achieve this you may add the modaddr keyword after the bootstrap line, or give the -modaddr Option to bootstrap. The modaddr keyword is one of our local extensions to GRUB.

title GRUB Menu Test
kernel (nd)/tftpboot/user/bootstrap -serial
modaddr 0x00200000
module (nd)/tftpboot/user/fiasco
module (nd)/tftpboot/user/sigma0
module (nd)/tftpboot/user/roottask

Or:

title GRUB Menu Test
kernel (nd)/tftpboot/user/bootstrap -serial -modaddr=0x00200000
module (nd)/tftpboot/user/fiasco
module (nd)/tftpboot/user/sigma0
module (nd)/tftpboot/user/roottask

As you noticed, all the modules start with (nd)/tftpboot/user/. The (nd) tells GRUB to use the network device to get the files via TFTP. Usually GRUB obtained a network address and the IP of the TFTP server from it's DHCP server. The following file-name is then used to query the file at the TFTP server. Thus to load your binaries using TFTP you will need:

  • a DHCP server giving the test-box an IP and the IP of the TFTP server
  • a TFTP server with access to the binaries to load
  • a network card that is supported by GRUB (GRUB is pretty aged, so are the supported network cards)