rancher / elemental

Elemental is an immutable Linux distribution built to run Rancher and its corresponding Kubernetes distributions RKE2 and k3s. It is built using the Elemental-toolkit
https://elemental.docs.rancher.com/
Apache License 2.0
295 stars 39 forks source link

Documentation - custom ISO outdated #1557

Open davidhrbac opened 1 week ago

davidhrbac commented 1 week ago

There are multiple issues with custom ISO process in Documentation.

  1. https://elemental.docs.rancher.com/rancher-vmware

    • script ./elemental-iso-add-registration is relying on https://download.opensuse.org/repositories/isv:/Rancher:/Elemental:/Stable:/Teal53/media/iso/elemental-teal.x86_64.iso which is not available any more
    • it seems that there is no other x86_64 ISO available
    • since the script does not test return value of curl download it "finishes" the custom build creating "empty" ISO containing

      $ ./elemental-iso-add-registration initial-registration.yaml
      $ isoinfo -l -i elemental-teal.x86_64.iso 
      
      Directory listing of /
      d---------   0    0    0            2048 Sep  9 2024 [     50 02]  . 
      d---------   0    0    0            2048 Sep  9 2024 [     50 02]  .. 
      ----------   0    0    0            1048 Sep  9 2024 [     55 00]  LIVECD_CLOUD_CONFIG.YAML;1 
  2. https://elemental.docs.rancher.com/next/custom-install/#repacking-the-iso-image-with-extra-files

    • repacking ISO file does not work
    • having ISO create within webGUI with this content

      $ isoinfo -l -i elemental-test-2024-09-09T09_00_47Z.iso
      
      Directory listing of /
      d---------   0    0    0            2048 Sep  5 2024 [     82 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     82 02]  ..
      d---------   0    0    0            2048 Sep  5 2024 [     84 02]  BOOT
      d---------   0    0    0            2048 Sep  5 2024 [     88 02]  EFI
      d---------   0    0    0            2048 Sep  9 2024 [     90 02]  ISO_CONFIG
      ----------   0    0    0             988 Sep  9 2024 [ 439577 00]  LIVECD_CLOUD_CONFIG.YAML;1
      ----------   0    0    0       803799040 Sep  5 2024 [  47097 00]  ROOTFS.SQUASHFS;1
      
      Directory listing of /BOOT/
      d---------   0    0    0            2048 Sep  5 2024 [     84 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     82 02]  ..
      d---------   0    0    0            2048 Sep  5 2024 [     85 02]  GRUB2
      d---------   0    0    0            2048 Sep  5 2024 [     86 02]  X86_64
      
      Directory listing of /EFI/
      d---------   0    0    0            2048 Sep  5 2024 [     88 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     82 02]  ..
      d---------   0    0    0            2048 Sep  5 2024 [     89 02]  BOOT
      
      Directory listing of /ISO_CONFIG/
      d---------   0    0    0            2048 Sep  9 2024 [     90 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     82 02]  ..
      ----------   0    0    0               0 Sep  9 2024 [    104 00]  CLOUD_CONFIG.YAML;1
      
      Directory listing of /BOOT/GRUB2/
      d---------   0    0    0            2048 Sep  5 2024 [     85 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     84 02]  ..
      ----------   0    0    0            1371 Sep  5 2024 [    106 00]  GRUB.CFG;1
      
      Directory listing of /BOOT/X86_64/
      d---------   0    0    0            2048 Sep  5 2024 [     86 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     84 02]  ..
      d---------   0    0    0            2048 Sep  5 2024 [     87 02]  LOADER
      
      Directory listing of /EFI/BOOT/
      d---------   0    0    0            2048 Sep  5 2024 [     89 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     88 02]  ..
      ----------   0    0    0          965672 Sep  5 2024 [  45584 00]  BOOTX64.EFI;1
      ----------   0    0    0             120 Sep  5 2024 [  46056 00]  GRUB.CFG;1
      ----------   0    0    0         1275904 Sep  5 2024 [  46057 00]  GRUB.EFI;1
      ----------   0    0    0          852456 Sep  5 2024 [  46680 00]  MOKMANAGER.EFI;1
      
      Directory listing of /BOOT/X86_64/LOADER/
      d---------   0    0    0            2048 Sep  5 2024 [     87 02]  .
      d---------   0    0    0            2048 Sep  5 2024 [     86 02]  ..
      ----------   0    0    0        81464248 Sep  5 2024 [    107 00]  INITRD.;1
      ----------   0    0    0        11670976 Sep  5 2024 [  39885 00]  LINUX.;1
    • having content like this
      $ ls
      elemental-iso-add-registration  elemental-test-2024-09-09T09_00_47Z.iso  initial-registration.yaml  overlay
      $ ls overlay/
      livecd_cloud_config.yaml
    • running xorriso as described in the documentation ends with error

      $ LC_ALL=C xorriso -indev elemental-test-2024-09-09T09_00_47Z.iso -outdev elemental-test.iso -map overlay / -boot_image any replay
      xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
      
      xorriso : NOTE : Loading ISO image tree from LBA 0
      xorriso : UPDATE :      17 nodes read in 1 seconds
      libisofs: NOTE : Found hidden El-Torito image for EFI.
      libisofs: NOTE : EFI image start and size: 439578 * 2048 , 8192 * 512
      xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
      Drive current: -indev 'elemental-test-2024-09-09T09_00_47Z.iso'
      Media current: stdio file, overwriteable
      Media status : is written , is appendable
      Boot record  : El Torito , MBR protective-msdos-label cyl-align-off GPT
      Media summary: 1 session, 441642 data blocks,  863m data, 51.8g free
      Volume id    : 'COS_LIVE'
      Drive current: -outdev 'elemental-test.iso'
      Media current: stdio file, overwriteable
      Media status : is blank
      Media summary: 0 sessions, 0 data blocks, 0 data, 51.8g free
      xorriso : UPDATE :       1 files added in 1 seconds
      Added to ISO image: directory '/'='/tmp/iso/overlay'
      xorriso : NOTE : Replayed 16 boot related commands
      xorriso : NOTE : Copying to System Area: 32768 bytes from file '--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:elemental-test-2024-09-09T09_00_47Z.iso'
      libisofs: FAILURE : Invalid parameter value
      xorriso : FAILURE : Could not attach El-Torito boot image to ISO 9660 image
      xorriso : NOTE : -return_with SORRY 32 triggered by problem severity FAILURE
  3. https://elemental.docs.rancher.com/rancher-vmware

    • is seems that elemental-iso-add-registration script does not work with local ISO

      $ ./elemental-iso-add-registration initial-registration.yaml elemental-test-2024-09-09T09_00_47Z.iso 
      Pulling artifacts from isv:Rancher:Elemental:Stable OBS project
      Error: /tmp/iso/elemental-test-2024-09-09T09_00_47Z.iso already exists, aborting
      
      usage:
       elemental-iso-add-registration REGISTRATION_CONFIG_FILE [ISO_URL]
      
      REGISTRATION_CONFIG_FILE is the yaml file required by elemental-register in
      order to self register against the elemental-operator.
      
      ISO_URL is the URL of an elemental ISO, defaults to community Elemental Teal
      ISO releases if not set. It can also be a local path.
