Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-18 Thread Thomas Schmitt
Hi,

> I notice that isohybrid is not present on my system.

One may question the wisdom to put isohdpfx.bin into package "isolinux"
and the equivalent program into "syslinux-utils".


> I suspect that this is another missing dependency of live-wrapper.

Only if lwr already uses it. (Shouldn't there be an error message if
such a usage attempt happens ?)

I still wonder whether
  https://debian-live.alioth.debian.org/live-wrapper-doc/_modules/lwr
is the right place for me to inspect lwr source code.


> # xorriso -indev live.iso -report_el_torito plain -report_system_area plain
> xorriso 1.4.4 : RockRidge filesystem manipulator, libburnia project.

Freshest release. :))

> xorriso : NOTE : No System Area was loaded

This means that no MBR or GPT was stored at the start of the ISO image. 

Reading my own man page i see that GPT is not generated by -as mkisofs
option -isohybrid-gpt-basdat if no isohybrid MBR is present. (This can
be overridden since the most recent release, but you actually want the
isohybrid MBR x86 machine code to be present.)

As said, the x86 MBR can be added by xorriso during the lwr run.
Either by generic command

  -boot_image isolinux system_area=/usr/lib/ISOLINUX/isohdpfx.bin

or by -as mkisofs option

  -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin

Afterwards there is no need to post-process by program "isohybrid".

(Traditional mkisofs option -G is not sufficient because the MBR code
 needs to get patched by the ISO block address of file isohybrid.bin.)


> isohybrid -u live.iso
> ...
> El Torito boot img :   1  BIOS  y   none  0x  0x00  4 286
> El Torito boot img :   2  UEFI  y   none  0x  0x00832  78
> ...
> System area summary: MBR isohybrid cyl-align-on GPT
> ...
> MBR partition  :   2   0x00  0xef  312  832

This should boot via BIOS and EFI from CD/DVD/BD and disk-like devices
like USB stick or memory card.
(Actually the GPT is invalid because there is a MBR partition of type 0xEF
 which will be used by standards compliant EFI implementations. This is
 not a bug but a feature of mjg59's isohybrid specs.)

The effect of isohybrid option -u is achieved by -as mkisofs option

  -isohybrid-gpt-basdat

or by generic xorriso command

  -boot_image isolinux partition_entry=gpt_basdat

if an isohybrid MBR emerges from the xorriso run.


> GPT partname local :   1  ISOHybrid ISO

So Debian already has the fixed version without pseudo-chinese GPT partition
names.


Have a nice day :)

Thomas



Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-17 Thread Ben Caradoc-Davies

Thomas,

if I manually install syslinux-utils and run "isohybrid -u live.iso", 
live.iso is updated in place and boot loading appears to work correctly 
as a CDROM, BIOS, or UEFI. My expectation was that "lwr" would perform 
this step, as live-build "lb" does.


Note that I then encounter a kernel panic caused by missing live scripts:

Bug#831637: live-wrapper: kernel panic: Can't open /scripts/live
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831637

$ xorriso -indev live.iso -report_el_torito plain -report_system_area plain
xorriso 1.4.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 260 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is 
set to be discarded

Drive current: -indev 'live.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , MBR isohybrid cyl-align-on GPT
Media summary: 1 session, 72751 data blocks,  142m data, 11.7g free
Volume id: 'ISOIMAGE'
El Torito catalog  : 77  1
El Torito cat path : /boot/isolinux/boot.cat
El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz LBA
El Torito boot img :   1  BIOS  y   none  0x  0x00  4 286
El Torito boot img :   2  UEFI  y   none  0x  0x00832  78
El Torito img path :   1  /boot/isolinux/isolinux.bin
El Torito img opts :   1  boot-info-table isohybrid-suitable
El Torito img path :   2  /boot/grub/efi.img
System area options: 0x0102
System area summary: MBR isohybrid cyl-align-on GPT
ISO image size/512 : 291132
Partition offset   : 0
MBR heads per cyl  : 64
MBR secs per head  : 32
MBR partition table:   N Status  TypeStart   Blocks
MBR partition  :   1   0x80  0x000   292864
MBR partition  :   2   0x00  0xef  312  832
MBR partition path :   2  /boot/grub/efi.img
GPT:   N  Info
GPT disk GUID  :  16dd6fb8162c1442a12605e95e0172d3
GPT entry array:  2  128  overlapping
GPT lba range  :  34  292830  292863
GPT partition name :   1 
490053004f004800790062007200690064002000490053004f00

GPT partname local :   1  ISOHybrid ISO
GPT partition GUID :   1  6f2947ade4d36545836d80b257b73ce7
GPT type GUID  :   1  a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags:   1  0x
GPT start and size :   1  0  291132
GPT partition name :   2  490053004f00480079006200720069006400
GPT partname local :   2  ISOHybrid
GPT partition GUID :   2  f834fc245dcc6f428393c160cfec04ce
GPT type GUID  :   2  a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags:   2  0x
GPT start and size :   2  312  832
GPT partition path :   2  /boot/grub/efi.img

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-17 Thread Ben Caradoc-Davies
Thanks, Thomas. The xorriso report indicates that both BIOS and UEFI 
boot images are present.


