All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: michel@bouissou.net
Subject: Re: A thread on grub-bug could need attention
Date: Wed, 31 Jan 2018 16:33:11 +0100	[thread overview]
Message-ID: <1655785697419791611@scdbackup.webframe.org> (raw)
In-Reply-To: <0d4af3a4-98aa-12c5-72aa-c5cb976dce21@bouissou.net>

Hi,

Michel Bouissou wrote:
> I would assume that I need to create a "minimal" directory with a
> "dummy" file inside like previously ?

Yes.
The experiment can well wait until you are back from travel.


> However, I don't have any "grub-mkrescue-sed.sh" file 

Get it from 
  https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/frontend/grub-mkrescue-sed.sh

It belongs to the upstream sources of xorriso, where i am developer.
The GNU xorriso tarball has it as demo in its ./frontend directory.
You can trust its good intentions as much as the ones of xorriso.
File operations only affect the grub-mkrescue temporary directory and
the /tmp directory. Files get moved, not deleted.
(The practical consequences of running it are subject to the usual
 risk of bugs, i fear.)

It works with xorriso-1.4.4 or newer. Best with current release 1.4.8.

If your installed xorriso tells an older revision when run without any
arguments, then consider to get xorriso and grub-mkrescue-sed.sh by the
tarball at
  https://www.gnu.org/software/xorriso/#download
This xorriso needs no installation but only a place where to unpack
and compile
  tar xzf xorriso-1.4.8.tar.gz
  cd xorriso-1.4.8
  ./configure && make
If you run its fellow ./frontend/grub-mkrescue-sed.sh then it will make
use of the compiled binary ./xorriso/xorriso.
Existing installed xorriso and its libraries will not be affected.

----------------------------------------------------------------------------
Lengthy motivation:

The purpose of grub-mkrescue-sed.sh is to modify the xorriso run underneath
grub-mkrescue to get other partition layouts.

The native layout as defined by Vladimir Serbinenko and implemented by me
obviously works fine. Its main disadvantage is that it shows at least
two not mountable GPT partitions (e.g. /dev/sdc1 and /dev/sdc4).
The ISO 9660 filesystem can only be mounted by the base device /dev/sdc.

GPT has the further disadvantage that it prescribes to have a backup
partition table at the end of the storage device. But when bootable ISOs
are made, it is not yet known how large the device will be. And even if so,
one would have to pad up the image to write that backup GPT.
So any ISO copied onto USB stick has its backup GPT at the wrong place
and any remnant backup GPT at the correct position would be in conflict
with the main GPT at image start.

The MBR partition table doesn't refer to the device end. UEFI specifies
that a MBR partition of type 0xEF shall be regarded as EFI System
Partition.

By some extra measures, the default mode of grub-mkrescue-sed.sh achieves
that all partitions are mountable and that no nested partitions emerge.
This partition table is fully acceptable to MBR partition editors like
fdisk which can then be used to add partitions and so give the rest of
the USB stick a life.
Because of the 64 block gap before partition 1, it is even possible to
install a new boot loader and use the ISO as read-only data partition
rather than as home of the operating system.

The same measures can help to make GPT with mountable ISO partition
(see description of "gpt_appended" in the script). But the problem of
misplaced backup GPT cannot be solved at the time when the ISO gets
produced.

Most modes avoid HFS+ partition and Apple Partition Map. Partition editors
and operating systems do not expect APM to be combined with MBR or GPT
by some hot x86 machine code stunt and an unusual APM block size. 


Have a nice day :)

Thomas



  reply	other threads:[~2018-01-31 15:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 11:35 A thread on grub-bug could need attention Thomas Schmitt
2018-01-08 12:48 ` Daniel Kiper
2018-01-08 16:14   ` Michel Bouissou
2018-01-29 12:49     ` Daniel Kiper
2018-01-29 15:29       ` Michel Bouissou
2018-01-29 18:20         ` Michel Bouissou
2018-01-29 18:53           ` Thomas Schmitt
2018-01-30 15:18             ` Michel Bouissou
2018-01-30 16:33               ` Thomas Schmitt
2018-01-30 17:43                 ` Michel Bouissou
2018-01-30 18:00           ` Daniel Kiper
2018-01-30 19:15             ` Thomas Schmitt
2018-01-31  9:38               ` Michel Bouissou
2018-01-31 12:20                 ` Thomas Schmitt
2018-01-31 13:22                   ` Michel Bouissou
2018-01-31 15:33                     ` Thomas Schmitt [this message]
2018-01-31 21:37                       ` Thomas Schmitt
2018-01-31 22:47                         ` Michel Bouissou
2018-02-01  0:02                           ` Thomas Schmitt
2018-02-01 21:56                             ` Michel Bouissou
2018-02-02  8:15                               ` Thomas Schmitt
2018-02-02 10:28                                 ` Michel Bouissou
2018-02-02 10:50                                   ` Thomas Schmitt
2018-02-02 10:18                               ` Thomas Schmitt
2018-01-31 15:46                 ` Daniel Kiper

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=1655785697419791611@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=grub-devel@gnu.org \
    --cc=michel@bouissou.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.