coreos / bugs

Issue tracker for CoreOS Container Linux
https://coreos.com/os/eol/
146 stars 30 forks source link

Update from 1000.0.0 to 1010.1: first boot OK, then crash. But direct install of 1010.1 is OK (MBR corruption after update) #1238

Closed orbistertius closed 8 years ago

orbistertius commented 8 years ago

CoreOS installed on HP MicroServer Gen 8, on ssd in bay 5, with RAID controller in B120i mode, 1 logical RAID0 volume with 1 disk (the ssd in bay 5). This is a common trick to boot MicroServer Gen8 from an internal drive and leave the four 3.5" bays for data disks.

Steps to reproduce the problem:

red_screen_of_death

core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'

The "second boot always broken" seems similar to #1218. But if I install 1010.1.0 instead of 1000.0.0 everything is OK and the system will reboot without problems many many times.

marineam commented 8 years ago

How long was it between the first reboot and the second reboot? Looks like writing the successful flag to USR-B after the first boot didn't happen, update_engine waits 45 seconds after boot before doing that. I would generally assume the risky operation is actually during that first reboot when the bootloader updates the table to decrement the tries counter on USR-B prior to booting it. That second reboot shouldn't have done much different than the fresh install: using USR-A with 1000 on it since USR-B had neither a succesful flag nor any tries left on it. So I'm pretty confused what is up. Maybe there is some caching issue caused by writing to the partition table in the bootloader during first reboot that doesn't crop up and cause issues till the second. Perhaps dumping the table between first and second reboot would offer some insight.

orbistertius commented 8 years ago

Hello @marineam , new test as requested:

core@hp0 ~ $ sudo coreos-install -d /dev/sdb -V 1000.0.0 -C alpha -c hp0.yml -v -b http://mini.example.com:8080/coreos/alpha/
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ case $OPTION in
+ BASE_URL=http://mini.example.com:8080/coreos/alpha/
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ [[ -z /dev/sdb ]]
++ lsblk -n -d -o TYPE /dev/sdb
+ [[ disk =~ ^(disk|loop|lvm)$ ]]
+ [[ ! -w /dev/sdb ]]
+ [[ -n hp0.yml ]]
+ [[ ! -f hp0.yml ]]
+ type -P coreos-cloudinit
+ coreos-cloudinit -from-file=hp0.yml -validate
2016/04/23 09:53:06 Checking availability of "local-file"
2016/04/23 09:53:06 Fetching user-data from datasource of type "local-file"
+ [[ -n '' ]]
+ [[ -n '' ]]
+ IMAGE_NAME=coreos_production_image.bin.bz2
+ [[ 1000.0.0 =~ ^(alpha|beta|stable)$ ]]
+ [[ -z http://mini.example.com:8080/coreos/alpha/ ]]
+ IMAGE_URL=http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2
+ SIG_NAME=coreos_production_image.bin.bz2.sig
+ SIG_URL=http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2.sig
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2.sig
++ mktemp --tmpdir -d coreos-install.XXXXXXXXXX
+ WORKDIR=/tmp/coreos-install.9UBN5Sq6bT
+ trap 'rm -rf '\''/tmp/coreos-install.9UBN5Sq6bT'\''' EXIT
+ export GNUPGHOME=/tmp/coreos-install.9UBN5Sq6bT/gnupg
+ GNUPGHOME=/tmp/coreos-install.9UBN5Sq6bT/gnupg
+ mkdir /tmp/coreos-install.9UBN5Sq6bT/gnupg
+ gpg --batch --quiet --import
+ echo 'Downloading the signature for http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2...'
Downloading the signature for http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2...
+ wget --inet4-only --no-verbose -O /tmp/coreos-install.9UBN5Sq6bT/coreos_production_image.bin.bz2.sig http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2.sig
2016-04-23 09:53:06 URL:http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2.sig [543/543] -> "/tmp/coreos-install.9UBN5Sq6bT/coreos_production_image.bin.bz2.sig" [1]
+ echo 'Downloading, writing and verifying coreos_production_image.bin.bz2...'
Downloading, writing and verifying coreos_production_image.bin.bz2...
+ declare -a EEND
+ wget --inet4-only --no-verbose -O - http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2
+ tee /dev/fd/63
+ gpg --batch --trusted-key 50E0885593D2DCB4 --verify /tmp/coreos-install.9UBN5Sq6bT/coreos_production_image.bin.bz2.sig -
++ bunzip2 --stdout
2016-04-23 09:53:58 URL:http://mini.example.com:8080/coreos/alpha//1000.0.0/coreos_production_image.bin.bz2 [257060676/257060676] -> "-" [1]
gpg: Signature made Sun Mar 27 07:08:32 2016 UTC using RSA key ID 1CB5FA26
gpg: key 93D2DCB4 marked as ultimately trusted
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
+ blockdev --rereadpt /dev/sdb
+ [[ -n hp0.yml ]]
++ blkid -t LABEL=ROOT -o device /dev/sdb /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 /dev/sdb6 /dev/sdb7 /dev/sdb9
+ ROOT_DEV=/dev/sdb9
+ [[ -z /dev/sdb9 ]]
+ mkdir -p /tmp/coreos-install.9UBN5Sq6bT/rootfs
+ case $(blkid -t "LABEL=ROOT" -o value -s TYPE "${ROOT_DEV}") in
++ blkid -t LABEL=ROOT -o value -s TYPE /dev/sdb9
+ mount /dev/sdb9 /tmp/coreos-install.9UBN5Sq6bT/rootfs
+ trap 'umount '\''/tmp/coreos-install.9UBN5Sq6bT/rootfs'\'' && rm -rf '\''/tmp/coreos-install.9UBN5Sq6bT'\''' EXIT
+ [[ -n hp0.yml ]]
+ echo 'Installing cloud-config...'
Installing cloud-config...
+ mkdir -p /tmp/coreos-install.9UBN5Sq6bT/rootfs/var/lib/coreos-install
+ cp hp0.yml /tmp/coreos-install.9UBN5Sq6bT/rootfs/var/lib/coreos-install/user_data
+ [[ -n '' ]]
+ umount /tmp/coreos-install.9UBN5Sq6bT/rootfs
+ trap 'rm -rf '\''/tmp/coreos-install.9UBN5Sq6bT'\''' EXIT
+ [[ -n '' ]]
+ rm -rf /tmp/coreos-install.9UBN5Sq6bT
+ trap - EXIT
+ echo 'Success! CoreOS alpha 1000.0.0 is installed on /dev/sdb'
Success! CoreOS alpha 1000.0.0 is installed on /dev/sdb
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856     4427776       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00000000-0000-0000-0000-000000000001
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 9289694
Partitions will be aligned on 2048-sector boundaries
Total free space is 8125 sectors (4.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          266239   128.0 MiB   EF00  EFI-SYSTEM
   2          266240          270335   2.0 MiB     EF02  BIOS-BOOT
   3          270336         2367487   1024.0 MiB  FFFF  USR-A
   4         2367488         4464639   1024.0 MiB  FFFF  USR-B
   6         4464640         4726783   128.0 MiB   8300  OEM
   7         4726784         4857855   64.0 MiB    FFFF  OEM-CONFIG
   9         4857856         9285631   2.1 GiB     FFFF  ROOT

Command (? for help): v

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Identified 1 problems!

Command (? for help): q
core@hp0 ~ $ 
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
   488397167           1          Sec GPT header
core@hp0 ~ $ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B6966EA2-D6D1-4D15-B900-50F308D564F3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          266239   128.0 MiB   EF00  EFI-SYSTEM
   2          266240          270335   2.0 MiB     EF02  BIOS-BOOT
   3          270336         2367487   1024.0 MiB  FFFF  USR-A
   4         2367488         4464639   1024.0 MiB  FFFF  USR-B
   6         4464640         4726783   128.0 MiB   8300  OEM
   7         4726784         4857855   64.0 MiB    FFFF  OEM-CONFIG
   9         4857856       488397134   230.6 GiB   FFFF  ROOT

Command (? for help): q
core@hp0 ~ $ update_engine_client -check_for_update
pr 23 11:36:14 hp0 update_engine[653]: [0423/113614:INFO:delta_performer.cc(103)] Completed 895/1017 operations (88%), 195140565/210163417 bytes downloaded (92%), overall progress 90%
Apr 23 11:36:44 hp0 update_engine[653]: [0423/113644:INFO:delta_performer.cc(103)] Completed 942/1017 operations (92%), 206511061/210163417 bytes downloaded (98%), overall progress 95%
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:delta_performer.cc(717)] Skipping hash verification for signature operation 1017
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:delta_performer.cc(688)] Extracted signature data of size 528 at 210106557
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:delta_performer.cc(103)] Completed 1017/1017 operations (100%), 210163417/210163417 bytes downloaded (100%), overall progress 100%
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 210163417 bytes downloaded
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:multi_range_http_fetcher.cc(150)] Received transfer complete.
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:multi_range_http_fetcher.cc(107)] TransferEnded w/ code 200
Apr 23 11:36:52 hp0 update_engine[653]: [0423/113652:INFO:multi_range_http_fetcher.cc(141)] Done w/ all transfers
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:update_attempter.cc(408)] Download status: inactive
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:delta_performer.cc(771)] Verifying delta payload using public key: /usr/share/update_engine/update-payload-key.pub.pem
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_signer.cc(265)] signature size = 528
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_state.cc(70)] Payload downloaded successfully
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_state.cc(246)] Incrementing the payload attempt number
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_state.cc(282)] Resetting backoff expiry time as payload backoff is disabled
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished DownloadAction, starting OmahaRequestAction
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 11:36:53 hp0 update_engine[653]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 23 11:36:53 hp0 update_engine[653]: <os version="Chateau" platform="CoreOS" sp="1000.0.0_x86_64"></os>
Apr 23 11:36:53 hp0 update_engine[653]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="1000.0.0" track="alpha" bootid="{c26cbc61-f671-43dc-a164-581ad058fb1f}" oem="" oemversion="" alephversion="1000.0.0" machineid="1f3ce1bfed044b2783c4baedaef95714" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 23 11:36:53 hp0 update_engine[653]: <event eventtype="14" eventresult="1"></event>
Apr 23 11:36:53 hp0 update_engine[653]: </app>
Apr 23 11:36:53 hp0 update_engine[653]: </request>
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 11:36:53 hp0 update_engine[653]: <response protocol="3.0" server="update.core-os.net">
Apr 23 11:36:53 hp0 update_engine[653]: <daystart elapsed_seconds="0"></daystart>
Apr 23 11:36:53 hp0 update_engine[653]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 23 11:36:53 hp0 update_engine[653]: <updatecheck status="ok">
Apr 23 11:36:53 hp0 update_engine[653]: <urls>
Apr 23 11:36:53 hp0 update_engine[653]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 23 11:36:53 hp0 update_engine[653]: </urls>
Apr 23 11:36:53 hp0 update_engine[653]: <manifest version="1010.1.0">
Apr 23 11:36:53 hp0 update_engine[653]: <packages>
Apr 23 11:36:53 hp0 update_engine[653]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 23 11:36:53 hp0 update_engine[653]: </packages>
Apr 23 11:36:53 hp0 update_engine[653]: <actions>
Apr 23 11:36:53 hp0 update_engine[653]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 23 11:36:53 hp0 update_engine[653]: </actions>
Apr 23 11:36:53 hp0 update_engine[653]: </manifest>
Apr 23 11:36:53 hp0 update_engine[653]: </updatecheck>
Apr 23 11:36:53 hp0 update_engine[653]: </app>
Apr 23 11:36:53 hp0 update_engine[653]: </response>
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished OmahaRequestAction, starting FilesystemCopierAction
Apr 23 11:36:53 hp0 update_engine[653]: [0423/113653:INFO:filesystem_copier_action.cc(315)] Filesystem size: 1065345024
Apr 23 11:36:58 hp0 update_engine[653]: [0423/113658:INFO:filesystem_copier_action.cc(283)] Hash: gD7U7Jh0At1zGYnvajaW3F5pXJBz811ToaVlVe4Q7yM=
Apr 23 11:36:58 hp0 update_engine[653]: [0423/113658:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished FilesystemCopierAction, starting PostinstallRunnerAction
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:subprocess.cc(46)] Subprocess output:
Apr 23 11:36:59 hp0 update_engine[653]: '/tmp/au_postint_mount.enj3tx/boot/vmlinuz' -> '/boot/coreos/vmlinuz-b'
Apr 23 11:36:59 hp0 update_engine[653]: start        size    part  contents
Apr 23 11:36:59 hp0 update_engine[653]: 2367488     2097152       4  Label: "USR-B"
Apr 23 11:36:59 hp0 update_engine[653]: Type: Alias for coreos-rootfs
Apr 23 11:36:59 hp0 update_engine[653]: UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
Apr 23 11:36:59 hp0 update_engine[653]: Attr: priority=2 tries=1 successful=0
Apr 23 11:36:59 hp0 update_engine[653]: COREOS_RELEASE_VERSION=1010.1.0
Apr 23 11:36:59 hp0 update_engine[653]: Setup USR-B (/dev/sdb4) for next boot.
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:postinstall_runner_action.cc(79)] Postinst command succeeded
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished PostinstallRunnerAction, starting OmahaRequestAction
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 11:36:59 hp0 update_engine[653]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 23 11:36:59 hp0 update_engine[653]: <os version="Chateau" platform="CoreOS" sp="1000.0.0_x86_64"></os>
Apr 23 11:36:59 hp0 update_engine[653]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="1000.0.0" track="alpha" bootid="{c26cbc61-f671-43dc-a164-581ad058fb1f}" oem="" oemversion="" alephversion="1000.0.0" machineid="1f3ce1bfed044b2783c4baedaef95714" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 23 11:36:59 hp0 update_engine[653]: <event eventtype="3" eventresult="1"></event>
Apr 23 11:36:59 hp0 update_engine[653]: </app>
Apr 23 11:36:59 hp0 update_engine[653]: </request>
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 11:36:59 hp0 update_engine[653]: <response protocol="3.0" server="update.core-os.net">
Apr 23 11:36:59 hp0 update_engine[653]: <daystart elapsed_seconds="0"></daystart>
Apr 23 11:36:59 hp0 update_engine[653]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 23 11:36:59 hp0 update_engine[653]: <updatecheck status="ok">
Apr 23 11:36:59 hp0 update_engine[653]: <urls>
Apr 23 11:36:59 hp0 update_engine[653]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 23 11:36:59 hp0 update_engine[653]: </urls>
Apr 23 11:36:59 hp0 update_engine[653]: <manifest version="1010.1.0">
Apr 23 11:36:59 hp0 update_engine[653]: <packages>
Apr 23 11:36:59 hp0 update_engine[653]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 23 11:36:59 hp0 update_engine[653]: </packages>
Apr 23 11:36:59 hp0 update_engine[653]: <actions>
Apr 23 11:36:59 hp0 update_engine[653]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 23 11:36:59 hp0 update_engine[653]: </actions>
Apr 23 11:36:59 hp0 update_engine[653]: </manifest>
Apr 23 11:36:59 hp0 update_engine[653]: </updatecheck>
Apr 23 11:36:59 hp0 update_engine[653]: </app>
Apr 23 11:36:59 hp0 update_engine[653]: </response>
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:action_processor.cc(65)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:action_processor.cc(73)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:update_attempter.cc(283)] Processing Done.
Apr 23 11:36:59 hp0 update_engine[653]: [0423/113659:INFO:update_attempter.cc(309)] Update successfully applied, waiting to reboot.
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
   488397167           1          Sec GPT header
