This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cmd:sanboot [2017/04/12 15:12] mcb30 |
cmd:sanboot [2024/03/07 16:58] mcb30 |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Synopsis ===== | ===== Synopsis ===== | ||
- | sanboot [--drive <drive>] [--filename <filename>] [--no-describe] | + | sanboot [--drive <drive>] [--filename <filename>] [--extra <filename>] |
- | [--keep] [<uri>] [<uri>...] | + | [--label <label>] [--uuid <uuid>] |
+ | [--no-describe] [--keep] [<uri>] [<uri>...] | ||
===== Examples ===== | ===== Examples ===== | ||
Line 41: | Line 42: | ||
The SAN drive will be described via an appropriate mechanism (such as an iBFT for an iSCSI drive) unless the ''%%--no-describe%%'' option is specified. | The SAN drive will be described via an appropriate mechanism (such as an iBFT for an iSCSI drive) unless the ''%%--no-describe%%'' option is specified. | ||
- | On some platforms (e.g. UEFI), the ''%%--filename%%'' option may be used to specify the path to the bootloader within the specified SAN drive. | + | On some platforms (e.g. UEFI), additional options may be used to control the SAN boot: |
+ | |||
+ | * If the ''%%--filename%%'' option is specified, then only a partition containing the specified filename will be selected as the boot partition, and the specified filename will be used as the bootloader within the SAN drive. | ||
+ | * If the ''%%--extra%%'' option is specified, then only a partition containing the specified additional filename will be selected as the boot partition. | ||
+ | * If the ''%%--label%%'' option is specified, then only a partition with the specified (case-insensitive) volume label will be selected as the boot partition. | ||
+ | * If the ''%%--uuuid%%'' option is specified, then only a partition with the specified GPT partition GUID will be selected as the boot partition. | ||
===== Command status ===== | ===== Command status ===== | ||
Line 58: | Line 64: | ||
===== Notes ===== | ===== Notes ===== | ||
- | The Master Boot Record (MBR) code present on most SAN targets will be unable to boot unless the target is attached as the default SAN drive (''%%0x80%%''). | + | The BIOS Master Boot Record (MBR) code present on most SAN targets will be unable to boot unless the target is attached as the default SAN drive (''%%0x80%%''). |
You can optionally specify a [[:sanuri|SAN target URI]] that will be automatically attached as the specified SAN drive before booting is attempted. This drive will be automatically detached if booting then fails, unless the ''%%--keep%%'' option is specified. | You can optionally specify a [[:sanuri|SAN target URI]] that will be automatically attached as the specified SAN drive before booting is attempted. This drive will be automatically detached if booting then fails, unless the ''%%--keep%%'' option is specified. | ||
Line 66: | Line 72: | ||
If you wish to attach to multiple independent SAN drives, then you must use the ''[[:cmd:sanhook]]'' command to attach each non-boot drive individually. | If you wish to attach to multiple independent SAN drives, then you must use the ''[[:cmd:sanhook]]'' command to attach each non-boot drive individually. | ||
- | On a UEFI platform, some older operating systems (e.g. RHEL6) will install the bootloader with a non-default filename. You can use either the ''%%--filename%%'' option or the ''[[:cfg:san-filename]]'' setting to specify the correct bootloader filename. For example: | + | On a UEFI platform, some older operating systems (e.g. RHEL6) will install the bootloader with a non-default filename. You can use the ''%%--filename%%'' option (or the ''[[:cfg:san-filename]]'' setting) to specify the correct bootloader filename. For example: |
+ | # For RHEL6 | ||
sanboot --filename \EFI\redhat\grub.efi \ | sanboot --filename \EFI\redhat\grub.efi \ | ||
- | iscsi:192.168.0.2::::iqn.2010-04.org.ipxe.chipmunk:rhel6 | + | iscsi:192.168.0.2::::iqn.2010-04.org.ipxe.chipmunk:rhel6 |
+ | |||
+ | # For Debian | ||
+ | sanboot --filename \EFI\debian\grubx64.efi \ | ||
+ | iscsi:192.168.0.2::::iqn.2010-04.org.ipxe.chipmunk:debian10 | ||
For the sake of backwards compatibility, you can use the ''[[:cfg:keep-san]]'' setting to prevent iPXE from detaching a SAN drive, and you can use the ''[[:cfg:skip-san-boot]]'' setting to prevent iPXE from booting from a SAN drive. The combination of both of these settings provides functionality which is approximately equivalent to the ''[[:cmd:sanhook]]'' command. | For the sake of backwards compatibility, you can use the ''[[:cfg:keep-san]]'' setting to prevent iPXE from detaching a SAN drive, and you can use the ''[[:cfg:skip-san-boot]]'' setting to prevent iPXE from booting from a SAN drive. The combination of both of these settings provides functionality which is approximately equivalent to the ''[[:cmd:sanhook]]'' command. | ||
- | You can use the ''sanboot'' command to boot from a local disk drive without exiting iPXE. This can be useful if BIOS bugs prevent you from being able to cleanly exit iPXE. For example: | + | You can use the ''sanboot'' command to boot from a local disk drive without exiting iPXE. This can be useful if BIOS or UEFI bugs prevent you from being able to cleanly exit iPXE. For example: |
# Boot from local hard disk | # Boot from local hard disk | ||
sanboot --no-describe --drive 0x80 | sanboot --no-describe --drive 0x80 | ||
+ | |||
+ | On a UEFI platform you can specify drive number zero in order to boot from any matching disk (whether a SAN drive or local disk). You can use this in conjunction with the filtering options ''%%--extra%%'', ''%%--label%%'', etc to boot from the correct disk without knowing its drive number. For example: | ||
+ | |||
+ | # Boot from any disk (SAN or local) containing a Fedora installation | ||
+ | sanboot --drive 0 --extra \EFI\fedora | ||