unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: bug-xorriso@gnu.org
Cc: guix-devel@gnu.org
Subject: ISO installer image: GPT versus MBR partitions (was bug#33639)
Date: Tue, 16 Apr 2019 15:40:56 +0200	[thread overview]
Message-ID: <22381672198740946174@scdbackup.webframe.org> (raw)
In-Reply-To: <CAE4v=phJmiS77k_YZ25ObxQ14J3f1y+H65+AjJ9om42OCUs=5g@mail.gmail.com>

Hi,

Gábor Boskovits wrote:
> I removed the xorriso bug list, as I feel this does not belong there.

As its admin i say that everything xorriso related belongs there. :))

But maybe we should remove  33639@debbugs.gnu.org  from the Cc ?
I herby give this a try.


i wrote:
> > The alternative/backup header is a property of GPT which makes it
> > rather unsuitable for disk images.

Gábor Boskovits wrote:
> Could we create a simple tool to write the disk images to a disk
> correcting this problem?

There are GPT partition editors which offer to repair the backup block
problem. gdisk has in its expert's menu 'x':
  e       relocate backup data structures to the end of the disk

The job is indeed not very difficult. Backup header block and backup
table entries array need to be moved up. Then a few block addresses
in both header blocks need to be updated. Finally new CRCs need to
be computed and put into the headers.

More headache is in the wish to have a fool-proof tool for copying
the image file to USB stick.
Compared with the risks of burning a DVD, the risks of writing a disk
image are quite unbearable. Covering all pitfalls might be a larger
adventure. (Ubuntu has mkusb: https://help.ubuntu.com/community/mkusb)

A problem with GPT relocation is that checksums of the image cannot be
verified on USB stick any more.
An MBR partitioned image would not have to be altered. /sbin/isosize could
tell the number of bytes which should be processed when comparing with
published checksums.

Further an MBR partitioned image would have no non-mountable partitions.

  $ /sbin/gdisk guixsd-install-0.15.0.i686-linux.iso
  ...
  Command (? for help): p
  ...
  Number  Start (sector)    End (sector)  Size       Code  Name
     1              64           34107   16.6 MiB    0700  Gap0
     2           34108           39867   2.8 MiB     EF00  EFI boot partition
     3           39868         1815727   867.1 MiB   AF00  HFSPLUS
     4         1815728         1816327   300.0 KiB   0700  Gap1

Gap0 and Gap1 are not mountable. One can get access to the ISO's files
only via the base device. The HFS+ partition publishes the same files,
but you need to find a HFS+ driver which works with block size 2048.
(Even more difficult could be to find any machine that boots via
 APM and HFS+ and can make use of the binaries in ISO and HFS+.)

Repeating my example of yesterday of a grub-mkrescue ISO with MBR
partition table (and no APM, which could be added if really of interest):

  $ /sbin/fdisk -l output.iso
  ...
  Device      Boot Start   End Sectors  Size Id Type
  output.iso1 *       64 28103   28040 13.7M 83 Linux
  output.iso2      28104 33863    5760  2.8M ef EFI (FAT-12/16/32)

  $ expr $(/sbin/isosize output.iso) / 512
  33864

Of course, ISO and partition 1 would be much larger in a Guix ISO.


Have a nice day :)

Thomas

  reply	other threads:[~2019-04-16 13:39 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190415165451.dpzngealeisbibc7@pelzflorian.localdomain>
     [not found] ` <1582867226375139246@scdbackup.webframe.org>
2019-04-16  9:57   ` bug#33639: ISO installer image is broken on i686 Gábor Boskovits
2019-04-16 13:40     ` Thomas Schmitt [this message]
2019-04-16 16:32       ` ISO installer image: GPT versus MBR partitions (was bug#33639) pelzflorian (Florian Pelz)
2019-04-16 17:57         ` ISO installer image: GPT versus MBR partitions Thomas Schmitt
2019-04-16 19:55           ` pelzflorian (Florian Pelz)
2019-04-16 20:31             ` pelzflorian (Florian Pelz)
2019-04-16 21:15               ` Thomas Schmitt
2019-04-17  8:59                 ` pelzflorian (Florian Pelz)
2019-04-17 10:23                   ` Thomas Schmitt
2019-04-17 10:30                     ` pelzflorian (Florian Pelz)
2019-04-17 15:51                     ` Thomas Schmitt
2019-04-17 22:35                       ` pelzflorian (Florian Pelz)
2019-04-18  6:32                         ` Thomas Schmitt
2019-04-18  7:00                           ` Thomas Schmitt
2019-04-18  7:07                             ` pelzflorian (Florian Pelz)
2019-04-18  8:13                               ` Thomas Schmitt
2019-04-18 12:19                                 ` pelzflorian (Florian Pelz)
2019-04-18 13:50                                   ` Thomas Schmitt
2019-04-18 21:28                                     ` Thomas Schmitt
2019-04-19  7:29                                       ` pelzflorian (Florian Pelz)
2019-04-19  8:03                                     ` pelzflorian (Florian Pelz)
2019-04-19  9:01                                       ` Thomas Schmitt
2019-04-19  9:39                                         ` pelzflorian (Florian Pelz)
2019-04-19 10:58                                           ` Thomas Schmitt
2019-04-19 14:57                                             ` pelzflorian (Florian Pelz)
2019-04-19 11:30                                         ` pelzflorian (Florian Pelz)
2019-04-19 18:33                                           ` pelzflorian (Florian Pelz)
2019-04-19 19:23                                             ` Thomas Schmitt
2019-04-20 10:26                                               ` pelzflorian (Florian Pelz)
2019-04-20 10:50                                                 ` Thomas Schmitt
2019-04-20 11:16                                                   ` Thomas Schmitt
2019-04-20 11:29                                                     ` Thomas Schmitt
2019-04-20 14:23                                                       ` Thomas Schmitt
2019-04-20 14:54                                                         ` pelzflorian (Florian Pelz)
2019-04-20 15:17                                                           ` pelzflorian (Florian Pelz)
2019-04-20 15:33                                                           ` pelzflorian (Florian Pelz)
2019-04-20 16:32                                                             ` Thomas Schmitt
2019-04-21  7:58                                                               ` pelzflorian (Florian Pelz)
2019-04-21  9:35                                                                 ` Thomas Schmitt
2019-04-21 11:10                                                                   ` pelzflorian (Florian Pelz)
2019-04-21 11:16                                                                 ` Thomas Schmitt
2019-04-21 11:56                                                                   ` pelzflorian (Florian Pelz)
2019-04-21 12:27                                                                     ` Thomas Schmitt
2019-04-21 14:11                                                                       ` pelzflorian (Florian Pelz)
2019-04-21 14:36                                                                         ` Thomas Schmitt
2019-04-22 13:11                                                                           ` Thomas Schmitt
2019-04-23 16:40                                                                       ` pelzflorian (Florian Pelz)
2019-04-23 17:23                                                                         ` Thomas Schmitt
2019-04-17 12:24               ` Ludovic Courtès
2019-04-17 13:42                 ` pelzflorian (Florian Pelz)
2019-04-23 18:14       ` Thomas Schmitt
2019-04-23 19:50         ` pelzflorian (Florian Pelz)
2019-04-23 20:18           ` Thomas Schmitt
2019-04-23 21:43             ` pelzflorian (Florian Pelz)
2019-04-24  6:56               ` Thomas Schmitt
2019-04-24  9:13                 ` pelzflorian (Florian Pelz)
2019-04-24 10:34                   ` Thomas Schmitt
2019-04-24 22:13                     ` Danny Milosavljevic
2019-04-25  7:07                       ` Thomas Schmitt
2019-04-25  9:45                       ` pelzflorian (Florian Pelz)
2019-04-25 13:44                         ` Thomas Schmitt
2019-04-25 14:59                           ` Danny Milosavljevic
2019-04-25 16:22                             ` Thomas Schmitt
2019-04-25 17:55                               ` Danny Milosavljevic
2019-04-25 18:46                                 ` Thomas Schmitt
2019-04-25 19:01                                   ` Danny Milosavljevic
2019-04-25 16:34                         ` Ludovic Courtès
2019-04-26 11:34                           ` pelzflorian (Florian Pelz)
2019-04-26 14:41                             ` Ludovic Courtès
2019-04-26 15:30                               ` pelzflorian (Florian Pelz)
2019-04-26 13:57                           ` Thomas Schmitt
2019-04-27 13:20                             ` Ludovic Courtès
2019-04-27 16:24                               ` Thomas Schmitt
2019-04-28 12:53                                 ` Ludovic Courtès
2019-04-25 11:49                   ` pelzflorian (Florian Pelz)
2019-04-25 15:09                     ` Thomas Schmitt
2019-04-25 15:58                       ` pelzflorian (Florian Pelz)
2019-04-25 16:40                         ` Thomas Schmitt

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=22381672198740946174@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=bug-xorriso@gnu.org \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).