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

Erwan Velu erwanaliasr1 at gmail.com
Thu Jul 28 06:56:23 PDT 2016


https://github.com/ErwanAliasr1/syslinux/commit/6993cc151a67f68673bf58372870b301a3d1022a
sorry.

2016-07-28 15:52 GMT+02:00 Erwan Velu <erwanaliasr1 at gmail.com>:

> That is perfectly true. I had a beautiful bug in the code .... Switching
> from python to C have some weird side-effect. Indenting is not enough,
> brackets are required....
>
> So I pushed
> https://github.com/ErwanAliasr1/syslinux/commit/5a122d218553a6d4019273653ba9fad66d6ae79e
> with the fix.
> I tested it on my multi-disk system with success.
>
> I also changed the name of the function.
>
> 2016-07-17 8:21 GMT+02:00 poma <pomidorabelisima at gmail.com>:
>
>> 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