Last login: Sat Apr 23 11:29:47 2016 from 192.168.242.1
CoreOS alpha (1010.1.0)
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'

core@hp0 ~ $ uptime
 11:48:02 up 3 min,  1 user,  load average: 0.31, 0.09, 0.03
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: ^C
core@hp0 ~ $ 
core@hp0 ~ $ sudo systemctl reboot
orbistertius commented 8 years ago

Same test, starting from Alpha 991.0.0

core@hp0 ~ $ sudo coreos-install -d /dev/sdb -V 991.0.0 -C alpha -c hp0.yml -v -b http://mini.example.com:8080/coreos/alpha
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ case $OPTION in
+ BASE_URL=http://mini.example.com:8080/coreos/alpha
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ [[ -z /dev/sdb ]]
++ lsblk -n -d -o TYPE /dev/sdb
+ [[ disk =~ ^(disk|loop|lvm)$ ]]
+ [[ ! -w /dev/sdb ]]
+ [[ -n hp0.yml ]]
+ [[ ! -f hp0.yml ]]
+ type -P coreos-cloudinit
+ coreos-cloudinit -from-file=hp0.yml -validate
2016/04/23 14:34:34 Checking availability of "local-file"
2016/04/23 14:34:34 Fetching user-data from datasource of type "local-file"
+ [[ -n '' ]]
+ [[ -n '' ]]
+ IMAGE_NAME=coreos_production_image.bin.bz2
+ [[ 991.0.0 =~ ^(alpha|beta|stable)$ ]]
+ [[ -z http://mini.example.com:8080/coreos/alpha ]]
+ IMAGE_URL=http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2
+ SIG_NAME=coreos_production_image.bin.bz2.sig
+ SIG_URL=http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2.sig
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2.sig
++ mktemp --tmpdir -d coreos-install.XXXXXXXXXX
+ WORKDIR=/tmp/coreos-install.H8NX3gCQvQ
+ trap 'rm -rf '\''/tmp/coreos-install.H8NX3gCQvQ'\''' EXIT
+ export GNUPGHOME=/tmp/coreos-install.H8NX3gCQvQ/gnupg
+ GNUPGHOME=/tmp/coreos-install.H8NX3gCQvQ/gnupg
+ mkdir /tmp/coreos-install.H8NX3gCQvQ/gnupg
+ gpg --batch --quiet --import
+ echo 'Downloading the signature for http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2...'
Downloading the signature for http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2...
+ wget --inet4-only --no-verbose -O /tmp/coreos-install.H8NX3gCQvQ/coreos_production_image.bin.bz2.sig http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2.sig
2016-04-23 14:34:34 URL:http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2.sig [543/543] -> "/tmp/coreos-install.H8NX3gCQvQ/coreos_production_image.bin.bz2.sig" [1]
+ echo 'Downloading, writing and verifying coreos_production_image.bin.bz2...'
Downloading, writing and verifying coreos_production_image.bin.bz2...
+ declare -a EEND
+ wget --inet4-only --no-verbose -O - http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2
+ gpg --batch --trusted-key 50E0885593D2DCB4 --verify /tmp/coreos-install.H8NX3gCQvQ/coreos_production_image.bin.bz2.sig -
++ bunzip2 --stdout
+ tee /dev/fd/63
2016-04-23 14:35:29 URL:http://mini.example.com:8080/coreos/alpha/991.0.0/coreos_production_image.bin.bz2 [256201206/256201206] -> "-" [1]
gpg: Signature made Fri Mar 18 06:19:45 2016 UTC using RSA key ID 1CB5FA26
gpg: key 93D2DCB4 marked as ultimately trusted
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
+ blockdev --rereadpt /dev/sdb
+ [[ -n hp0.yml ]]
++ blkid -t LABEL=ROOT -o device /dev/sdb /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4 /dev/sdb6 /dev/sdb7 /dev/sdb9
+ ROOT_DEV=/dev/sdb9
+ [[ -z /dev/sdb9 ]]
+ mkdir -p /tmp/coreos-install.H8NX3gCQvQ/rootfs
+ case $(blkid -t "LABEL=ROOT" -o value -s TYPE "${ROOT_DEV}") in
++ blkid -t LABEL=ROOT -o value -s TYPE /dev/sdb9
+ mount /dev/sdb9 /tmp/coreos-install.H8NX3gCQvQ/rootfs
+ trap 'umount '\''/tmp/coreos-install.H8NX3gCQvQ/rootfs'\'' && rm -rf '\''/tmp/coreos-install.H8NX3gCQvQ'\''' EXIT
+ [[ -n hp0.yml ]]
+ echo 'Installing cloud-config...'
Installing cloud-config...
+ mkdir -p /tmp/coreos-install.H8NX3gCQvQ/rootfs/var/lib/coreos-install
+ cp hp0.yml /tmp/coreos-install.H8NX3gCQvQ/rootfs/var/lib/coreos-install/user_data
+ [[ -n '' ]]
+ umount /tmp/coreos-install.H8NX3gCQvQ/rootfs
+ trap 'rm -rf '\''/tmp/coreos-install.H8NX3gCQvQ'\''' EXIT
+ [[ -n '' ]]
+ rm -rf /tmp/coreos-install.H8NX3gCQvQ
+ trap - EXIT
+ echo 'Success! CoreOS alpha 991.0.0 is installed on /dev/sdb'
Success! CoreOS alpha 991.0.0 is installed on /dev/sdb
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: 80484DD2-715E-4E07-B0F3-BBCB85D25A93
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: E45750A0-259A-4236-AA04-B2D2D16EDE54
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8456F927-6054-4A8F-9C43-105033EC808D
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: 357447A1-7D45-4CB9-B58F-9291B7382B79
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: 3DE5A2CF-B6B5-4511-96F6-6DCE8AEEAA49
   488397135          32          Sec GPT table
   488397167           1          Sec GPT header
core@hp0 ~ $ update_engine_client -check_for_update
Apr 23 14:55:35 hp0 update_engine[654]: [0423/145535:INFO:delta_performer.cc(103)] Completed 672/1017 operations (66%), 156922299/210163417 bytes downloaded (74%), overall progress 70%
Apr 23 14:56:05 hp0 update_engine[654]: [0423/145605:INFO:delta_performer.cc(103)] Completed 776/1017 operations (76%), 175961044/210163417 bytes downloaded (83%), overall progress 79%
Apr 23 14:56:07 hp0 update_engine[654]: [0423/145607:INFO:delta_performer.cc(103)] Completed 778/1017 operations (76%), 176550868/210163417 bytes downloaded (84%), overall progress 80%
Apr 23 14:56:33 hp0 update_engine[654]: [0423/145633:INFO:delta_performer.cc(103)] Completed 895/1017 operations (88%), 195146708/210163417 bytes downloaded (92%), overall progress 90%
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:delta_performer.cc(717)] Skipping hash verification for signature operation 1017
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:delta_performer.cc(688)] Extracted signature data of size 528 at 210106557
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:delta_performer.cc(103)] Completed 1017/1017 operations (100%), 210163417/210163417 bytes downloaded (100%), overall progress 100%
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 210163417 bytes downloaded
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:multi_range_http_fetcher.cc(150)] Received transfer complete.
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:multi_range_http_fetcher.cc(107)] TransferEnded w/ code 200
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:multi_range_http_fetcher.cc(141)] Done w/ all transfers
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:update_attempter.cc(408)] Download status: inactive
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:delta_performer.cc(771)] Verifying delta payload using public key: /usr/share/update_engine/update-payload-key.pub.pem
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_signer.cc(265)] signature size = 528
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_state.cc(70)] Payload downloaded successfully
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_state.cc(246)] Incrementing the payload attempt number
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_state.cc(282)] Resetting backoff expiry time as payload backoff is disabled
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished DownloadAction, starting OmahaRequestAction
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 14:56:54 hp0 update_engine[654]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 23 14:56:54 hp0 update_engine[654]: <os version="Chateau" platform="CoreOS" sp="991.0.0_x86_64"></os>
Apr 23 14:56:54 hp0 update_engine[654]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="991.0.0" track="alpha" bootid="{5e6a3c67-d996-43f9-b13c-c4d9e6c6857e}" oem="" oemversion="" alephversion="991.0.0" machineid="8b76ccdff2224db7a03ceb45089da4b9" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 23 14:56:54 hp0 update_engine[654]: <event eventtype="14" eventresult="1"></event>
Apr 23 14:56:54 hp0 update_engine[654]: </app>
Apr 23 14:56:54 hp0 update_engine[654]: </request>
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 23 14:56:54 hp0 update_engine[654]: [0423/145654:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 14:56:55 hp0 update_engine[654]: <response protocol="3.0" server="update.core-os.net">
Apr 23 14:56:55 hp0 update_engine[654]: <daystart elapsed_seconds="0"></daystart>
Apr 23 14:56:55 hp0 update_engine[654]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 23 14:56:55 hp0 update_engine[654]: <updatecheck status="ok">
Apr 23 14:56:55 hp0 update_engine[654]: <urls>
Apr 23 14:56:55 hp0 update_engine[654]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 23 14:56:55 hp0 update_engine[654]: </urls>
Apr 23 14:56:55 hp0 update_engine[654]: <manifest version="1010.1.0">
Apr 23 14:56:55 hp0 update_engine[654]: <packages>
Apr 23 14:56:55 hp0 update_engine[654]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 23 14:56:55 hp0 update_engine[654]: </packages>
Apr 23 14:56:55 hp0 update_engine[654]: <actions>
Apr 23 14:56:55 hp0 update_engine[654]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 23 14:56:55 hp0 update_engine[654]: </actions>
Apr 23 14:56:55 hp0 update_engine[654]: </manifest>
Apr 23 14:56:55 hp0 update_engine[654]: </updatecheck>
Apr 23 14:56:55 hp0 update_engine[654]: </app>
Apr 23 14:56:55 hp0 update_engine[654]: </response>
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished OmahaRequestAction, starting FilesystemCopierAction
Apr 23 14:56:55 hp0 update_engine[654]: [0423/145655:INFO:filesystem_copier_action.cc(315)] Filesystem size: 1065345024
Apr 23 14:57:00 hp0 update_engine[654]: [0423/145700:INFO:filesystem_copier_action.cc(283)] Hash: gD7U7Jh0At1zGYnvajaW3F5pXJBz811ToaVlVe4Q7yM=
Apr 23 14:57:00 hp0 update_engine[654]: [0423/145700:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished FilesystemCopierAction, starting PostinstallRunnerAction
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:subprocess.cc(46)] Subprocess output:
Apr 23 14:57:01 hp0 update_engine[654]: '/tmp/au_postint_mount.5ZWblQ/boot/vmlinuz' -> '/boot/coreos/vmlinuz-b'
Apr 23 14:57:01 hp0 update_engine[654]: start        size    part  contents
Apr 23 14:57:01 hp0 update_engine[654]: 2367488     2097152       4  Label: "USR-B"
Apr 23 14:57:01 hp0 update_engine[654]: Type: Alias for coreos-rootfs
Apr 23 14:57:01 hp0 update_engine[654]: UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
Apr 23 14:57:01 hp0 update_engine[654]: Attr: priority=2 tries=1 successful=0
Apr 23 14:57:01 hp0 update_engine[654]: COREOS_RELEASE_VERSION=1010.1.0
Apr 23 14:57:01 hp0 update_engine[654]: Setup USR-B (/dev/sdb4) for next boot.
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:postinstall_runner_action.cc(79)] Postinst command succeeded
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished PostinstallRunnerAction, starting OmahaRequestAction
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 14:57:01 hp0 update_engine[654]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 23 14:57:01 hp0 update_engine[654]: <os version="Chateau" platform="CoreOS" sp="991.0.0_x86_64"></os>
Apr 23 14:57:01 hp0 update_engine[654]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="991.0.0" track="alpha" bootid="{5e6a3c67-d996-43f9-b13c-c4d9e6c6857e}" oem="" oemversion="" alephversion="991.0.0" machineid="8b76ccdff2224db7a03ceb45089da4b9" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 23 14:57:01 hp0 update_engine[654]: <event eventtype="3" eventresult="1"></event>
Apr 23 14:57:01 hp0 update_engine[654]: </app>
Apr 23 14:57:01 hp0 update_engine[654]: </request>
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 23 14:57:01 hp0 update_engine[654]: <response protocol="3.0" server="update.core-os.net">
Apr 23 14:57:01 hp0 update_engine[654]: <daystart elapsed_seconds="0"></daystart>
Apr 23 14:57:01 hp0 update_engine[654]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 23 14:57:01 hp0 update_engine[654]: <updatecheck status="ok">
Apr 23 14:57:01 hp0 update_engine[654]: <urls>
Apr 23 14:57:01 hp0 update_engine[654]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 23 14:57:01 hp0 update_engine[654]: </urls>
Apr 23 14:57:01 hp0 update_engine[654]: <manifest version="1010.1.0">
Apr 23 14:57:01 hp0 update_engine[654]: <packages>
Apr 23 14:57:01 hp0 update_engine[654]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 23 14:57:01 hp0 update_engine[654]: </packages>
Apr 23 14:57:01 hp0 update_engine[654]: <actions>
Apr 23 14:57:01 hp0 update_engine[654]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 23 14:57:01 hp0 update_engine[654]: </actions>
Apr 23 14:57:01 hp0 update_engine[654]: </manifest>
Apr 23 14:57:01 hp0 update_engine[654]: </updatecheck>
Apr 23 14:57:01 hp0 update_engine[654]: </app>
Apr 23 14:57:01 hp0 update_engine[654]: </response>
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:action_processor.cc(65)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:action_processor.cc(73)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:update_attempter.cc(283)] Processing Done.
Apr 23 14:57:01 hp0 update_engine[654]: [0423/145701:INFO:update_attempter.cc(309)] Update successfully applied, waiting to reboot.
core@hp0 ~ $ sudo cgpt show /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: 80484DD2-715E-4E07-B0F3-BBCB85D25A93
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: E45750A0-259A-4236-AA04-B2D2D16EDE54
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8456F927-6054-4A8F-9C43-105033EC808D
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: 357447A1-7D45-4CB9-B58F-9291B7382B79
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: 3DE5A2CF-B6B5-4511-96F6-6DCE8AEEAA49
   488397135          32          Sec GPT table
   488397167           1          Sec GPT header
