[Bug 2064322] Re: Invalid backup GPT header on tegra igx image

Rémy MARTIN 2064322 at bugs.launchpad.net
Fri May 3 09:52:59 UTC 2024


Interesting... There are so many different ways it is hard to follow and
figure out what is the right way. Anyway, you are right, the point here
is about the gadget yaml. I made a try yesterday defining a structure
for system-data, had to define a size as well, and doing so "works
around" the issue. I proposed a PR (https://github.com/snapcore/pc-
gadget/pull/118) that should fix our builds once merged. Alternatively,
we can use that image-size option if you prefer not to change the gadget
file.

But this would definitely deserve a proper fix, as the rootfs could
slightly grow over time...

Can you please tell me if we can quickly fix the issue merging that PR?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to Ubuntu Image.
https://bugs.launchpad.net/bugs/2064322

Title:
  Invalid backup GPT header on tegra igx image

Status in Ubuntu Image:
  Confirmed

Bug description:
  Affects Tegra images daily builds and release image: 
  https://cdimage.ubuntu.com/nvidia-tegra/ubuntu-server/jammy/daily-preinstalled/current/
  https://cdimage.ubuntu.com/releases/jammy/release/nvidia-tegra/

  Image definition: https://git.launchpad.net/ubuntu-images/tree/ubuntu-server-tegra-igx.yaml?h=jammy
  Gadget yaml: https://git.launchpad.net/~canonical-foundations/snap-pc/+git/github-mirror-amd64/tree/gadget-arm64.yaml?h=classic

  Building the image:
  ubuntu at ubuntu:~/ubuntu-images$ sudo /snap/bin/ubuntu-image classic  -w work -O output ubuntu-server-tegra-igx.yaml
  WARNING: rootfs.sources-list-deb822 was not set. Please explicitly set the format desired for sources list in your image definition.
  WARNING: rootfs.sources-list-deb822 is set to false. The deprecated format will be used to manage sources list. Please if possible adopt the new format.
  [0] build_gadget_tree                                                                                    
  [1] prepare_gadget_tree                                                                                  
  [2] load_gadget_yaml                                                                                     
  WARNING: volumes:pc:structure:0:filesystem_label used for defining partition roles; use role instead
  [3] verify_artifact_names                           
  [4] germinate                                                                                            
  [5] create_chroot                                                                                        
  [6] install_packages                                                                                     
  [7] prepare_image                                                                                        
  [8] preseed_image                                                                                        
  [9] clean_rootfs                                                                                         
  [10] customize_sources_list            
  [11] customize_cloud_init                                                                                                                                                                                          
  [12] set_default_locale                                                                                                                                                                                            
  [13] populate_rootfs_contents                                                                            
  [14] calculate_rootfs_size                                                                               
  [15] populate_bootfs_contents                                                                            
  [16] populate_prepare_partitions                                                                         
  [17] make_disk                                                                                                                                                                                                     
  [18] update_bootloader                                                                                                                                                                                             
  [19] generate_package_manifest                                                                           
  Build successful        

  Checking the partition table:
  ubuntu at ubuntu:~/ubuntu-images$ gdisk -l output/ubuntu-22.04-preinstalled-server-arm64+tegra-igx.img      
  GPT fdisk (gdisk) version 1.0.8                    
                                                      
  Caution: invalid backup GPT header, but valid main header; regenerating                                                                                                                                            
  backup header from main header.                                                                          
                                                                                                           
  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!                                       
  Main header: OK                                     
  Backup header: ERROR                             
  Main partition table: OK                                                                                 
  Backup partition table: ERROR          
                                                      
  Partition table scan:                                                                                                                                                                                              
    MBR: protective                                                                                        
    BSD: not present                                                                                       
    APM: not present                                                                                                                                                                                                 
    GPT: damaged                                                                                                                                                                                                     
                                                                                                                                                                                                                     
  ****************************************************************************                             
  Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk                             
  verification and recovery are STRONGLY recommended.                                                      
  ****************************************************************************                        
                                                      
  Warning! Secondary partition table overlaps the last partition by                                        
  9585020 blocks!                                                                                          
  You will need to delete this partition or resize it in another utility.                                  
  Disk output/ubuntu-22.04-preinstalled-server-arm64+tegra-igx.img: 9724252 sectors, 4.6 GiB               
  Sector size (logical): 512 bytes                                                                         
  Disk identifier (GUID): F29EC7AD-406F-4DD2-89BF-94F539E6BFAC                                             
  Partition table holds up to 128 entries
  Main partition table begins at sector 2 and ends at sector 33                                                                                                                                                      
  First usable sector is 34, last usable sector is 139231                                                                                                                                                            
  Partitions will be aligned on 2048-sector boundaries                                                     
  Total free space is 2014 sectors (1007.0 KiB)                                                            
                                                                                                           
  Number  Start (sector)    End (sector)  Size       Code  Name                                            
     1            2048          104447   50.0 MiB    EF00  EFI System                                                                                                                                                
     2          104448         9724251   4.6 GiB     8300  writable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-image/+bug/2064322/+subscriptions




More information about the foundations-bugs mailing list