[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#927892: grub-ieee1275-bin: Please add bootinfo.txt for sparc and sparc64



On 27/04/2019 19:26, Thomas Schmitt wrote:

> Hi,
> 
> xorriso-wise, the debian-10.0-sparc64-grub-NETINST-1.iso looks ok:
> 
>   $ xorriso -indev debian-10.0-sparc64-grub-NETINST-1.iso \
>             -report_system_area plain
>   ...
>   Volume id    : 'Debian 10.0 sparc64 n'
>   System area options: 0x0000000c
>   System area summary: SUN-SPARC-Disk-Label
>   ISO image size/512 : 443640
>   SUN SPARC disklabel: CD-ROM Disc with Sun sparc boot created by libisofs
>   SUN SPARC secs/head: 640
>   SUN SPARC heads/cyl: 1
>   SUN SPARC partmap  :   N   IdTag   Perms    StartCyl   NumBlocks
>   SUN SPARC partition:   1  0x0004  0x0010           0      443640
>   SUN SPARC partition:   2  0x0002  0x0010           0      443640
>   SUN SPARC partition:   3  0x0002  0x0010           0      443640
>   SUN SPARC partition:   4  0x0002  0x0010           0      443640
>   SUN SPARC partition:   5  0x0002  0x0010           0      443640
>   SUN SPARC partition:   6  0x0002  0x0010           0      443640
>   SUN SPARC partition:   7  0x0002  0x0010           0      443640
>   SUN SPARC partition:   8  0x0002  0x0010           0      443640
>   SPARC GRUB2 core   : 1748992  453104
>   SPARC GRUB2 path   : /boot/core.img
> 
> xorriso reports /boot/core.img as "SPARC GRUB2 path", because it was
> recognized as comming from the same disk inode as /boot/grub/core.img
> and thus shares the content blocks with it:
> 
>   $ xorriso -indev debian-10.0-sparc64-grub-NETINST-1.iso \
>             -find /boot/core.img -exec report_lba -- \
>             -find /boot/grub/core.img -exec report_lba --
>   ...
>   Report layout: xt , Startlba ,   Blocks , Filesize , ISO image path
>   File data lba:  0 ,      854 ,      222 ,   453104 , '/boot/core.img'
>   Report layout: xt , Startlba ,   Blocks , Filesize , ISO image path
>   File data lba:  0 ,      854 ,      222 ,   453104 , '/boot/grub/core.img'
> 
> So all is well. Except the nearly zero content of bytes 512 to 767 of
> the ISO.

One interesting point: the local man page for genisoimage on my Debian stretch
machine states this:

   -G generic_boot_image
        Specifies  the  path  and filename of the generic boot image to be used
        when making a generic bootable CD.  The boot image will be placed on
        the first 16 sectors of the CD, before the ISO9660 primary volume
        descriptor.  If this option is used together with -sparc-boot, the Sun
        disk label will overlay the first 512 bytes of the generic boot image.

This implies that we need to pad cdboot.img with an initial 512 bytes which matches
what Thomas said in one of his earlier emails:

"grub-mkrescue opens cdboot.img for reading and the image file for -G
for writing and truncates it to 0 length. Then it writes 512 zero bytes,
reads 512 bytes from cdboot.img and writes them to the -G image file."


ATB,

Mark.


Reply to: