ading2210 / shimboot

Boot a desktop Linux distribution from a Chrome OS RMA shim.
https://shimboot.ading.dev
GNU General Public License v3.0
147 stars 44 forks source link

Shimboot build unexpectedly ends #84

Closed 2Epik4u closed 1 month ago

2Epik4u commented 1 month ago

Describe the bug A clear and concise description of what the bug is. Build does not compile and fails while downloading shim image

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/ading2210/shimboot
  2. sudo ./build_complete.sh jacuzzi desktop=kde
  3. Unexpectedly exits

Expected behavior A clear and concise description of what you expected to happen. Supposed to build Screenshots / Photos If applicable, add screenshots or photos to help explain your problem.

If you are reporting an issue with the build process, please run the scripts in debug mode by putting DEBUG=1 before the build commmand, like sudo DEBUG=1 ./build_complete.sh.

epik@justin-macserver:~/shimboot$ sudo DEBUG=1 ./build_complete.sh jacuzzi desktop=kde
++ export DEBUG=1
++ DEBUG=1
++ ANSI_CLEAR='\033[0m'
++ ANSI_BOLD='\033[1m'
++ ANSI_RED='\033[1;31m'
++ ANSI_GREEN='\033[1;32m'
++ ANSI_BLUE='\033[1;34m'
+ . ./image_utils.sh
+ assert_root
+ '[' 0 -ne 0 ']'
+ assert_args jacuzzi
+ '[' -z jacuzzi ']'
+ parse_args jacuzzi desktop=kde
+ declare -g -A args
+ for argument in "$@"
+ '[' jacuzzi = -h ']'
+ '[' jacuzzi = --help ']'
++ echo jacuzzi
++ cut -f1 -d=
+ local key=jacuzzi
+ local key_length=7
+ local value=
+ args["$key"]=
+ for argument in "$@"
+ '[' desktop=kde = -h ']'
+ '[' desktop=kde = --help ']'
++ echo desktop=kde
++ cut -f1 -d=
+ local key=desktop
+ local key_length=7
+ local value=kde
+ args["$key"]=kde
+++ dirname ./build_complete.sh
++ realpath -m .
+ base_dir=/home/epik/shimboot
+ board=jacuzzi
+ compress_img=
+ rootfs_dir=
+ quiet=
+ desktop=kde
+ data_dir=
+ arch=amd64
+ release=
+ distro=debian
+ arm_boards='
  corsola hana jacuzzi kukui strongbad nyan-big kevin bob
  veyron-speedy veyron-jerry veyron-minnie scarlet elm
  kukui peach-pi peach-pit stumpy daisy-spring trogdor
'
+ bad_boards='reef sand snappy pyro'
+ grep -q jacuzzi
+ print_info 'automatically detected arm64 device name'
+ printf '\033[1mautomatically detected arm64 device name\033[0m\n'
automatically detected arm64 device name
+ arch=arm64
+ grep -q jacuzzi
++ uname -m
+ kernel_arch=x86_64
+ host_arch=unknown
+ '[' x86_64 = x86_64 ']'
+ host_arch=amd64
+ needed_deps='wget python3 unzip zip git debootstrap cpio binwalk pcregrep cgpt mkfs.ext4 mkfs.ext2 fdisk depmod findmnt lz4 pv'
++ check_deps 'wget python3 unzip zip git debootstrap cpio binwalk pcregrep cgpt mkfs.ext4 mkfs.ext2 fdisk depmod findmnt lz4 pv'
++ local 'needed_commands=wget python3 unzip zip git debootstrap cpio binwalk pcregrep cgpt mkfs.ext4 mkfs.ext2 fdisk depmod findmnt lz4 pv'
++ for command in $needed_commands
++ command -v wget
++ for command in $needed_commands
++ command -v python3
++ for command in $needed_commands
++ command -v unzip
++ for command in $needed_commands
++ command -v zip
++ for command in $needed_commands
++ command -v git
++ for command in $needed_commands
++ command -v debootstrap
++ for command in $needed_commands
++ command -v cpio
++ for command in $needed_commands
++ command -v binwalk
++ for command in $needed_commands
++ command -v pcregrep
++ for command in $needed_commands
++ command -v cgpt
++ for command in $needed_commands
++ command -v mkfs.ext4
++ for command in $needed_commands
++ command -v mkfs.ext2
++ for command in $needed_commands
++ command -v fdisk
++ for command in $needed_commands
++ command -v depmod
++ for command in $needed_commands
++ command -v findmnt
++ for command in $needed_commands
++ command -v lz4
++ for command in $needed_commands
++ command -v pv
+ '[' '' ']'
+ '[' arm64 '!=' amd64 ']'
+ '[' -f /etc/debian_version ']'
+ dpkg --get-selections
+ grep -v deinstall
+ grep 'qemu-user-static\|box64\|fex-emu'
+ cleanup_path=
+ trap sigint_handler SIGINT
+ shim_url='https://dl.darkn.bio/api/raw/?path=/SH1mmer/jacuzzi.zip'
+ boards_url='https://chromiumdash.appspot.com/cros/fetch_serving_builds?deviceCategory=ChromeOS'
+ '[' -z '' ']'
+ data_dir=/home/epik/shimboot/data
+ print_title 'downloading list of recovery images'
+ printf '>> \033[1;32mdownloading list of recovery images\033[0m\n'
>> downloading list of recovery images
++ wget -qO- --show-progress 'https://chromiumdash.appspot.com/cros/fetch_serving_builds?deviceCategory=ChromeOS'
++ python3 -c '
import json, sys

all_builds = json.load(sys.stdin)
board_name = sys.argv[1]
if not board_name in all_builds["builds"]:
  print("Invalid board name: " + board_name, file=sys.stderr)
  sys.exit(1)

board = all_builds["builds"][board_name]
if "models" in board:
  for device in board["models"].values():
    if device["pushRecoveries"]:
      board = device
      break

reco_url = list(board["pushRecoveries"].values())[-1]
print(reco_url)
' jacuzzi
-                             100%[=================================================>] 816.73K  4.56MB/s    in 0.2s
+ reco_url=https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip
+ print_info 'found url: https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip'
+ printf '\033[1mfound url: https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip\033[0m\n'
found url: https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip
+ shim_bin=/home/epik/shimboot/data/shim_jacuzzi.bin
+ shim_zip=/home/epik/shimboot/data/shim_jacuzzi.zip
+ reco_bin=/home/epik/shimboot/data/reco_jacuzzi.bin
+ reco_zip=/home/epik/shimboot/data/reco_jacuzzi.zip
+ mkdir -p /home/epik/shimboot/data
+ print_title 'downloading recovery image'
+ printf '>> \033[1;32mdownloading recovery image\033[0m\n'
>> downloading recovery image
+ download_and_unzip https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip /home/epik/shimboot/data/reco_jacuzzi.zip /home/epik/shimboot/data/reco_jacuzzi.bin
+ local url=https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip
+ local zip_path=/home/epik/shimboot/data/reco_jacuzzi.zip
+ local bin_path=/home/epik/shimboot/data/reco_jacuzzi.bin
+ '[' '!' -f /home/epik/shimboot/data/reco_jacuzzi.bin ']'
+ '[' '!' '' ']'
+ wget -q --show-progress https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip -O /home/epik/shimboot/data/reco_jacuzzi.zip -c
/home/epik/shimboot/data/reco 100%[=================================================>]   1.63G  34.2MB/s    in 46s
+ '[' '!' -f /home/epik/shimboot/data/reco_jacuzzi.bin ']'
+ cleanup_path=/home/epik/shimboot/data/reco_jacuzzi.bin
+ print_info 'extracting /home/epik/shimboot/data/reco_jacuzzi.zip'
+ printf '\033[1mextracting /home/epik/shimboot/data/reco_jacuzzi.zip\033[0m\n'
extracting /home/epik/shimboot/data/reco_jacuzzi.zip
++ unzip -lq /home/epik/shimboot/data/reco_jacuzzi.zip
++ tail -1
++ xargs
++ cut '-d ' -f1
+ local total_bytes=4963260928
+ '[' '!' '' ']'
+ unzip -p /home/epik/shimboot/data/reco_jacuzzi.zip
+ pv -s 4963260928
4.62GiB 0:00:43 [ 109MiB/s] [========================================================================>] 100%
+ rm -rf /home/epik/shimboot/data/reco_jacuzzi.zip
+ cleanup_path=
+ print_title 'downloading shim image'
+ printf '>> \033[1;32mdownloading shim image\033[0m\n'
>> downloading shim image
+ download_and_unzip 'https://dl.darkn.bio/api/raw/?path=/SH1mmer/jacuzzi.zip' /home/epik/shimboot/data/shim_jacuzzi.zip /home/epik/shimboot/data/shim_jacuzzi.bin
+ local 'url=https://dl.darkn.bio/api/raw/?path=/SH1mmer/jacuzzi.zip'
+ local zip_path=/home/epik/shimboot/data/shim_jacuzzi.zip
+ local bin_path=/home/epik/shimboot/data/shim_jacuzzi.bin
+ '[' '!' -f /home/epik/shimboot/data/shim_jacuzzi.bin ']'
+ '[' '!' '' ']'
+ wget -q --show-progress 'https://dl.darkn.bio/api/raw/?path=/SH1mmer/jacuzzi.zip' -O /home/epik/shimboot/data/shim_jacuzzi.zip -c
/home/epik/shimboot/data/shim  78%[======================================>           ]   2.25G  16.9MB/s    in 77s

Target Chrome OS Device (please complete the following information):

Build Device (please complete the following information):

Additional context Add any other context about the problem here.

ading2210 commented 1 month ago

You can re-run the script and it will continue the download from where it left off.

2Epik4u commented 1 month ago

I tried re-running the script, it just ends and instantly stops

epik@justin-macserver:~/shimboot$ sudo ./build_complete.sh jacuzzi desktop=kde
automatically detected arm64 device name
>> downloading list of recovery images
-                             100%[=================================================>] 816.73K  3.79MB/s    in 0.2s
found url: https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_15964.48.0_jacuzzi_recovery_stable-channel_mp-v17.bin.zip
>> downloading recovery image
>> downloading shim image
/home/epik/shimboot/data/shim  78%[+++++++++++++++++++++++++++++++++++++++           ]   2.23G  --.-KB/s    in 0s

edit: probably a disk related issue

2Epik4u commented 1 month ago

I realized ubuntu server creates a volume thats 50 GB. I raised the volume and it has enough storage and it works fine now. Wasn't a shimboot related issue.