Next: ioprobe, Previous: initrd, Up: Command-line and menu entry commands
This command is fairly complex, and you should not use this command unless you are familiar with GRUB. Use setup (see setup) instead.
In short, it will perform a full install presuming the Stage 2 or Stage 1.51 is in its final install location.
In slightly more detail, it will load stage1_file, validate that it is a GRUB Stage 1 of the right version number, install in it a blocklist for loading stage2_file as a Stage 2. If the option d is present, the Stage 1 will always look for the actual disk stage2_file was installed on, rather than using the booting drive. The Stage 2 will be loaded at address addr, which must be `0x8000' for a true Stage 2, and `0x2000' for a Stage 1.5. If addr is not present, GRUB will determine the address automatically. It then writes the completed Stage 1 to the first block of the device dest_dev. If the options p or config_file are present, then it reads the first block of stage2, modifies it with the values of the partition stage2_file was found on (for p) or places the string config_file into the area telling the stage2 where to look for a configuration file at boot time. Likewise, if real_config_file is present and stage2_file is a Stage 1.5, then the Stage 2 config_file is patched with the configuration file name real_config_file. This command preserves the DOS BPB (and for hard disks, the partition table) of the sector the Stage 1 is to be installed into.
Caution: Several buggy BIOSes don't pass a booting drive properly when booting from a hard disk drive. Therefore, you will unfortunately have to specify the option d, whether your Stage2 resides at the booting drive or not, if you have such a BIOS. We know these are defective in this way:
- Fujitsu LifeBook 400 BIOS version 31J0103A
- HP Vectra XU 6/200 BIOS version GG.06.11
Caution2: A number of BIOSes don't return a correct LBA support bitmap even if they do have the support. So GRUB provides a solution to ignore the wrong bitmap, that is, the option --force-lba. Don't use this option if you know that your BIOS doesn't have LBA support.
Caution3: You must specify the option --stage2 in the grub shell, if you cannot unmount the filesystem where your stage2 file resides. The argument should be the file name in your operating system.
[1] They're loaded the same way, so we will refer to the Stage 1.5 as a Stage 2 from now on.