pxelinux.cfg/default

Now, we will look at how to configure the boot configuration file $HOME/.VirtualBox/TFTP/pxelinux.cfg/default. In our setup, it looks like the following code snippet:

prompt 1 
default menu.c32
timeout 100

label 1. NFS Installation (serial port) - x86vbox
menu x86vbox_install_serial
kernel x86vbox/kernel
append ip=dhcp console=ttyS3,115200 initrd=x86vbox/initrd.img root=/dev/nfs rw androidboot.hardware=x86vbox INSTALL=1 DEBUG=2 SRC=/x86vbox ROOT=10.0.2.2:/home/sgye/vol1/android-x86vbox/out/target/product qemu=1 qemu.gles=0

label 2. x86vbox (ROOT=/dev/sda1, serial port)
menu x86vbox_sda1
kernel x86vbox/kernel
append ip=dhcp console=ttyS3,115200 initrd=x86vbox/initrd.img androidboot.hardware=x86vbox DEBUG=2 SRC=/android-x86vbox ROOT=/dev/sda1
...

The preceding file can be download from https://github.com/shugaoye/asp-sample/blob/master/ch09/pxelinux.cfg/default.

You can copy it from the above mentioned GitHub URL and you need to change the NFS shared folder to your own ROOT=10.0.2.2:/{your NFS shared folder}.

The syntax in the boot configuration file can be found at the following URL from the Syslinux project:

http://www.syslinux.org/wiki/index.php?title=SYSLINUX

In the preceding configuration file that we use in this chapter, we can see the following commands and options:

  • prompt: It will let the bootloader know if it will show a LILO-style boot: prompt. With this command-line prompt, you can input the option directly. All the boot options are defined by the command label.
  • default: It defines the default boot option.
  • timeout: If more than one label entry is available, this directive indicates how long to pause at the boot: prompt until booting automatically, in units of 1/10 s. The timeout is cancelled when any key is pressed, the assumption being that the user will complete the command line. A timeout of zero will disable the timeout completely. The default is 0.
  • label: A human-readable string that describes a kernel and options. The default label is linux, but you can change this with the DEFAULT keyword.
  • kernel: The kernel file that the boot image will boot.
  • append: The kernel command line that can be passed to the kernel during the boot.

In the preceding configuration file, we show two boot options. In the first option, we can boot to a minimum Linux environment using the NFS root filesystem. We can install the x86vbox images from that environment to the hard disk. In the second option, we can boot x86vbox from the /dev/sda1 disk partition. We will explore these options in detail later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.116.50