1. Mar 31, 2023
    • Michael Prokop's avatar
      GRUB: use persistent device names under /dev/disk/by-id/ for install_devices · b379e240
      Michael Prokop authored
      We pass the requested --grub … device argument to the GRUB package
      configuration, like:
      
      | # debconf-show grub-pc | grep grub-pc/install_devices:
      | * grub-pc/install_devices: /dev/sda
      
      But the GRUB package tries to use /dev/disk/by-id/... for
      install_devices setting (since 2010 and Debian/squeeze AFAICS), as can
      be observed by reconfiguring the GRUB package (which then automatically
      converts the /dev/sdX to the proper /dev/disk/by-id/... device when
      being asked in the debconf prompt):
      
      | # dpkg-reconfigure grub-pc
      | grub-pc: Running grub-install ...
      | [...]
      | # debconf-show grub-pc | grep grub-pc/install_devices:
      | * grub-pc/install_devices: /dev/disk/by-id/ata-VBOX_HARDDISK_VBf4f4391c-6316fa69
      
      The available_ids() and device_to_id() helper functions are based on
      code by Colin Watson <cjwatson@debian.org> in GRUB's postinst script
      of the Debian package, see git commits 4830efd9e + ce2a43c85 at
      https://salsa.debian.org/grub-team/grub.git.
      
      Closes: https://github.com/grml/grml-debootstrap/issues/206
      b379e240
  2. Feb 20, 2023
    • Michael Prokop's avatar
      Release new version 0.103 · 8aed9f5a
      Michael Prokop authored
      8aed9f5a
    • Michael Prokop's avatar
      Disable ext4 metadata_csum_seed for Debian releases older than bookworm · bbb2ea07
      Michael Prokop authored
      As of e2fsprogs v1.43 and Linux kernel v4.4 the ext4 file system supports
      the new metadata_csum_seed feature (which allows the file system UUID to
      be modified without needing to update all of the file system metadata).
      Also see https://bugs.debian.org/1031325
      
      Starting with e2fsprogs v1.47 this new metadata_csum_seed feature gets
      enabled by default. When installing an older Debian release this might
      cause problems because it's not fully supported yet, see e.g. the GRUB
      failure documented as #866603.
      
      To keep the behavior identical to Debian, we do not enable the
      metadata_csum_seed feature for Debian releases before bookworm.  This is
      relevant for us, as grml-debootstrap might be running from a more recent
      Debian release (like a Debian testing/unstable based Grml live system).
      
      We check for the e2fsprogs version as versions before 1.43 didn't support
      the metadata_csum_seed option yet.
      
      Closes: #1031416
      Closes: https://github.com/grml/grml-debootstrap/issues/204
      bbb2ea07
  3. Feb 07, 2023
  4. Nov 26, 2022
  5. Nov 25, 2022
  6. Nov 15, 2022
  7. Jul 03, 2022
  8. Jul 02, 2022
  9. Jan 25, 2022
  10. Dec 07, 2021
    • Michael Prokop's avatar
      3da69b03
    • Michael Prokop's avatar
      VMs: create partition with alignment starting at 4MiB + ending at 100% · 7b2b4c88
      Michael Prokop authored
      Our partition creation process inside VMs used parted with "mkpart
      primary ext4 2M -1", which could end up with unaligned partitions (as
      reported in #185):
      
      | (parted) mkpart primary ext4 2M -1
      | Warning: The resulting partition is not properly aligned for best performance: 3906s % 4096s != 0s
      
      This depends on the I/O settings of the underlying storage.
      
      The mkpart start at "2M" is interpreted as 2 Megabyte (2000000 bytes or
      3906 sectors) from the disk start.  The end "-1" is interpreted as 1
      Megabyte (1000000 bytes or 1953 sectors) before the disk end.
      
      On the other hand, "2MiB" is interpreted as 2 Mebibyte (2097152 bytes or
      4096 sectors) from the disk start, and "100%" is interpreted as the disk
      end.
      
      Quoting from https://www.gnu.org/software/parted/manual/html_node/unit.html:
      
      | Parted will compute sensible ranges for the locations you specify (e.g.,
      | a range of +/- 500 MB when you specify the location in “G”, and a range
      | of +/- 500 KB when you specify the location in “M”) and will select the
      | nearest location in this range from the one you wrote that satisfies
      | constraints from both the operation, the filesystem being worked on, the
      | disk label, other partitions and so on.
      | [...]
      | Note that as of parted-2.4, when you specify start and/or end values
      | using IEC binary units like “MiB”, “GiB”, “TiB”, etc., parted treats
      | those values as exact, and equivalent to the same number specified in
      | bytes (i.e., with the “B” suffix), in that it provides no “helpful”
      | range of sloppiness. Contrast that with a partition start request of
      | “4GB”, which may actually resolve to some sector up to 500MB before or
      | after that point. Thus, when creating a partition, you should prefer
      | to specify units of bytes (“B”), sectors (“s”), or IEC binary units
      | like “MiB”, but not “MB”, “GB”, etc.
      
      Furthermore quoting from https://www.gnu.org/software/parted/manual/html_node/mkpart.html#FOOT2:
      
      | Cheap flash drives will be with us for a long time to come, and, for
      | them, 1MiB alignment is not enough. Use at least 4MiB-aligned
      | partitions. For details, see Arnd Bergman’s article,
      | http://lwn.net/Articles/428584/ and its many comments.
      
      A better default should be usage of an IEC binary unit with a
      4MiB-aligned partition, so let's switch to "4MiB 100%".
      
      Thanks: David Gnedt for the bug report and analysis, Darshaka Pathirana and Chris Hofstaedtler for further information and feedback
      Closes: grml/grml-debootstrap#185
      7b2b4c88
  11. Dec 03, 2021
    • Michael Prokop's avatar
      Fix Grml repository usage · ea978f62
      Michael Prokop authored
      More recent versions of apt no longer accept unsigned repositories, and fail with:
      
      | The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
      | Reading package lists... Done
      | W: GPG error: http://deb.grml.org grml-stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
      | E: The repository 'http://deb.grml.org grml-stable InRelease' is not signed.
      | N: Updating from such a repository can't be done securely, and is therefore disabled by default.
      | N: See apt-secure(8) manpage for repository creation and user configuration details.
      
      By enabling the Acquire::AllowInsecureRepositories=1 option, we can avoid this failure:
      
      | W: GPG error: http://deb.grml.org grml-stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21E0CA38EA2EA4AB
      | W: The repository 'http://deb.grml.org grml-stable InRelease' is not signed.
      | N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
      | N: See apt-secure(8) manpage for repository creation and user configuration details.
      
      While at it:
      
      * simplify code
      * don't check for "grml" inside /etc/apt/sources.list.d/grml.list,
        instead assume the file was set up as needed if it exists already
      * improve apt pinning configuration:
        - no need to pin Grml *and* Debian repositories, instead let's
          set up only the Grml repository and reduce it to a pinning of 100
        - use /etc/apt/preferences.d/grml.pref instead of /etc/apt/preferences
      * drop direct gpg usage, this is error prone (gpg keyservers known to be
        unavailable, we might not have gpg executable available, its code is
        fallback and untested,...)
      * set up Grml's apt configuration with usage of
        "signed-by=/usr/share/keyrings/grml-archive-keyring.gpg"
      
      Thanks: Karl Voit for the bug report
      Closes: grml/grml-debootstrap#187
      ea978f62
    • Michael Prokop's avatar
      Drop leftover KEYRING code · 43ea7e24
      Michael Prokop authored
      KEYRING is no longer relevant and a leftover from commit 06fc8bd2.
      If someone wants to customize the keyring handling of debootstrap,
      this can be achieved via --debopt / DEBOOTSTRAP_OPT.
      
      Closes: grml/grml-debootstrap#184
      43ea7e24
  12. Aug 23, 2021
  13. Aug 02, 2021
    • Michael Prokop's avatar
      Install dbus by default · 86f83aa4
      Michael Prokop authored
      Without dbus, several systemd features aren't available (e.g.
      systemd-logind and its HandlePowerKey=poweroff doesn't have any effect).
      We agreed to ship dbus by default, as people want usable, not minimal
      systems most of the time.
      
      Closes: grml/grml-debootstrap#102
      86f83aa4
  14. Jul 26, 2021
  15. Jul 09, 2021
  16. Jun 25, 2021
    • Michael Prokop's avatar
      Fix git version detection when executing in foreign git repository · b047071e
      Michael Prokop authored
      When the working directory is a foreign git repository (other than
      grml-debootstrap.git), and grml-debootstrap is invoked with the full
      path pointing towards grml-debootstrap.git, then we're relying on `git
      describe` output of the other (foreign) repository, which is failing and
      reporting an unknown version.
      
      Demonstration:
      
      | % cd "$(mktemp -d)"
      | % git init
      | Initialized empty Git repository in /tmp/tmp.2TQO7PZPQX/.git/
      | % ~/src/grml/grml-debootstrap/grml-debootstrap --version
      | fatal: No names found, cannot describe anything.
      |  * grml-debootstrap - version unknown
      |  * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/
      
      ... and also:
      
      | % cd "$(mktemp -d)"
      | % git init
      | Initialized empty Git repository in /tmp/tmp.Y15j7wMMOn/.git/
      | % echo foo > foo
      | % git add foo ; git commit -m 'foo'
      | [main (root-commit) 5d4357c] foo
      |  1 file changed, 1 insertion(+)
      |  create mode 100644 foo
      | % git tag 0.42
      | % ~/src/grml/grml-debootstrap/grml-debootstrap --version
      | fatal: No annotated tags can describe '5d4357c0b5bb504e610265904619287be2c6718d'.
      | However, there were unannotated tags: try --tags.
      |  * grml-debootstrap - version unknown
      |  * Report bugs via https://github.com/grml/grml-debootstrap/ or https://grml.org/bugs/
      
      Thanks: Paul Menzel for the bugreport
      Closes: grml/grml-debootstrap#183
      b047071e
  17. Jun 04, 2021
  18. Jun 03, 2021
  19. Jun 02, 2021