Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Gigaboot fails - can't read bootloader disk

140 views
Skip to first unread message

Markus Fuchs

unread,
Oct 20, 2021, 8:35:03 AM10/20/21
to discuss
Hello,

I built Fuchsia using the following commands.

fx set core.x64 --ccache
fx build

Afterwards I created a installer on USB via

markus@pc $: fx mkinstaller -v /dev/sdd
mkinstaller: WARNING: Changing ownership of /dev/sdd to markus
mkinstaller: DEBUG: Skipping image that wasn't built: zircon-r.signed_zbi.signed
mkinstaller: DEBUG: Skipping image that wasn't built: zircon-a.signed_zbi.signed
mkinstaller: INFO: Creating new GPT partition table...
mkinstaller: INFO: Done.
mkinstaller: INFO: Creating and writing partitions...
mkinstaller: INFO:    Writing image zedboot.esp.blk to partition zedboot-efi... 
mkinstaller: INFO:      Wrote 26.2M in 6.28s, 4.2M/s
mkinstaller: INFO:    Writing image fuchsia.esp.blk to partition fuchsia.esp... 
mkinstaller: INFO:      Wrote 1039.5K in 0.05s, 19.1M/s
mkinstaller: INFO:    Writing image fuchsia.zbi to partition zircon-a... 
mkinstaller: INFO:      Wrote 24.6M in 4.32s, 5.7M/s
mkinstaller: INFO:    Writing image zedboot.zbi to partition zircon-r... 
mkinstaller: INFO:      Wrote 23.6M in 7.60s, 3.1M/s
mkinstaller: INFO:    Writing image fvm.sparse.blk to partition storage-sparse... 
mkinstaller: INFO:      Wrote 73.2M in 16.14s, 4.5M/s
mkinstaller: INFO: Done.
mkinstaller: INFO: Ejected USB disk

markus@pc $: sudo sfdisk -l
Disk /dev/sdd: 29.25 GiB, 31406948352 bytes, 61341696 sectors
Disk model: Cruzer Glide    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7BD4B71E-3F11-6108-D336-B9440655F95C

Device      Start    End Sectors  Size Type
/dev/sdd1    2048   4095    2048    1M ChromeOS reserved
/dev/sdd2    4096 133119  129024   63M EFI System
/dev/sdd3  133120 135198    2079    1M unknown
/dev/sdd4  135199 185598   50400 24.6M unknown
/dev/sdd5  185599 233995   48397 23.6M unknown
/dev/sdd6  233996 383932  149937 73.2M unknown

When I try to boot the following happens:

Kernel allocation done
PciRoot (0x0)/Pci/(0x1C,0x2)/Pci (0x0,0x0) /MAC (00E04B6B388A,0x1) : Link detected!
macaddr: 00:e0:4b:6b:38:8a
ip6addr: fe80::2e0:4bff:fe6b:388a
snmaddr: ff02::1:ff6b:388a


cmdline: xdc.mmio=0xd0800000 bootloader.default=zedboot bootloader.timeout=1 zircon.nodename=fuchsia-00e0-4b6b-388a
Warning: Cannot find zircon-a partition on bootloader disk
Error: LoadFile: Cannot open file (EFI_NOT_FOUND)
image is too small
zircon.bin is not a valid image
Warning: Cannot find zircon-b partition on bootloader disk
Warning: Cannot find zircon-r partition on bootloader disk
image has invalid bootitem
zedboot.bin is not a valid image

Boot options:
  <enter> to continue default boot
  b) boot menu
  f) fastboot
  1) set A slot active and boot (alternate: m)
  2) set B slot active and boot
  r) one-time boot R slot (alternate: z)
  n) network boot
Auto-boot in 1s


Error: Cannot find misc partition on bootloader disk
failed to read A/B/R metadata.
../../src/firmware/lib/abr/flow.c:172: ERROR: Failed to read metadata.
Fail to get slot info
Error: Cannot find misc partition on bootloader disk
failed to read A/B/R metadata.
../../src/firmware/lib/abr/flow.c:172: ERROR: Failed to read metadata.
../../src/firmware/lib/abr/flow.c:246: ERROR: Failed to load metadata, falling back to recovery mode.
Failed to find a kernel in slot 2
Error: no valid kernel was found
Error: failed to boot from disk 

Any ideas what I might did wrong? Thank you very much.

Simon Shields

unread,
Oct 26, 2021, 12:40:09 AM10/26/21
to Markus Fuchs, discuss
Hi Markus,

What device are you trying to boot Fuchsia on?

It looks like the zedboot image on the USB is invalid for some reason:

image has invalid bootitem
zedboot.bin is not a valid image

Does an image created using `fx mkzedboot` work? (usage: `fx mkzedboot /dev/sdd`)
Can you upload a copy of the file `$(fx get-build-dir)/zedboot.esp.blk`?

Thanks!
Simon

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/discuss/30c68359-6841-4d04-88bc-0dce87f84d63n%40fuchsia.dev.

Markus Fuchs

unread,
Oct 27, 2021, 10:02:59 AM10/27/21
to discuss, Simon Shields, discuss, Markus Fuchs
Hello Simon,

thank you for your answer. I try to boot it on a Intel Atom® Processor E3845 (SILVERMONT / Bay Trail) based board, but it's custom hardware. Anyway should fall in the category "generic x64" pc. And I built core instead of workstation so I don't run into missing graphic card support. And wanted to use `fx mkinstaller` or `fx make-fuchsia-vol` to not run into missing ethernet support either. So I rather don't use `fx mkzedboot`.


Also: `fx qemu` does work for me and the image is booted.