core@hp0 ~ $ sudo gdisk /dev/sdb    
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 34BE38DA-93B7-41A7-A772-A89D7A42F464
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          266239   128.0 MiB   EF00  EFI-SYSTEM
   2          266240          270335   2.0 MiB     EF02  BIOS-BOOT
   3          270336         2367487   1024.0 MiB  FFFF  USR-A
   4         2367488         4464639   1024.0 MiB  FFFF  USR-B
   6         4464640         4726783   128.0 MiB   8300  OEM
   7         4726784         4857855   64.0 MiB    FFFF  OEM-CONFIG
   9         4857856       488397134   230.6 GiB   FFFF  ROOT

Command (? for help): q
CoreOS alpha (1010.1.0)
core@hp0 ~ $ sudo cgpt show /dev/sdb 
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: 80484DD2-715E-4E07-B0F3-BBCB85D25A93
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: E45750A0-259A-4236-AA04-B2D2D16EDE54
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8456F927-6054-4A8F-9C43-105033EC808D
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: 357447A1-7D45-4CB9-B58F-9291B7382B79
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: 3DE5A2CF-B6B5-4511-96F6-6DCE8AEEAA49
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.10

Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: ^C
core@hp0 ~ $ 
core@hp0 ~ $ sudo cgpt show /dev/sdb 
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: 80484DD2-715E-4E07-B0F3-BBCB85D25A93
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: E45750A0-259A-4236-AA04-B2D2D16EDE54
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8456F927-6054-4A8F-9C43-105033EC808D
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: 357447A1-7D45-4CB9-B58F-9291B7382B79
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: 3DE5A2CF-B6B5-4511-96F6-6DCE8AEEAA49
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo systemctl reboot
orbistertius commented 8 years ago

