PXE boot always boots hd0 regardless of which drive is selected as the boot drive.

Bug #1737464 reported by Daniel Keith
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
3.4
Won't Fix
Medium
Unassigned

Bug Description

PXE boot always boots hd0 regardless of which drive is selected as the boot drive. This is a problem for some devices that refuse to order drives properly (HPE sl230s servers booting from internal flash storage, for example).

config.local.i386.template forces boot from hd0:

> https://github.com/maas/maas/blob/2.3/src/provisioningserver/templates/pxe/config.local.i386.template

> DEFAULT local
>
> LABEL local
> SAY Booting local disk ...
> KERNEL chain.c32
> APPEND hd0

chain.c32 supports booting disk/partition by lable, guid, or MBR serial:

http://www.syslinux.org/wiki/index.php?title=Comboot/chain.c32

> chain.c32 hd<disk#> [<partition>] [options]
> chain.c32 fd<disk#> [options]
> chain.c32 mbr:<id> [<partition>] [options]
> chain.c32 boot [<partition>] [options]
> chain.c32 fs [options]
> chain.c32 label=<label> [options]
> chain.c32 guid=<label> [options]
>
> ...
>
> Find partition by uuid or label in all GPT partitions on all available drives:
> label=mylabel
> guid=myguid
> Note that label and guid work only on GPT partition tables; it is not filesystem but partition label and guid.
>
> ...
>
> mbr
>
> The mbr: syntax means search all the hard disks until one with a specific MBR serial number (bytes 440-443) is found.
> You can get the MBR serial number, by running the following command (change /dev/sda to the correct device):
> $ hexdump -s 440 -n 4 -e '"0x%08x\n"' /dev/sda
> 0x0ec8694c
> Or by running:
> $ fdisk -l /dev/sda
> ...
> Disk identifier: 0x0ec8694c
> Example:
> LABEL mbr_serial
> COM32 chain.c32
> APPEND mbr:0x0ec8694c

MAAS could note the disk/partition guid or MBR serial on deployment and tell chain.c32 to boot that disk in order to ensure that the disk with grub installed is the disk that gets booted.

Revision history for this message
Björn Tillenius (bjornt) wrote :

This was discussed on the mailing list as well:

  https://lists.ubuntu.com/archives/maas-devel/2017-December/002767.html

Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.4.x
Changed in maas:
milestone: 2.4.x → 2.4.0rc1
Changed in maas:
milestone: 2.4.0rc1 → 2.4.0rc2
Changed in maas:
milestone: 2.4.0rc2 → 2.5.x
Changed in maas:
milestone: 2.5.x → 2.5.0
Changed in maas:
milestone: 2.5.0 → next
Changed in maas:
milestone: next → none
Changed in maas:
importance: High → Medium
milestone: none → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Changed in maas:
milestone: 3.4.x → 3.5.x
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.