It seems `fx make-fuchsia-vol` has additional problems with the name of the boot partitions.
Failing with errors from `./third_party/android/platform/external/avb/libavb/avb_slot_verify.c` during boot because partitions can't be found.

...
ReadFromPartition: Failed to find partition vbmeta-r
ReadFromPartition: Failed to find partition boot-r
avb_slot_verify.c:655: ERROR: boot-r: Error loading footer.
...

markus@pc $ sudo ./prebuilt/tools/cgpt/linux-x64/cgpt show /dev/sdd
[sudo] password for markus: 
       start        size    part  contents
           0           1          PMBR
           1           1          Pri GPT header
           2          32          Pri GPT table
          40      129024       1  Label: "efi-system"
                                  Type: EFI System Partition
                                  UUID: 0FBA1FA1-AECD-352C-9790-E7306A7370E9
      129064      524288       2  Label: "ZIRCON-A"
                                  Type: DE30CC86-1F4A-4A31-93C4-66F147D33E05
                                  UUID: 3D95464D-62F7-AA15-1A4B-576B565EE8C8
      653352          16       3  Label: "VBMETA_A"
                                  Type: A13B4D9A-EC5F-11E8-97D8-6C3BE52705BF
                                  UUID: A64F80B1-168B-32B8-A6D4-2C51969CE6E8
      653368      524288       4  Label: "ZIRCON-B"
                                  Type: 23CC04DF-C278-4CE7-8471-897D1A4BCDF7
                                  UUID: 73EFC256-9B93-25B8-DD92-18A759FE33AC
     1177656          16       5  Label: "VBMETA_B"
                                  Type: A288ABF2-EC5F-11E8-97D8-6C3BE52705BF
                                  UUID: 3A7B7E85-025C-6E67-F062-F26BAD3A09E9
     1177672      524288       6  Label: "ZIRCON-R"
                                  Type: A0E5CF57-2DEF-46BE-A80C-A2067C37CD49
                                  UUID: BEC03655-79D0-8045-FF48-50496F170B65
     1701960          16       7  Label: "VBMETA_R"
                                  Type: 6A2460C3-CD11-4E8B-80A8-12CCE268ED0A
                                  UUID: C32F9C76-6C90-8687-0845-BFD53A3A4DC5
     1701976          16       8  Label: "MISC"
                                  Type: 1D75395D-F2C6-476B-A8B7-45CC1C97B476
                                  UUID: BD1A953C-C23F-DB0D-D9CA-4F8D5147546E
     1701992    59639671       9  Label: "FVM"
                                  Type: 41D0E340-57E3-954E-8C1E-17ECAC44CFF5
                                  UUID: 3E00D1BF-7331-E825-BD08-3EC83EF85C54
    61341663          32          Sec GPT table
    61341695           1          Sec GPT header

When I was posting here last week, I didn't know yet about bugs.fuchsia.dev. So I guess it's better to post my issues there, rather than to post them on the discussion mailing list.
I also can't attach the requested file here. Sorry
Thank you!


Simon Shields

unread,
Oct 27, 2021, 9:26:29 PM10/27/21
to Markus Fuchs, discuss
On Thu, 28 Oct 2021 at 00:59, Markus Fuchs <mkl...@gmail.com> wrote:
Hello Simon,

thank you for your answer. I try to boot it on a Intel Atom® Processor E3845 (SILVERMONT / Bay Trail) based board, but it's custom hardware. Anyway should fall in the category "generic x64" pc. And I built core instead of workstation so I don't run into missing graphic card support. And wanted to use `fx mkinstaller` or `fx make-fuchsia-vol` to not run into missing ethernet support either. So I rather don't use `fx mkzedboot`.

Ack, fair enough. I tried both `mkinstaller` and `make-fuchsia-vol` on my NUC7i5DNHE and both worked. The partition tables in both cases look identical to the ones you provided.
My suggestion would be to mount the `zedboot.esp` partition and then run `fx host-tool zbi -t /path/to/mountpoint/zedboot.bin`, so that we can confirm that the image on the disk is valid.
Sure, file a bug and assign it to me. Hopefully we can get to the bottom of the problem.
 
I also can't attach the requested file here. Sorry

No worries, monorail might let you attach the file.

Markus Fuchs

unread,
Nov 2, 2021, 6:41:01 AM11/2/21
to discuss, Simon Shields, discuss, Markus Fuchs
markus@pc:/mnt/ssd/fuchsia/fuchsia ((HEAD detached at 5f859d95a7e)) $: fx host-tool zbi -t /home/markus/mntme/zedboot.bin 
BOOTABLE: bootable image
00000020: 000ab660 KERNEL_X64
        :          MAGIC=b5781729 NO CRC
000ab6a0: 00123255 KERNEL (size=002d1000)
        :          MAGIC=b5781729 CRC=110f0919
001ce918: 000000ba CMDLINE
        :          MAGIC=b5781729 CRC=9a725097
001ce9f8: 015d32e5 BOOTFS (size=0563f000)
        :          MAGIC=b5781729 CRC=7b923a34

Message has been deleted

Markus Fuchs

unread,
Nov 2, 2021, 12:49:07 PM11/2/21
to discuss, Simon Shields, discuss, Markus Fuchs
I started a issue over here and also added the zedboot.esp.blk there.
https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=87792

The output of the command shows the following.
markus@pc:~/mntme $: ls
cmdline EFI zedboot.bin
markus@pc:~/mntme $: fx host-tool zbi -t zedboot.bin
ERROR: Cannot find the Platform Source Tree in a parent of the current directory: /home/markus/mntme

On Thursday, 28 October 2021 at 03:26:29 UTC+2 Simon Shields wrote:
Reply all
Reply to author
Forward
0 new messages