Hoping it was a caching problem, I disabled controller write cache and tested again. No way, still red screen.

marineam commented 8 years ago

Ok, so this is interesting:

Booting the fresh install is properly fixing up the secondary GPT as expected. (In the initial image written to disk it is invalid, being located at the end of the original image size instead of the new larger disk).

   488397135          32          Sec GPT table
   488397167           1          Sec GPT header

But the reboot after applying the update is corrupting it again.

   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header

We have scattered a few cgpt repair commands through the system over time, one is triggered on first boot to fix up the image-size to disk-size fixup and another runs when an update is applied as a just-in-case precaution. There isn't any such repair otherwise, and the lack of that repair is probably causing the failure to set the successful flag. If you get the log from update_engine after that reboot I suspect there will be an error reported from cgpt around 45 seconds after boot.

Unfortunately the exact manner of corruption isn't clear from the pretty-fied cgpt output and I'll need to dig through the grub code to see if I can figure out what may be going on. After a reboot, could you capture the raw partition tables? Something like:

dd if=/dev/sdb of=start.bin bs=512 count=34
dd if=/dev/sdb of=end.bin bs=512 skip=488397135

As a workaround, after the reboot you should be able to do the following to get a system that will continue working:

sudo cgpt repair /dev/sdb
sudo coreos-setgoodroot

