1. Jun 07, 2021
    • Michael Prokop's avatar
      Install only linux-image-cloud-amd64 in VMs for >=buster and amd64 · 43406e89
      Michael Prokop authored
      With linux-image-cloud-amd64 we only need ~96MB of disk space, whereas
      the corresponding linux-image-amd64 takes about 317MB of disk space.
      Also there's usually no need to install linux-headers and firmware
      packages inside a VM, so skip those as well.
      
      Closes: grml/grml-debootstrap#178
      43406e89
  2. Jun 04, 2021
  3. Jun 03, 2021
  4. Jun 02, 2021
  5. Jun 01, 2021
  6. May 31, 2021
  7. May 28, 2021
    • Michael Prokop's avatar
      EFI support: check + mount efivarfs to support Debian kernels >=5.10 · d91d9f3e
      Michael Prokop authored
      CONFIG_EFI_VARS is no longer available since
      https://salsa.debian.org/kernel-team/linux/-/commit/20146398c4599147244ed3ffc54f38d07fb8dea3
      (tagged initially as debian/5.10.1-1_exp1 + shipped with kernel package
      5.10.1-1~exp1 and newer, incl. 5.10.38-1 as present in current
      Debian/unstable). Therefore the kernel module efivars is no longer
      available on more recent Debian kernel systems.
      
      Quoting from https://wiki.debian.org/UEFI:
      
      | The older interface was efivars, showing files under
      | /sys/firmware/efi/vars, and this is what was used by default in both
      | Wheezy and Jessie.
      |
      | The new interface is efivarfs, which will expose things in a slightly
      | different format under /sys/firmware/efi/efivars. This is the new
      | preferred way of using UEFI configuration variables, and Debian switched
      | to it by default from Stretch onwards.
      
      CONFIG_EFI_VARS is no longer required, instead efivarfs seems to be
      available starting with kernel v3.10 and newer (see linux.git):
      
      | commit a9499fa7cd3fd4824a7202d00c766b269fa3bda6
      | Author: Tom Gundersen <teg@jklm.no>
      | Date:   Fri Feb 8 15:37:06 2013 +0000
      |
      |     efi: split efisubsystem from efivars
      |
      |     This registers /sys/firmware/efi/{,systab,efivars/} whenever EFI is enabled
      |     and the system is booted with EFI.
      |
      |     This allows
      |      *) userspace to check for the existence of /sys/firmware/efi as a way
      |         to determine whether or it is running on an EFI system.
      |      *) 'mount -t efivarfs none /sys/firmware/efi/efivars' without manually
      |         loading any modules.
      |
      |     [ Also, move the efivar API into vars.c and unconditionally compile it.
      |       This allows us to move efivars.c, which now only contains the sysfs
      |       variable code, into the firmware/efi directory. Note that the efivars.c
      |       filename is kept to maintain backwards compatability with the old
      |       efivars.ko module. With this patch it is now possible for efivarfs
      |       to be built without CONFIG_EFI_VARS - Matt ]
      
      and:
      
      | commit d68772b7c83f4b518be15ae96f4827c8ed02f684
      | Author: Matt Fleming <matt.fleming@intel.com>
      | Date:   Fri Feb 8 16:27:24 2013 +0000
      |
      |     efivarfs: Move to fs/efivarfs
      |
      |     Now that efivarfs uses the efivar API, move it out of efivars.c and
      |     into fs/efivarfs where it belongs. This move will eventually allow us
      |     to enable the efivarfs code without having to also enable
      |     CONFIG_EFI_VARS built, and vice versa.
      |
      |     Furthermore, things like,
      |
      |         mount -t efivarfs none /sys/firmware/efi/efivars
      |
      |     will now work if efivarfs is built as a module without requiring the
      |     use of MODULE_ALIAS(), which would have been necessary when the
      |     efivarfs code was part of efivars.c.
      
      Thanks to Volodymyr Fedorov + Manuel Montecelo for spotting this
      d91d9f3e
  8. May 21, 2021
  9. Apr 30, 2021
    • Michael Prokop's avatar
      fake-uname: fix gcc argument order and improve preloaded shared library · 4d625ea0
      Michael Prokop authored
      This includes recent changes as integrated at
      https://github.com/sipwise/deployment-iso
      
      
      
      Makefile:
      
      - Fix gcc argument order: newer gcc versions have become more picky on
        their argument order, due to the --as-needed default, and require the
        libraries to be linked to, to be passed after the code/objects that
        use them, otherwise they will get dropped as unused. This change is
        required for compiling with gcc v10.2.1-6 as present on
        Debian/bullseye (otherwise fails to execute with `undefined symbol:
        dlsym`)
      - Add `make check` target to run some basic tests
      - Also get rid of *.o *.so files in clean target, adjust targets
        accordingly to always clean and then build fake-uname.so afterwards
      - Mark as serial-only via .NOTPARALLEL
      
      fake-uname.c:
      
      - Use hidden visibility by default, and export the symbol explicitly.
      - Resolve real_uname() only once.
      - Return early if the real_uname() fails, to avoid acting on bogus data.
      - Call dlerror() before dlsym() to clear any previous errors.
      - Compute the release member size from the utsname struct instead of
        hard-coding it.
      - Always NUL-terminate the relese buffer, so protect against very long
        environment strings.
      - Make various variables into const.
      
      Acked-by: default avatarGuillem Jover <gjover@sipwise.com>
      Thanks: Guillem Jover
      4d625ea0
  10. Apr 29, 2021
  11. Apr 19, 2021
  12. Apr 16, 2021
    • Michael Prokop's avatar
      Use shorter fs label for EFI partition to not break with recent dosfstools · 181ec9a3
      Michael Prokop authored
      This used to work fine until dosfstools 4.1:
      
      | root@grml ~ # mkfs.fat -F32 -n "EFI System Partition" /dev/loop1
      | mkfs.fat 4.1 (2017-01-24)
      | mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
      
      Now with dosfstools >=4.2 it's failing though:
      
      | root@grml ~ # mkfs.fat -F32 -n "EFI System Partition" /dev/loop1
      | mkfs.fat 4.2 (2021-01-31)
      | mkfs.fat: Label can be no longer than 11 characters
      
      So instead use "EFI" as filesystem label, to not fail with newer dosfstools.
      
      Closes: #987014
      Closes: grml/grml-debootstrap#168
      181ec9a3
  13. Jan 22, 2021
  14. Jan 20, 2021
  15. Jan 19, 2021
  16. Dec 24, 2020
  17. Dec 23, 2020
    • Michael Prokop's avatar
      Use bullseye as default Debian release · 9506ba5c
      Michael Prokop authored
      We want to use Debian/bullseye as default release within the
      grml-debootstrap version that's going to be shipped with bullseye,
      so let's be prepared for this.
      
      FTR: *not* modifying the Travis CI related configuration files with this
      change, as the unstable builds on Travis CI are known to be unreliable.
      Travis CI also seems to be a dead end for us, so it's not worth putting
      any further efforts into it, at least for the time being.
      9506ba5c
  18. Dec 12, 2020
  19. Dec 04, 2020
  20. Oct 02, 2020
    • Michael Prokop's avatar
      Improve EFI detection by checking for /sys/firmware/efi · 622ca58e
      Michael Prokop authored
      It might be possible that we can load the efivars module, while
      /sys/firmware/efi still doesn't exist and efibootmgr then fails
      to execute.
      
      We noticed this on Hetzner's Dell PowerEdge™ R6515 DX181 server,
      which was booted in BIOS mode via PXE, while the hardware itself
      is EFI capable. Loading the efivars module worked there, but
      invoking efibootmgr then fails, and the resulting system isn't
      bootable.
      
      Thanks: Darshaka Pathirana for reporting and feedback
      622ca58e
  21. Sep 03, 2020
    • Michael Prokop's avatar
      Fix shellcheck issue SC2174 · 8f673fa8
      Michael Prokop authored
      Fixes:
      
      |    mkdir -m 0700 -p "${AUTHORIZED_KEYS_TARGET}"
      |          ^-- SC2174: When used with -p, -m only applies to the deepest directory.
      
      Closes: #158
      8f673fa8
  22. Sep 01, 2020
  23. Aug 30, 2020
  24. Jun 09, 2020
  25. Jun 05, 2020
  26. Jun 03, 2020