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

poma pomidorabelisima at gmail.com
Fri Jul 15 05:42:45 PDT 2016


On 30.06.2016 19:41, Erwan Velu via Syslinux wrote:
> The exisiting label= option offer to boot on a gpt partition that have
> a particular label.
> The existing guuid= option offer to boot on a disk or partition with a
> particular label.
> 
> This new option offer to boot the disk that have a partition which
> have a given label.
> The label is so just a way to detect a disk to boot.
> 
> A typical use is for making an intelligent localboot like :
> 
>     label localboot
>         com32 chain.c32
>         append dlabel=datapartition
> 
> This allow booting on a disk that sports a least one partition
> labelled "datapartition".
> 
> You can consider dlabel= doing almost what mbr= does but by inspecting
> the gpt partitions label.
> 
> 
> Please find below the commit :
> https://github.com/ErwanAliasr1/syslinux/commit/ebf8cbfb8cef49517aa36b4a79998b4332289489
> 


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

Found valid GPT with protective MBR; using GPT.
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System Partition
   2          411648         1435647   500.0 MiB   8300  BOOT System Partition
   3         1435648        22646783   10.1 GiB    8300  ROOT System Partition
   4        22646784        25163775   1.2 GiB     8200  SWAP System Partition


# fdisk -l /dev/vda
...
Disklabel type: gpt
...
Device        Start      End  Sectors  Size Type
/dev/vda1      2048   411647   409600  200M EFI System
/dev/vda2    411648  1435647  1024000  500M Linux filesystem
/dev/vda3   1435648 22646783 21211136 10.1G Linux filesystem
/dev/vda4  22646784 25163775  2516992  1.2G Linux swap


# fatlabel /dev/vda1 
labelefi   

# e2label /dev/vda2
labelboot

# e2label /dev/vda3
labelroot

# swaplabel /dev/vda4
LABEL: labelswap
...


Filesystem *label* and *label* of a swap area
distinguish from
GPT *name* of a partition


Therefore -if- you are referring to a GPT partition *name*,
simple *name* as append option - for GPT partition *name* selection, should suffice
i.e.
  ...
  append name=gptpartitionname


More information about the Syslinux mailing list