Alternatively, if you boot the installed system in UEFI mode instead of legacy BIOS mode you may get different results (at least I'm assuming you are currently using BIOS mode)

marineam commented 8 years ago

Also, mostly for my own reference so I don't forget, EIP 0x7c64 corresponds to to the boot_drive parameter. The MBR's actual executable code starts just after that. https://github.com/coreos/grub/blob/master/grub-core/boot/i386/pc/boot.S#L198

So don't yet know how the system might come to try to execute that data byte.

orbistertius commented 8 years ago

Hello @marineam, many thanks for your support. I applied the fix you proposed in the first boot of updated system (if I understand well), but unfortunately there is a red screen again at the second boot.

I collected requested disk sectors at several stages: disk-sectors.zip

  1. within the PXE-booted 1000.0.0 system: after installation (the secondary GPT in invalid).
  2. within the first boot of installed 1000.0.0 system: before update.
  3. within the first boot of installed 1000.0.0 system: after update.
  4. within the first boot of system updated to 1010.1.0: just after the boot.
  5. within the first boot of system updated to 1010.1.0: after few minutes.
  6. within the first boot of system updated to 1010.1.0: after the fix you proposed.
    • Stage 1: The requested disk sectors and a more informative cgpt output after 1000.0.0 installation.
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-1.bin bs=512 count=34 
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.00223512 s, 7.8 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-1.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.00196349 s, 8.6 MB/s
core@hp0 ~ $  sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x0c5c7d1c 
                                  My LBA: 1
                                  Alternate LBA: 9289727
                                  First LBA: 34
                                  Last LBA: 9289694
                                  Disk UUID: 00000000-0000-0000-0000-000000000001
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xf4db9ee5 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856     4427776       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header
                                  Sig: []
                                  Rev: 0x00000000
                                  Size: 0
                                  Header CRC: 0x00000000 
                                  My LBA: 0
                                  Alternate LBA: 0
                                  First LBA: 0
                                  Last LBA: 0
                                  Disk UUID: 00000000-0000-0000-0000-000000000000
                                  Entries LBA: 0
                                  Number of entries: 0
                                  Size of entry: 0
                                  Entries CRC: 0x00000000 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-2.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000200268 s, 86.9 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-2.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000210972 s, 80.1 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xc59536e4 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x39260f4a 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x1ab8c4a4 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x39260f4a 
core@hp0 ~ $ 
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-3.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000200853 s, 86.7 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-3.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000199583 s, 84.7 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xba45c5ee 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x656837ae 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 
core@hp0 ~ $ 
CoreOS alpha (1010.1.0)
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-4.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000194217 s, 89.6 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-4.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.00021516 s, 78.5 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x8eb8f125 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4911a91d 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
           1           1 INVALID  Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x656837ae 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ 
Apr 24 10:22:24 localhost update_engine[620]: [0424/102223:INFO:main.cc(155)] CoreOS Update Engine starting
Apr 24 10:22:24 localhost update_engine[620]: [0424/102223:INFO:payload_state.cc(356)] Current Response Signature =
Apr 24 10:22:24 localhost update_engine[620]: NumURLs = 1
Apr 24 10:22:24 localhost update_engine[620]: Url0 = https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/update.gz
Apr 24 10:22:24 localhost update_engine[620]: Payload Size = 210163417
Apr 24 10:22:24 localhost update_engine[620]: Payload Sha256 Hash = DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=
Apr 24 10:22:24 localhost update_engine[620]: Is Delta Payload = 0
Apr 24 10:22:24 localhost update_engine[620]: Max Failure Count Per Url = 10
Apr 24 10:22:24 localhost update_engine[620]: Disable Payload Backoff = 1
Apr 24 10:22:24 localhost update_engine[620]: [0424/102224:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 24 10:22:24 localhost update_engine[620]: [0424/102224:INFO:payload_state.cc(400)] Current URL Index = 0
Apr 24 10:22:24 localhost update_engine[620]: [0424/102224:INFO:payload_state.cc(421)] Current URL (Url0)'s Failure Count = 0
Apr 24 10:22:24 localhost update_engine[620]: [0424/102224:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 24 10:22:24 localhost update_engine[620]: [0424/102224:INFO:update_check_scheduler.cc(82)] Next update check in 7m47s
Apr 24 10:23:09 hp0 update_engine[620]: [0424/102309:INFO:update_attempter.cc(485)] Updating boot flags...
Apr 24 10:23:09 hp0 update_engine[620]: [0424/102309:INFO:subprocess.cc(43)] Subprocess status: 1
Apr 24 10:23:09 hp0 update_engine[620]: [0424/102309:INFO:subprocess.cc(46)] Subprocess output:
Apr 24 10:23:09 hp0 update_engine[620]: ERROR: cgpt add: one of the GPT header/entries is invalid.
Apr 24 10:23:09 hp0 update_engine[620]: please run 'cgpt repair' before adding anything.
core@hp0 ~ $ uptime
 10:28:01 up 5 min,  1 user,  load average: 0.11, 0.11, 0.05
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-5.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000201393 s, 86.4 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-5.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000207087 s, 81.6 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x8eb8f125 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4911a91d 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
           1           1 INVALID  Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x656837ae 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ 
core@hp0 ~ $ sudo cgpt repair /dev/sdb
Secondary Entries is updated.
Secondary Header is updated.
core@hp0 ~ $ sudo coreos-setgoodroot
core@hp0 ~ $ sudo dd if=/dev/sdb of=start-6.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000209823 s, 83.0 MB/s
core@hp0 ~ $ sudo dd if=/dev/sdb of=end-6.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000210356 s, 80.3 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sdb
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x7789b117 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x8a00463f 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xa8a44357 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: BEE243D5-D665-47C8-9DC5-E21292835FBA
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x8a00463f 
core@hp0 ~ $ 
marineam commented 8 years ago

Thanks! I'll dig in to the data soon.

orbistertius commented 8 years ago

@marineam thanks for your effort, I really appreciate it.

TL;DR

New test with only SSD boot drive (/dev/sda) in SATA port 5, managed as a single disk RAID0 logical volume by the HP B120i controller. Booting in BIOS mode (the same for the previous tests).

Made this test to be sure the bootloader (grub) is not confused by the presence of additional drives not managed by the HP B120i controller.

Anyway the second boot of updated system will result in Red Screen of Death (with the same register values).

Attaching the requested disk sectors: disk-sectors-SSD-only.zip


core@hp0 ~ $ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): x

Expert command (? for help): z
About to wipe out GPT on /dev/sda. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
core@hp0 ~ $ sudo partprobe
core@hp0 ~ $ sudo coreos-install -d /dev/sda -V 1000.0.0 -C alpha -c hp0.yml -v -b http://mini.example.com:8080/coreos/alpha
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ case $OPTION in
+ BASE_URL=http://mini.example.com:8080/coreos/alpha
+ getopts V:C:d:o:c:i:t:b:nvh OPTION
+ [[ -z /dev/sda ]]
++ lsblk -n -d -o TYPE /dev/sda
+ [[ disk =~ ^(disk|loop|lvm)$ ]]
+ [[ ! -w /dev/sda ]]
+ [[ -n hp0.yml ]]
+ [[ ! -f hp0.yml ]]
+ type -P coreos-cloudinit
+ coreos-cloudinit -from-file=hp0.yml -validate
2016/04/24 20:48:23 Checking availability of "local-file"
2016/04/24 20:48:23 Fetching user-data from datasource of type "local-file"
+ [[ -n '' ]]
+ [[ -n '' ]]
+ IMAGE_NAME=coreos_production_image.bin.bz2
+ [[ 1000.0.0 =~ ^(alpha|beta|stable)$ ]]
+ [[ -z http://mini.example.com:8080/coreos/alpha ]]
+ IMAGE_URL=http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2
+ SIG_NAME=coreos_production_image.bin.bz2.sig
+ SIG_URL=http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2.sig
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2
+ wget --inet4-only --spider --quiet http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2.sig
++ mktemp --tmpdir -d coreos-install.XXXXXXXXXX
+ WORKDIR=/tmp/coreos-install.pnOPClvq8f
+ trap 'rm -rf '\''/tmp/coreos-install.pnOPClvq8f'\''' EXIT
+ export GNUPGHOME=/tmp/coreos-install.pnOPClvq8f/gnupg
+ GNUPGHOME=/tmp/coreos-install.pnOPClvq8f/gnupg
+ mkdir /tmp/coreos-install.pnOPClvq8f/gnupg
+ gpg --batch --quiet --import
+ echo 'Downloading the signature for http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2...'
Downloading the signature for http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2...
+ wget --inet4-only --no-verbose -O /tmp/coreos-install.pnOPClvq8f/coreos_production_image.bin.bz2.sig http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2.sig
2016-04-24 20:48:23 URL:http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2.sig [543/543] -> "/tmp/coreos-install.pnOPClvq8f/coreos_production_image.bin.bz2.sig" [1]
+ echo 'Downloading, writing and verifying coreos_production_image.bin.bz2...'
Downloading, writing and verifying coreos_production_image.bin.bz2...
+ declare -a EEND
+ wget --inet4-only --no-verbose -O - http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2
+ gpg --batch --trusted-key 50E0885593D2DCB4 --verify /tmp/coreos-install.pnOPClvq8f/coreos_production_image.bin.bz2.sig -
+ tee /dev/fd/63
++ bunzip2 --stdout
2016-04-24 20:49:16 URL:http://mini.example.com:8080/coreos/alpha/1000.0.0/coreos_production_image.bin.bz2 [257060676/257060676] -> "-" [1]
gpg: Signature made Sun Mar 27 07:08:32 2016 UTC using RSA key ID 1CB5FA26
gpg: key 93D2DCB4 marked as ultimately trusted
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>" [ultimate]
+ blockdev --rereadpt /dev/sda
+ [[ -n hp0.yml ]]
++ blkid -t LABEL=ROOT -o device /dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda6 /dev/sda7 /dev/sda9
+ ROOT_DEV=/dev/sda9
+ [[ -z /dev/sda9 ]]
+ mkdir -p /tmp/coreos-install.pnOPClvq8f/rootfs
+ case $(blkid -t "LABEL=ROOT" -o value -s TYPE "${ROOT_DEV}") in
++ blkid -t LABEL=ROOT -o value -s TYPE /dev/sda9
+ mount /dev/sda9 /tmp/coreos-install.pnOPClvq8f/rootfs
+ trap 'umount '\''/tmp/coreos-install.pnOPClvq8f/rootfs'\'' && rm -rf '\''/tmp/coreos-install.pnOPClvq8f'\''' EXIT
+ [[ -n hp0.yml ]]
+ echo 'Installing cloud-config...'
Installing cloud-config...
+ mkdir -p /tmp/coreos-install.pnOPClvq8f/rootfs/var/lib/coreos-install
+ cp hp0.yml /tmp/coreos-install.pnOPClvq8f/rootfs/var/lib/coreos-install/user_data
+ [[ -n '' ]]
+ umount /tmp/coreos-install.pnOPClvq8f/rootfs
+ trap 'rm -rf '\''/tmp/coreos-install.pnOPClvq8f'\''' EXIT
+ [[ -n '' ]]
+ rm -rf /tmp/coreos-install.pnOPClvq8f
+ trap - EXIT
+ echo 'Success! CoreOS alpha 1000.0.0 is installed on /dev/sda'
Success! CoreOS alpha 1000.0.0 is installed on /dev/sda
core@hp0 ~ $ sudo dd if=/dev/sda of=start-1.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.00224777 s, 7.7 MB/s
core@hp0 ~ $ sudo dd if=/dev/sda of=end-1.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.00204441 s, 8.3 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x0c5c7d1c 
                                  My LBA: 1
                                  Alternate LBA: 9289727
                                  First LBA: 34
                                  Last LBA: 9289694
                                  Disk UUID: 00000000-0000-0000-0000-000000000001
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xf4db9ee5 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856     4427776       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header
                                  Sig: []
                                  Rev: 0x00000000
                                  Size: 0
                                  Header CRC: 0x00000000 
                                  My LBA: 0
                                  Alternate LBA: 0
                                  First LBA: 0
                                  Last LBA: 0
                                  Disk UUID: 00000000-0000-0000-0000-000000000000
                                  Entries LBA: 0
                                  Number of entries: 0
                                  Size of entry: 0
                                  Entries CRC: 0x00000000 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo dd if=/dev/sda of=start-2.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000192563 s, 90.4 MB/s
core@hp0 ~ $ sudo dd if=/dev/sda of=end-2.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000210598 s, 80.2 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xd839db31 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x39260f4a 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x07142971 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x39260f4a 
core@hp0 ~ $ 
Apr 24 21:05:32 hp0 update_engine[666]: [0424/210532:INFO:delta_performer.cc(103)] Completed 895/1017 operations (88%), 195131482/210163417 bytes downloaded (92%), overall progress 90%
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:delta_performer.cc(717)] Skipping hash verification for signature operation 1017
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:delta_performer.cc(688)] Extracted signature data of size 528 at 210106557
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:delta_performer.cc(103)] Completed 1017/1017 operations (100%), 210163417/210163417 bytes downloaded (100%), overall progress 100%
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 210163417 bytes downloaded
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:multi_range_http_fetcher.cc(150)] Received transfer complete.
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:multi_range_http_fetcher.cc(107)] TransferEnded w/ code 200
Apr 24 21:05:54 hp0 update_engine[666]: [0424/210554:INFO:multi_range_http_fetcher.cc(141)] Done w/ all transfers
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:update_attempter.cc(408)] Download status: inactive
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:delta_performer.cc(771)] Verifying delta payload using public key: /usr/share/update_engine/update-payload-key.pub.pem
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_signer.cc(265)] signature size = 528
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_state.cc(70)] Payload downloaded successfully
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_state.cc(246)] Incrementing the payload attempt number
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_state.cc(282)] Resetting backoff expiry time as payload backoff is disabled
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished DownloadAction, starting OmahaRequestAction
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 24 21:05:55 hp0 update_engine[666]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 24 21:05:55 hp0 update_engine[666]: <os version="Chateau" platform="CoreOS" sp="1000.0.0_x86_64"></os>
Apr 24 21:05:55 hp0 update_engine[666]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="1000.0.0" track="alpha" bootid="{c6a44153-a8b9-4638-acbc-a3ee9f9a0b0b}" oem="" oemversion="" alephversion="1000.0.0" machineid="46078328744b406a811aa9fd4978d9bd" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 24 21:05:55 hp0 update_engine[666]: <event eventtype="14" eventresult="1"></event>
Apr 24 21:05:55 hp0 update_engine[666]: </app>
Apr 24 21:05:55 hp0 update_engine[666]: </request>
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 24 21:05:55 hp0 update_engine[666]: <response protocol="3.0" server="update.core-os.net">
Apr 24 21:05:55 hp0 update_engine[666]: <daystart elapsed_seconds="0"></daystart>
Apr 24 21:05:55 hp0 update_engine[666]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 24 21:05:55 hp0 update_engine[666]: <updatecheck status="ok">
Apr 24 21:05:55 hp0 update_engine[666]: <urls>
Apr 24 21:05:55 hp0 update_engine[666]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 24 21:05:55 hp0 update_engine[666]: </urls>
Apr 24 21:05:55 hp0 update_engine[666]: <manifest version="1010.1.0">
Apr 24 21:05:55 hp0 update_engine[666]: <packages>
Apr 24 21:05:55 hp0 update_engine[666]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 24 21:05:55 hp0 update_engine[666]: </packages>
Apr 24 21:05:55 hp0 update_engine[666]: <actions>
Apr 24 21:05:55 hp0 update_engine[666]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 24 21:05:55 hp0 update_engine[666]: </actions>
Apr 24 21:05:55 hp0 update_engine[666]: </manifest>
Apr 24 21:05:55 hp0 update_engine[666]: </updatecheck>
Apr 24 21:05:55 hp0 update_engine[666]: </app>
Apr 24 21:05:55 hp0 update_engine[666]: </response>
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished OmahaRequestAction, starting FilesystemCopierAction
Apr 24 21:05:55 hp0 update_engine[666]: [0424/210555:INFO:filesystem_copier_action.cc(315)] Filesystem size: 1065345024
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:filesystem_copier_action.cc(283)] Hash: gD7U7Jh0At1zGYnvajaW3F5pXJBz811ToaVlVe4Q7yM=
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished FilesystemCopierAction, starting PostinstallRunnerAction
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:subprocess.cc(46)] Subprocess output:
Apr 24 21:06:00 hp0 update_engine[666]: '/tmp/au_postint_mount.eDsyBG/boot/vmlinuz' -> '/boot/coreos/vmlinuz-b'
Apr 24 21:06:00 hp0 update_engine[666]: start        size    part  contents
Apr 24 21:06:00 hp0 update_engine[666]: 2367488     2097152       4  Label: "USR-B"
Apr 24 21:06:00 hp0 update_engine[666]: Type: Alias for coreos-rootfs
Apr 24 21:06:00 hp0 update_engine[666]: UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
Apr 24 21:06:00 hp0 update_engine[666]: Attr: priority=2 tries=1 successful=0
Apr 24 21:06:00 hp0 update_engine[666]: COREOS_RELEASE_VERSION=1010.1.0
Apr 24 21:06:00 hp0 update_engine[666]: Setup USR-B (/dev/sda4) for next boot.
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:postinstall_runner_action.cc(79)] Postinst command succeeded
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:action_processor.cc(82)] ActionProcessor::ActionComplete: finished PostinstallRunnerAction, starting OmahaRequestAction
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:omaha_request_action.cc(257)] Posting an Omaha request to https://public.update.core-os.net/v1/update/
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:omaha_request_action.cc(258)] Request: <?xml version="1.0" encoding="UTF-8"?>
Apr 24 21:06:00 hp0 update_engine[666]: <request protocol="3.0" version="CoreOSUpdateEngine-0.1.0.0" updaterversion="CoreOSUpdateEngine-0.1.0.0" installsource="ondemandupdate" ismachine="1">
Apr 24 21:06:00 hp0 update_engine[666]: <os version="Chateau" platform="CoreOS" sp="1000.0.0_x86_64"></os>
Apr 24 21:06:00 hp0 update_engine[666]: <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" version="1000.0.0" track="alpha" bootid="{c6a44153-a8b9-4638-acbc-a3ee9f9a0b0b}" oem="" oemversion="" alephversion="1000.0.0" machineid="46078328744b406a811aa9fd4978d9bd" lang="en-US" board="amd64-usr" hardware_class="" delta_okay="false" >
Apr 24 21:06:00 hp0 update_engine[666]: <event eventtype="3" eventresult="1"></event>
Apr 24 21:06:00 hp0 update_engine[666]: </app>
Apr 24 21:06:00 hp0 update_engine[666]: </request>
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:libcurl_http_fetcher.cc(48)] Starting/Resuming transfer
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:libcurl_http_fetcher.cc(164)] Setting up curl options for HTTPS
Apr 24 21:06:00 hp0 update_engine[666]: [0424/210600:INFO:libcurl_http_fetcher.cc(427)] Setting up timeout source: 1 seconds.
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:libcurl_http_fetcher.cc(240)] HTTP response code: 200
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:libcurl_http_fetcher.cc(297)] Transfer completed (200), 800 bytes downloaded
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:omaha_request_action.cc(574)] Omaha request response: <?xml version="1.0" encoding="UTF-8"?>
Apr 24 21:06:01 hp0 update_engine[666]: <response protocol="3.0" server="update.core-os.net">
Apr 24 21:06:01 hp0 update_engine[666]: <daystart elapsed_seconds="0"></daystart>
Apr 24 21:06:01 hp0 update_engine[666]: <app appid="e96281a6-d1af-4bde-9a0a-97b76e56dc57" status="ok">
Apr 24 21:06:01 hp0 update_engine[666]: <updatecheck status="ok">
Apr 24 21:06:01 hp0 update_engine[666]: <urls>
Apr 24 21:06:01 hp0 update_engine[666]: <url codebase="https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/"></url>
Apr 24 21:06:01 hp0 update_engine[666]: </urls>
Apr 24 21:06:01 hp0 update_engine[666]: <manifest version="1010.1.0">
Apr 24 21:06:01 hp0 update_engine[666]: <packages>
Apr 24 21:06:01 hp0 update_engine[666]: <package hash="+e2TMojpe62HNbHtHkJA8q8pztg=" name="update.gz" size="210163417" required="false"></package>
Apr 24 21:06:01 hp0 update_engine[666]: </packages>
Apr 24 21:06:01 hp0 update_engine[666]: <actions>
Apr 24 21:06:01 hp0 update_engine[666]: <action event="postinstall" ChromeOSVersion="" sha256="DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=" needsadmin="false" IsDelta="false" DisablePayloadBackoff="true"></action>
Apr 24 21:06:01 hp0 update_engine[666]: </actions>
Apr 24 21:06:01 hp0 update_engine[666]: </manifest>
Apr 24 21:06:01 hp0 update_engine[666]: </updatecheck>
Apr 24 21:06:01 hp0 update_engine[666]: </app>
Apr 24 21:06:01 hp0 update_engine[666]: </response>
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:action_processor.cc(65)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:action_processor.cc(73)] ActionProcessor::ActionComplete: finished last action of type OmahaRequestAction
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:update_attempter.cc(283)] Processing Done.
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:update_attempter.cc(309)] Update successfully applied, waiting to reboot.
Apr 24 21:06:01 hp0 update_engine[666]: [0424/210601:INFO:update_check_scheduler.cc(82)] Next update check in 49m12s
core@hp0 ~ $ sudo dd if=/dev/sda of=start-3.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000216056 s, 80.6 MB/s
core@hp0 ~ $ sudo dd if=/dev/sda of=end-3.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000203595 s, 83.0 MB/s
core@hp0 ~ $ ls *.bin
end-2.bin  end-3.bin  start-2.bin  start-3.bin
core@hp0 ~ $ scp start-3.bin end-3.bin update_engine.log emiliano@mini:
emiliano@mini's password: 
start-3.bin                                                                                                                                                                100%   17KB  17.0KB/s   00:00    
end-3.bin                                                                                                                                                                  100%   17KB  16.5KB/s   00:00    
update_engine.log                                                                                                                                                          100%   30KB  29.7KB/s   00:00    
core@hp0 ~ $ 
core@hp0 ~ $ 
core@hp0 ~ $ history | grep cgpt
    4  sudo cgpt show -d -v /dev/sda
   26  history | grep cgpt
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xa7e9283b 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x78c4da7b 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 
core@hp0 ~ $ 
CoreOS alpha (1010.1.0)
core@hp0 ~ $ sudo dd if=/dev/sda of=start-4.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.000210078 s, 82.9 MB/s
core@hp0 ~ $ sudo dd if=/dev/sda of=end-4.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000214815 s, 78.7 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x93141cf0 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4911a91d 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
           1           1 INVALID  Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x78c4da7b 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:main.cc(155)] CoreOS Update Engine starting
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:payload_state.cc(356)] Current Response Signature =
Apr 24 21:13:12 localhost update_engine[624]: NumURLs = 1
Apr 24 21:13:12 localhost update_engine[624]: Url0 = https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/update.gz
Apr 24 21:13:12 localhost update_engine[624]: Payload Size = 210163417
Apr 24 21:13:12 localhost update_engine[624]: Payload Sha256 Hash = DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=
Apr 24 21:13:12 localhost update_engine[624]: Is Delta Payload = 0
Apr 24 21:13:12 localhost update_engine[624]: Max Failure Count Per Url = 10
Apr 24 21:13:12 localhost update_engine[624]: Disable Payload Backoff = 1
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:payload_state.cc(400)] Current URL Index = 0
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:payload_state.cc(421)] Current URL (Url0)'s Failure Count = 0
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:update_check_scheduler.cc(82)] Next update check in 11m3s
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:update_attempter.cc(485)] Updating boot flags...
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:subprocess.cc(43)] Subprocess status: 1
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:subprocess.cc(46)] Subprocess output:
Apr 24 21:13:57 hp0 update_engine[624]: ERROR: cgpt add: one of the GPT header/entries is invalid.
Apr 24 21:13:57 hp0 update_engine[624]: please run 'cgpt repair' before adding anything.

