Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Schmitt via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: bug-xorriso@gnu.org
Subject: Re: [Buildroot] Hybrid UEFI-Only CD-ROM image with systemd-boot
Date: Fri, 08 Nov 2024 10:28:39 +0100	[thread overview]
Message-ID: <30626327742203582750@scdbackup.webframe.org> (raw)
In-Reply-To: <e4ff0043cbc2eb1d80af5faa967403dc.squirrel@t-kindler.de>

Hi,

Thomas Kindler wrote:
> Is there a way to generate only one partition?

Not with GPT.
The man page promises this to happen with -append_partition 1 for MBR
partitions. But this does not work with GPT partitions.
man 1 xorriso:

  -append_partition partition_number type_code disk_path
      ...
      With MBR:
      partition_number may be 1 to 4. Number 1 will put the whole  ISO
      image  into  the unclaimed space before partition 1.
      ...
      GPT can be forced by
        -boot_image "any" "appended_part_as=gpt"
      partition_number may  be  1  to  8.  But  other  than  with  MBR
      partitions it is not guaranteed that the resulting GPT partition
      will have this number.
      More important than the desired partition number  will  be  that
      the resulting ISO filesystem is covered gaplessly with GPT table
      and its partitions and that the  partitions  in  the  table  are
      sorted  by block address.

(-boot_image "any" "appended_part_as=gpt" is in the native command set of
 xorriso the equivalent of -as "mkisofs" option -appended_part_as_gpt.)

Experiments:

  xorriso -as mkisofs \ -o "$BINARIES_DIR"/cdrom.iso \
  -eltorito-catalog boot.cat \
  -appended_part_as_gpt \
  -partition_offset 16 \
  -append_partition 1 0xef "$BINARIES_DIR"/efi-part.vfat \
  -e --interval:appended_partition_1:all:: \
  -no-emul-boot \
  -no-pad \
  README

still yields with fdisk:

  Disklabel type: gpt
  Disk identifier: 02ACD30B-A5C2-47E6-8273-DA83B6BF77AA

  Device     Start   End Sectors Size Type
  cdrom.iso1    64   139      76  38K Microsoft basic data
  cdrom.iso2   140 20491   20352  10M EFI System

If i omit option -appended_part_as_gpt i get:

  Disklabel type: dos
  Disk identifier: 0x00000000

  Device     Boot Start   End Sectors Size Id Type
  cdrom.iso1        140 20491   20352  10M ef EFI (FAT-12/16/32)


I will investigate whether the GPT partition number can be forced to
the number given by the user. But i am not optimistic about this.
The rule of having gapless GPT stems from work done for grub-mkrescue
over a decade ago. I would have to find out whether this demand of
Vladimir Serbinko is purely esthetic or has a hard reason.


Have a nice day :)

Thomas

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2024-11-08  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 11:26 [Buildroot] Hybrid UEFI-Only CD-ROM image with systemd-boot Thomas Kindler
2024-11-07  7:09 ` Thomas Schmitt via buildroot
2024-11-08  7:53   ` Thomas Kindler
2024-11-08  9:28     ` Thomas Schmitt via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30626327742203582750@scdbackup.webframe.org \
    --to=buildroot@buildroot.org \
    --cc=bug-xorriso@gnu.org \
    --cc=scdbackup@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox