10058 loader: Add an ISO9660 "partition table" type to loader.

Review Request #1319 — Created Dec. 11, 2018 and submitted

tsoome
illumos-gate
10058
e7ca335...
general
Update from FreeBSD: https://svnweb.freebsd.org/base?view=revision&revision=332085

When booted via isoboot(8) loader will be handed a disk that simply contains
an ISO9660 image. Currently this confuses it greatly. Teach it how to spot
that it's in this situation and that ISO9660 has one "partition" covering
the whole disk.

Output from lsdev:

ok lsdev -v
fd devices:
    fd0:   BIOS drive A (2880 X 512):
disk devices:
    disk0:   BIOS drive C (41943040 X 512):
      disk0p1: EFI                 256MB
      disk0p2: illumos ZFS         19GB
      disk0p9: Reserved            8192KB
    disk1:   BIOS drive D (41943040 X 512):
      disk1: ISO9660               20GB
    disk2:   BIOS drive E (41943040 X 512):
      disk2p1: EFI                 256MB
      disk2p2: illumos ZFS         19GB
      disk2p9: Reserved            8192KB
  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
domag02
  1. Invalid argument and some format string mismatches.
    1. It is nice find, but not going to fix with this patch. This is separate issue.

  2. usr/src/boot/sys/boot/common/disk.c (Diff revision 1)
     
     

    #include <inttypes.h>
    ....
        sprintf(buf, "%" PRIu64 "%cB", size, unit);
    
  3. usr/src/boot/sys/boot/common/disk.c (Diff revision 1)
     
     

    d_unit is not a member of the disk_devdesc structure.
    It should be:

        DEBUG("%s unit %d, slice %d, partition %d => %p",
            disk_fmtdev(dev), dev->dd.d_unit, dev->d_slice, dev->d_partition, od);
    
  4. usr/src/boot/sys/boot/common/disk.c (Diff revision 1)
     
     

            DEBUG("%s offset %" PRIu64 " => %p", disk_fmtdev(dev),
                dev->d_offset, od);
    
  5. usr/src/boot/sys/boot/common/part.c (Diff revision 1)
     
     

            DEBUG("invalid GPT header size: %u", sz);
    
  6. usr/src/boot/sys/boot/common/part.c (Diff revision 1)
     
     

            DEBUG("unsupported GPT revision %u", hdr->hdr_revision);
    
  7. 
      
citrus
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...