The partition table:

core@hp0 ~ $ sudo dd if=/dev/sda of=start-5.bin bs=512 count=34
34+0 records in
34+0 records out
17408 bytes (17 kB) copied, 0.00020764 s, 83.8 MB/s
core@hp0 ~ $ sudo dd if=/dev/sda of=end-5.bin bs=512 skip=488397135
33+0 records in
33+0 records out
16896 bytes (17 kB) copied, 0.000226519 s, 74.6 MB/s
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x93141cf0 
                                  My LBA: 1
                                  Alternate LBA: 488397167
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4911a91d 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
   488397135          32 INVALID  Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856   483539279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
           1           1 INVALID  Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x78c4da7b 
                                  My LBA: 488397167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 488397134
                                  Disk UUID: F815889B-583C-4E31-A924-30B17A43B39A
                                  Entries LBA: 488397135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x7e4e9727 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
orbistertius commented 8 years ago

Last test for today: removed SSD in SATA port 5, put HDD in SATA port 1, configured controller in AHCI mode.

After update the system WORKS!

So this looks to me definitely a B120i RAID controller issue. A quick search with "HP Red Screen of Death illegal opcode" will find tons of reports, many attributed to RAID controllers and grub not finding the proper disk to boot... who knows!

On of the search result is https://github.com/coreos/bugs/issues/125.


This time I have no disk sectors, sorry!

core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x0c5c7d1c 
                                  My LBA: 1
                                  Alternate LBA: 9289727
                                  First LBA: 34
                                  Last LBA: 9289694
                                  Disk UUID: 00000000-0000-0000-0000-000000000001
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xf4db9ee5 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856     4427776       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525135          32 INVALID  Sec GPT table
           1           1 INVALID  Sec GPT header
                                  Sig: []
                                  Rev: 0x00000000
                                  Size: 0
                                  Header CRC: 0x00000000 
                                  My LBA: 0
                                  Alternate LBA: 0
                                  First LBA: 0
                                  Last LBA: 0
                                  Disk UUID: 00000000-0000-0000-0000-000000000000
                                  Entries LBA: 0
                                  Number of entries: 0
                                  Size of entry: 0
                                  Entries CRC: 0x00000000 

WARNING: one of the GPT header/entries is invalid, please run 'cgpt repair'
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x300d653c 
                                  My LBA: 1
                                  Alternate LBA: 1953525167
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x09eac770 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=0 tries=0 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x9390ddde 
                                  My LBA: 1953525167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 1953525135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x09eac770 
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x4fdd9636 
                                  My LBA: 1
                                  Alternate LBA: 1953525167
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4e825f1d 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=1 successful=0
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0xec402ed4 
                                  My LBA: 1953525167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 1953525135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0x4e825f1d 
core@hp0 ~ $ 
CoreOS alpha (1010.1.0)
core@hp0 ~ $ uptime
 22:33:33 up 1 min,  1 user,  load average: 0.29, 0.12, 0.05
core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x8211e2cf 
                                  My LBA: 1
                                  Alternate LBA: 1953525167
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xbacc8e05 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x218c5a2d 
                                  My LBA: 1953525167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 1953525135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xbacc8e05 
core@hp0 ~ $ 

Update_engine log LGTM this time:

Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:main.cc(155)] CoreOS Update Engine starting
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:payload_state.cc(356)] Current Response Signature =
Apr 24 22:32:40 localhost update_engine[625]: NumURLs = 1
Apr 24 22:32:40 localhost update_engine[625]: Url0 = https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/update.gz
Apr 24 22:32:40 localhost update_engine[625]: Payload Size = 210163417
Apr 24 22:32:40 localhost update_engine[625]: Payload Sha256 Hash = DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=
Apr 24 22:32:40 localhost update_engine[625]: Is Delta Payload = 0
Apr 24 22:32:40 localhost update_engine[625]: Max Failure Count Per Url = 10
Apr 24 22:32:40 localhost update_engine[625]: Disable Payload Backoff = 1
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:payload_state.cc(400)] Current URL Index = 0
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:payload_state.cc(421)] Current URL (Url0)'s Failure Count = 0
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 24 22:32:40 localhost update_engine[625]: [0424/223240:INFO:update_check_scheduler.cc(82)] Next update check in 5m13s
Apr 24 22:33:25 hp0 update_engine[625]: [0424/223325:INFO:update_attempter.cc(485)] Updating boot flags...

Crossing fingers and rebooting... Second boot in updated system WORKS!

Update_engine log:

Apr 24 22:38:32 localhost update_engine[568]: [0424/223831:INFO:main.cc(155)] CoreOS Update Engine starting
Apr 24 22:38:32 localhost update_engine[568]: [0424/223832:INFO:payload_state.cc(356)] Current Response Signature =
Apr 24 22:38:32 localhost update_engine[568]: NumURLs = 1
Apr 24 22:38:32 localhost update_engine[568]: Url0 = https://commondatastorage.googleapis.com/update-storage.core-os.net/amd64-usr/1010.1.0/update.gz
Apr 24 22:38:32 localhost update_engine[568]: Payload Size = 210163417
Apr 24 22:38:32 localhost update_engine[568]: Payload Sha256 Hash = DmTD3kRtDpVDq3YElFzbvUmaAGVKqc7akGXaQIxxc3w=
Apr 24 22:38:32 localhost update_engine[568]: Is Delta Payload = 0
Apr 24 22:38:32 localhost update_engine[568]: Max Failure Count Per Url = 10
Apr 24 22:38:32 localhost update_engine[568]: Disable Payload Backoff = 1
Apr 24 22:38:32 localhost update_engine[568]: [0424/223832:INFO:payload_state.cc(377)] Payload Attempt Number = 1
Apr 24 22:38:32 localhost update_engine[568]: [0424/223832:INFO:payload_state.cc(400)] Current URL Index = 0
Apr 24 22:38:32 localhost update_engine[568]: [0424/223832:INFO:payload_state.cc(421)] Current URL (Url0)'s Failure Count = 0
Apr 24 22:38:32 localhost update_engine[568]: [0424/223832:INFO:payload_state.cc(448)] Backoff Expiry Time = 1/1/1601 0:00:00 GMT
Apr 24 22:38:33 localhost update_engine[568]: [0424/223833:INFO:update_check_scheduler.cc(82)] Next update check in 7m39s
Apr 24 22:39:18 hp0 update_engine[568]: [0424/223918:INFO:update_attempter.cc(485)] Updating boot flags...

Partitions:

core@hp0 ~ $ sudo cgpt show -d -v /dev/sda
       start        size    part  contents
           0           1          Hybrid MBR
           1           1          Pri GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x8211e2cf 
                                  My LBA: 1
                                  Alternate LBA: 1953525167
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 2
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xbacc8e05 
           2          32          Pri GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525135          32          Sec GPT table
        4096      262144       1  Label: "EFI-SYSTEM"
                                  Type: EFI System Partition
                                  UUID: E4D9B058-1C65-4EA0-8BF4-C9CA227E0C37
                                  Attr: Legacy BIOS Bootable
      266240        4096       2  Label: "BIOS-BOOT"
                                  Type: BIOS Boot Partition
                                  UUID: 7B8933ED-103D-4027-82DC-97F243317B37
      270336     2097152       3  Label: "USR-A"
                                  Type: Alias for coreos-rootfs
                                  UUID: 7130C94A-213A-4E5A-8E26-6CCE9662F132
                                  Attr: priority=1 tries=0 successful=1
     2367488     2097152       4  Label: "USR-B"
                                  Type: Alias for coreos-rootfs
                                  UUID: E03DD35C-7C2D-4A47-B3FE-27F15780A57C
                                  Attr: priority=2 tries=0 successful=1
     4464640      262144       6  Label: "OEM"
                                  Type: Alias for linux-data
                                  UUID: 8DF3CA89-4CD1-42A0-ADD3-7C7EA58023AD
     4726784      131072       7  Label: "OEM-CONFIG"
                                  Type: CoreOS reserved
                                  UUID: E258F1D7-F95C-4FAE-B4AA-399C0EE2CEC3
     4857856  1948667279       9  Label: "ROOT"
                                  Type: CoreOS auto-resize
                                  UUID: F1D56B8B-7716-47EE-906E-2443D9F14C40
  1953525167           1          Sec GPT header
                                  Sig: [EFI PART]
                                  Rev: 0x00010000
                                  Size: 92
                                  Header CRC: 0x218c5a2d 
                                  My LBA: 1953525167
                                  Alternate LBA: 1
                                  First LBA: 34
                                  Last LBA: 1953525134
                                  Disk UUID: 82780144-8A1C-47D7-88DD-C23D603CD85B
                                  Entries LBA: 1953525135
                                  Number of entries: 128
                                  Size of entry: 128
                                  Entries CRC: 0xbacc8e05 
marineam commented 8 years ago

For the original data dump you posted here is diff of where the MBR gets corrupted during the reboot:

--- mbr-3.asm   2016-04-24 11:53:41.750425052 -0700
+++ mbr-4.asm   2016-04-24 11:53:41.753758229 -0700
@@ -5,10 +5,43 @@
 Disassembly of section .data:

 00000000 <.data>:
-   0:  eb 63                   jmp    0x65
-   2:  90                      nop
+   0:  78 50                   js     0x52
+   2:  23 00                   and    (%bx,%si),%ax
+   4:  00 00                   add    %al,(%bx,%si)
+   6:  00 00                   add    %al,(%bx,%si)
+   8:  78 50                   js     0x5a
+   a:  03 00                   add    (%bx,%si),%ax
+   c:  5c                      pop    %sp
+   d:  00 00                   add    %al,(%bx,%si)
+   f:  00 3d                   add    %bh,(%di)
+  11:  9e                      sahf   
+  12:  35 e2 00                xor    $0xe2,%ax
    ...
+  1d:  00 00                   add    %al,(%bx,%si)
+  1f:  00 08                   add    %cl,(%bx,%si)
+   ...
+  2d:  00 00                   add    %al,(%bx,%si)
+  2f:  00 b7 00 00             add    %dh,0x0(%bx)
+  33:  00 01                   add    %al,(%bx,%di)
+  35:  00 00                   add    %al,(%bx,%si)
+  37:  00 03                   add    %al,(%bp,%di)
+  39:  00 00                   add    %al,(%bx,%si)
+  3b:  00 00                   add    %al,(%bx,%si)
+  3d:  00 00                   add    %al,(%bx,%si)
+  3f:  00 80 50 23             add    %al,0x2350(%bx,%si)
+  43:  00 00                   add    %al,(%bx,%si)
+  45:  00 00                   add    %al,(%bx,%si)
+  47:  00 80 50 03             add    %al,0x350(%bx,%si)
+  4b:  00 00                   add    %al,(%bx,%si)
+  4d:  00 00                   add    %al,(%bx,%si)
+  4f:  00 08                   add    %cl,(%bx,%si)
+  51:  4d                      dec    %bp
+  52:  00 00                   add    %al,(%bx,%si)
+  54:  00 00                   add    %al,(%bx,%si)
+  56:  00 00                   add    %al,(%bx,%si)
+  58:  1d a9 11                sbb    $0x11a9,%ax
+  5b:  49                      dec    %cx
+  5c:  00 10                   add    %dl,(%bx,%si)
-  5b:  80 00 10                addb   $0x10,(%bx,%si)
   5e:  04 00                   add    $0x0,%al
   60:  00 00                   add    %al,(%bx,%si)
   62:  00 00                   add    %al,(%bx,%si)

The key point being the all critical jmp instruction at the beginning got clobbered. The code that updates the GPT (sectors 1 and beyond) currently does not write out the MBR (sector 0) but perhaps the a larger block size of 4096 is being used in the BIOS while grub is operating on the usual 512 byte sector size.

orbistertius commented 8 years ago

Hello @marineam I made another test and fixed the system, thanks to your suggestions:

During the first boot of 1010.1.0, after the cgpt running 45 sec after the boot, I did:

sudo cgpt repair /dev/sdb
sudo coreos-setgoodroot

Then I net-booted with PXE (maybe not necessary) and edited the MBR with dd to replace the corrupted one with the good one from start-3.bin (first 512 bytes of start-3.bin).

This has fixed the system and next reboots of 1010.1.0 are stable, with the MBR left unchanged at every reboot (checked with MD5 of first 512 bytes at each reboot).

So, to recap:

 Apr 24 21:13:12 localhost update_engine[624]: [0424/211312:INFO:update_check_scheduler.cc(82)] Next update check in 11m3s
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:update_attempter.cc(485)] Updating boot flags...
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:subprocess.cc(43)] Subprocess status: 1
Apr 24 21:13:57 hp0 update_engine[624]: [0424/211357:INFO:subprocess.cc(46)] Subprocess output:
Apr 24 21:13:57 hp0 update_engine[624]: ERROR: cgpt add: one of the GPT header/entries is invalid.
Apr 24 21:13:57 hp0 update_engine[624]: please run 'cgpt repair' before adding anything.
core@hp0 ~ $ lspci -vvv
...
00:1f.2 RAID bus controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA RAID Controller (rev 05)
    Subsystem: Hewlett-Packard Company 6 Series/C200 Series Chipset Family SATA RAID Controller
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin B routed to IRQ 26
    Region 0: I/O ports at 10c0 [size=8]
    Region 1: I/O ports at 10c8 [size=4]
    Region 2: I/O ports at 10d0 [size=8]
    Region 3: I/O ports at 10d8 [size=4]
    Region 4: I/O ports at 10e0 [size=32]
    Region 5: Memory at facd0000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: <access denied>
    Kernel driver in use: ahci
    Kernel modules: ahci

Also, I've found #159. Could it be related in some way?

As a temporary fix I'll write some dependency units for the update process, in order to fix the partition table and restore MBR in case of corruption.

orbistertius commented 8 years ago

@marineam you said that code that updates GPT (I assume it is cgpt) does not write to MBR. I looked at cgpt source, and both "cgpt repair" and "cgpt add" call WritePMBR().

Could be possible that MBR gets corrupted here someway?

orbistertius commented 8 years ago

Just a confirmation of the hypothesis of MBR corruption during boot of updated system. Next update of the previously repaired system to 1032.0.0 (skipped the 1029.0.0):

core@hp0 ~ $ md5sum -b mbr-3.bin mbr-4.bin mbr-2*.bin 
fce35fa8a46b1990cc5cc0c7a924f265 *mbr-3.bin
d486006efd289f684749f6c8d88c053c *mbr-4.bin
fce35fa8a46b1990cc5cc0c7a924f265 *mbr-20.bin
ba90ef71a89b868005f1d60828e15f95 *mbr-21.bin

mbr-3.bin: good MBR in system 1000.0.0 mbr-4.bin: MBR after first boot in 1010.1.0 (corrupted) mbr-20.bin: the MBR restored as described in previous post mbr-21.bin: MBR after first boot in 1010.1.0 (corrupted again)

The system is again repaired with:

core@hp0 ~ $ sudo cgpt repair /dev/sda
Secondary Entries is updated.
Secondary Header is updated.
core@hp0 ~ $ sudo coreos-setgoodroot
core@hp0 ~ $ sudo dd if=mbr-20.bin of=/dev/sda bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000153557 s, 3.3 MB/s

and the next reboot is ok.

marineam commented 8 years ago

Status update on this, after a long series of improvements and bug fixes to our GPT code in GRUB I've finally posted the one that fixes booting on this particular system/configuration. There were two issues: the first which I fixed a few weeks ago was that the GPT code didn't properly repair invalid data, leading it to potentially corrupt arbitrary portions of disk. The second issue was the odd firmware configuration of this system that lead to reading invalid data in the first place. This fix should be a suitable workaround: https://github.com/coreos/grub/pull/39

Configuring a single-disk RAID 0 array on this system reserves 32MB or more at the end of the disk. So GRUB, using the BIOS interface, thinks the backup GPT should be in a different location and is unable to access the real location. Meanwhile the OS is writing the backup GPT and potentially filesystem data to a portion of disk the firmware thinks is reserved for the RAID array. I didn't see any sign of the firmware attempting to write to this area which seems plausible since the proprietary kernel driver is probably just implementing software RAID, but hard to know if it can be trusted to never read/write from there.

So future CoreOS releases should work with this setup but I can't say I really recommend it.