Re: Debian-live manual: bad advice and bad URL

2017-11-02 Thread Thomas Schmitt
Hi,

Lou Poppler wrote:
> In section 4.5.3 the suggestion for adding a partition to extra space at
> the end of a live image USB stick says to use parted or Gparted.
> For the current live images, with a xorisso-style partition layout,
> (for example the file debian-live-9.2.0-amd64-kde+nonfree.iso)
> parted (as of 3.2-17) and gparted (as of 0.25.0-1+b1) do not detect
> the first partition,

Indeed most partition editors and operating systems regard an MBR partition
of type 0x00 as unused. Even fdisk lists it as "Empty". The need for
type 0x00 comes from the fact that the EFI partition is a data file in the
ISO filesystem. EFI forbids overlapping partitions but also states that
partitions of type 0x00 may be ignored.

The layout is originally the one of SYSLINUX program "isohybrid" with
option "--uefi". Developed by Matthew J. Garrett for Fedora.
See also
  http://mjg59.dreamwidth.org/11285.html

-

My personal favorite is different. It has the EFI partition as appended
MBR partition outside the ISO 9660 filesystem. Somehow like in the Debian
netinst ISOs for arm64:

  $ /sbin/fdisk -l debian-8.6.0-arm64-netinst.iso
  ...
  Device  Boot  StartEnd Sectors  Size Id Type
  debian-8.6.0-arm64-netinst.iso1   0 331775  331776  162M 83 Linux
  debian-8.6.0-arm64-netinst.iso2  331776 33382320481M ef EFI 
(FAT-12/

No invalid GPT (as we have MBR partitions of types other than 0xee),
no partition of type 0x00.

Since xorriso-1.4.6 it is mainly about replacing xorrisofs options

  -e '/boot/grub/efi.img'
  -no-emul-boot
  -isohybrid-gpt-basdat

by these options

  -append_partition 2 0xef ...disk.path.../efi.img
  -e --interval:appended_partition_2:all::
  -no-emul-boot

and keeping efi.img out of the input trees for the ISO 9660 filesystem. 
"...disk.path..." is to be replaced with an absolute or relative path
on the producing system.


An appended partition has the disadvantage that the image file is larger than
told by program "isosize". So instructions for verifying the image checksum
on DVD or USB stick might fail.
This can be salvaged at the cost of a second superblock and directory tree
by using xorriso-1.4.8 and xorrisofs option

  -partition_offset 16

The ISO filesystem outside partition 1 will then claim the range up to the
end of the appended partition.

One may explicitely choose the partition type of the ISO 9660 partition by
any 8-bit hex value instead of 0x83 with option

  -iso_mbr_part_type 0x83


With xorriso versions older than 1.4.6, one has to put the EFI image twice
into the ISO image. Once as data file for El Torito DVD booting, once as
appended partition for booting from USB stick:
  -e '/boot/grub/efi.img'
  -no-emul-boot
  -append_partition 2 0xef ...disk.path.../efi.img
In this case, /boot/grub/efi.img must be in the input trees for the
filesystem.


Have a nice day :)

Thomas



Re: Debian-live manual: bad advice and bad URL

2017-11-02 Thread Michael .
Hi Lou

The Live Manual (that is a live-build, not live-wrapper, package) wasn't
written for official stretch based releases. The reason for this is
official stretch live releases are built with live-wrapper not live-build.
I, personally, believe the "live manual" should be re-written and note the
differences between the 2 build systems. Last time I looked the official
documentation for live-wrapper was extremely minimal so it could certainly
do with some work and, in order to stop alot of what I see as confusion
because people keep talking about current debian live as though it is
live-build based and not live-wrapper based, including both systems in it
would be very helpful.

Cheers.

On 3 November 2017 at 07:14, Lou Poppler  wrote:

> I would like to point out 2 small corrections to the debian-live manual
> http://debian-live.alioth.debian.org/live-manual/stable/
> manual/html/live-manual.en.html
>
> At this point I am far from able to create and commit changes myself,
> so I offer them to this list, hoping someone else might propagate them.
>
> In section 4.2 the URL given for older, upcoming, and unofficial live
> images
> http://debian-live.alioth.debian.org/cdimage/release/
> is 404.  I would suggest instead listing this URL:
> https://cdimage.debian.org/cdimage/
>
> In section 4.5.3 the suggestion for adding a partition to extra space at
> the end of a live image USB stick says to use parted or Gparted.
> For the current live images, with a xorisso-style partition layout,
> (for example the file debian-live-9.2.0-amd64-kde+nonfree.iso)
> parted (as of 3.2-17) and gparted (as of 0.25.0-1+b1) do not detect
> the first partition, containing the entire .iso, they only notice
> the small 500KB EFI partition 2, embedded inside it.  They see the
> first partition as empty space, and will allow using the space after
> partition 2 in creating a new partition 3.  Thus these programs are
> no longer appropriate in this case.  Regular old fdisk (as of 2.29.2-1)
> works correctly for this; gnome-disks (as of 3.22.1-1) works correctly
> for this.  These 2 would be good suggestions for this section of the
> webpage.  I also checked KDE partitionmanager (as of 3.0.0-1) and it
> does not see the partition 1, and incorrectly offers to include part
> of it in a new partition, like parted on which it is based I think.
>
> Thanks to anyone who can help update this documentation.
>
>