Menu.lst

From TUDOS-Wiki
Revision as of 13:46, 23 August 2007 by Ron (talk | contribs) (What a basic menu.lst looks like)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.

The above order of modules has to be always the same for an L4 system: bootstrap starts the Fiasco kernel, which in turn expects the next two modules to be sigma0 and 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.

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)