davidhrbac commented 1 week ago

Add 2) rebuild of ISO does not work with

$ xorriso -version
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.

xorriso 1.5.2
ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program
Copyright (C) 2019, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
xorriso version   :  1.5.2
Version timestamp :  2019.10.26.180001
Build timestamp   :  -none-given-
libisofs   in use :  1.5.2  (min. 1.5.2)
libjte     in use :  2.0.0  (min. 2.0.0)
libburn    in use :  1.5.2  (min. 1.5.2)
libburn OS adapter:  internal GNU/Linux SG_IO adapter sg-linux
libisoburn in use :  1.5.2  (min. 1.5.2)
Provided under GNU GPL version 3 or later, due to libreadline license.
There is NO WARRANTY, to the extent permitted by law.

It DOES work with

$ LC_ALL=C ./xorriso-1.5.6/xorriso/xorriso -version
GNU xorriso 1.5.6.pl02 : RockRidge filesystem manipulator, libburnia project.

GNU xorriso 1.5.6.pl02
ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program
Copyright (C) 2023, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
xorriso version   :  1.5.6.pl02
Version timestamp :  2023.06.14.170001
Build timestamp   :  -none-given-
libisofs   in use :  1.5.6  (min. 1.5.6)
libjte     in use :  2.0.0  (min. 2.0.0)
libburn    in use :  1.5.6  (min. 1.5.6)
libburn OS adapter:  internal GNU/Linux SG_IO adapter sg-linux
libisoburn in use :  1.5.6  (min. 1.5.6)
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.