[syslinux] [PATCH] : Adding dlabel option to chain.c32

poma pomidorabelisima at gmail.com
Sat Jul 16 23:21:28 PDT 2016


On 16.07.2016 10:39, Erwan Velu wrote:
> The idea is to boot a disk in an mbr fashion while using the GPT (not
> filesystem) label to detect the disk.
> 
> That is useful when you use grub2 & gpt. I was in case where my nodes
> (100s) have 8 disks each and no guarantee of which disk is "bootable" in
> the disk.
> 
> This way I can tell "please boot the disk that have one partition labelled
> "xyz"".
> 
> So nothing related to filesystem but gpt labels & disks.
> 


For comparison - option "label" - GPT Partition name selection,
working as expected

SeaBIOS / SYSLINUX

# gdisk -l /dev/vdc
...
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/vdc: ...
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS_Boot
   2          411648         1435647   500.0 MiB   8300  GPT_Boot
   3         1435648        22646783   10.1 GiB    8300  GPT_Root
   4        22646784        25163775   1.2 GiB     8200  GPT_Swap


boot: chain label=GPT_Boot
OK

~~~~~~~~~~~~~~~~~~~~~~~~~~

As opposed to "label",
"dlabel" ...
https://github.com/ErwanAliasr1/syslinux/commit/ebf8cbf

SeaBIOS / GRUB2

    ...
      ...
      <target dev='vdc' bus='virtio'/>
      <boot order='3'/>
      ...
      ...
      <target dev='vdd' bus='virtio'/>
      <boot order='4'/>
      ...
    ...


# gdisk -l /dev/vdc
...
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/vdc: ...
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS_Boot
   2          411648         1435647   500.0 MiB   8300  GPT_Boot
   3         1435648        22646783   10.1 GiB    8300  GPT_Root
   4        22646784        25163775   1.2 GiB     8200  GPT_Swap



# gdisk -l /dev/vdd
...
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/vdd: ...
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS_Boot_2
   2          411648         1435647   500.0 MiB   8300  GPT_Boot_2
   3         1435648        22646783   10.1 GiB    8300  GPT_Root_2
   4        22646784        25163775   1.2 GiB     8200  GPT_Swap_2



/boot/extlinux/extlinux.conf 
...
label localboot
  com32 chain.c32
  append dlabel=GPT_Root

label localboot 2
  com32 chain.c32
  append dlabel=GPT_Root_2
...

OR
boot: chain dlabel=GPT_Root
OR
boot: chain dlabel=GPT_Root_2
OR
boot: chain dlabel=VanillaStrawberry
OR
boot: chain dlabel=literallywhateverentered


The result is always the same,
selected for boot is always drive with a higher boot priority,
in this case - vdc




More information about the Syslinux mailing list