I notice that isohybrid is not present on my system. This might cause 
silent failure of the isohybrid step. I suspect that this is another 
missing dependency of live-wrapper. I have manually installed 
syslinux-utils and will try again and report back.



# xorriso -indev live.iso -report_el_torito plain -report_system_area plain
xorriso 1.4.4 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 260 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is 
set to be discarded

Drive current: -indev 'live.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito
Media summary: 1 session, 72751 data blocks,  142m data, 12.1g free
Volume id: 'ISOIMAGE'
El Torito catalog  : 77  1
El Torito cat path : /boot/isolinux/boot.cat
El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz LBA
El Torito boot img :   1  BIOS  y   none  0x  0x00  4 286
El Torito boot img :   2  UEFI  y   none  0x  0x00832  78
El Torito img path :   1  /boot/isolinux/isolinux.bin
El Torito img opts :   1  boot-info-table isohybrid-suitable
El Torito img path :   2  /boot/grub/efi.img
xorriso : NOTE : No System Area was loaded


Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-17 Thread Thomas Schmitt
Hi,

if the live.iso has ISOLINUX boot software and an El Torito boot record
for PC-BIOS, then you may apply SYSLINUX program "isohybrid" to it.

To inspect the existing boot equipment of the ISO, run

  xorriso -indev live.iso -report_el_torito plain -report_system_area plain

If it reports that the first boot image file is for BIOS and has name
"isolinux.bin":

  El Torito boot img :   1  BIOS  y   none  0x  0x00  43544
  ...
  El Torito img path :   1  /isolinux/isolinux.bin

then it is most probably suitable for program "isohybrid".

If it reports "eltorito.img", then it's GRUB2 based and not suitable for
program "isohybrid":

  El Torito img path :   1  /boot/grub/i386-pc/eltorito.img

(GRUB2 program grub-mkrescue is well able to let xorriso build ISOs with MBR
 and GPT. There is just no postprocessing program which would do this on the
 existing El Torito equipped ISO image.)



Being developer of xorriso i offer advise with choosing the necessary
arguments for the prepared boot loader equipment.

In
  
https://debian-live.alioth.debian.org/live-wrapper-doc/_modules/lwr/xorriso.html
i see an interesting mix of generic xorriso commands and -as mkisofs
emulation options. In the EFI case one would get a MBR partition of type 0xEF
for boot/grub/efi.img but no MBR x86 boot code for PC-BIOS, which would hop
onto /boot/isolinux/isolinux.bin if the ISO.

That x86 code would come on Debian 8 from file
   /usr/lib/ISOLINUX/isohdpfx.bin
out of package "isolinux".

An additional xorriso command -boot_image would insert it into the
resulting ISO:

  if self.isolinux:
  self.args.extend(['-boot_image', 'isolinux', 'dir=/boot/isolinux',
'-boot_image', 'isolinux',
'system_area=/usr/lib/ISOLINUX/isohdpfx.bin'])

The GRUB2 based EFI part could be written as generic xorriso commands, too:

  if self.grub:
  self.args.extend(['-boot_image', 'any', 'next',
'-boot_image', 'any', 'efi_path=/boot/grub/efi.img',
'-boot_image', 'isolinux',
'partition_entry=gpt_basdat'])

(Most boot ISO preparers use -as mkisofs emulation options for the whole
 xorriso run, rather than xorriso's generic commands like -outdev, -map,
 or -boot_image.)


Have a nice day :)

Thomas



Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-14 Thread Michael .
Wow I'm impressed you got that far.
All I get is an empty folder and a log file that I cant read.
I was going to test it tomorrow morning and if nothing different occurs was
going to file a bug report then.

On 15 July 2016 at 12:16, Ben Caradoc-Davies  wrote:

> Package: live-wrapper
> Version: 0.3
> Severity: normal
>
> Dear Maintainer,
>
> the output live.iso produced by lwr has neither MBR nor any partitions
> (MBR or
> GPT). It appears to be a plain ISO image. It cannot be booted from a thumb
> drive.
>
> Kind regards,
> Ben.
>
>
>
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages live-wrapper depends on:
> ii  python-cliapp  1.20160316-1
> pn  python:any 
> ii  vmdebootstrap  1.5-1
>
> live-wrapper recommends no packages.
>
> live-wrapper suggests no packages.
>
> -- no debconf information
>
>


Bug#831368: live-wrapper: output live.iso not isohybrid, cannot be booted from thumb drive

2016-07-14 Thread Ben Caradoc-Davies
Package: live-wrapper
Version: 0.3
Severity: normal

Dear Maintainer,

the output live.iso produced by lwr has neither MBR nor any partitions (MBR or
GPT). It appears to be a plain ISO image. It cannot be booted from a thumb
drive.

Kind regards,
Ben.



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages live-wrapper depends on:
ii  python-cliapp  1.20160316-1
pn  python:any 
ii  vmdebootstrap  1.5-1

live-wrapper recommends no packages.

live-wrapper suggests no packages.

-- no debconf information