From: Michael Prokop Date: Fri, 22 Jan 2021 10:55:14 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/pr/161' X-Git-Tag: v0.95~1 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=5db946a930ef1cdf9d8e8da8111072faa37383d5;hp=3f28b112fddeba2c9a420792507e1b3d1ca273a6;p=grml-debootstrap.git Merge remote-tracking branch 'origin/pr/161' --- diff --git a/chroot-script b/chroot-script index 0d95d67..b0737ca 100755 --- a/chroot-script +++ b/chroot-script @@ -481,7 +481,15 @@ createfstab(){ EOF if [ -n "$TARGET_UUID" ] ; then - echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults,errors=remount-ro 0 1" >> /etc/fstab + local rootfs_mount_options=",errors=remount-ro" + case "${FILESYSTEM}" in + f2fs) + # errors=remount-ro is unsupported, see https://github.com/grml/grml-debootstrap/issues/163 + rootfs_mount_options="" + ;; + esac + + echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults${rootfs_mount_options} 0 1" >> /etc/fstab else echo "Warning: couldn't identify target UUID for rootfs, your /etc/fstab might be incomplete." fi diff --git a/config b/config index 6477acf..b5104f0 100644 --- a/config +++ b/config @@ -73,8 +73,8 @@ # Debian release that should be installed. # Supported values: lenny, squeeze, wheezy, jessie, stretch, buster, bullseye, sid -# Default: 'buster' -# RELEASE='buster' +# Default: 'bullseye' +# RELEASE='bullseye' # Define components that should be used within sources.list. # Default: 'main' diff --git a/debian/changelog b/debian/changelog index 81cd810..cd007b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +grml-debootstrap (0.94) unstable; urgency=medium + + The "waiting for bullseye, 2021 + vaccinations" release + + [ Chris Hofstaedtler ] + * [5c7f7fa] d/control: Set Rules-Requires-Root: no + * [2617a47] d/control: fix Vcs-Git field name + * [2e6b03e] d/rules: remove dh_make template header + + [ Michael Prokop ] + * [8f673fa] Fix shellcheck issue SC2174 + * [622ca58] Improve EFI detection by checking for /sys/firmware/efi. + Thanks to Darshaka Pathirana for reporting and feedback + * [1475b08] packer: make template compatible with recent packer + versions. Thanks to Darshaka Pathirana for reporting + * [208a600] packer: use latest VBoxGuestAdditions (6.1.16) + Grml stable + release (2020.06) + * [9506ba5] Use bullseye as default Debian release + + -- Michael Prokop Wed, 23 Dec 2020 17:34:26 +0100 + grml-debootstrap (0.93) unstable; urgency=medium * New release (without code changes) to fix Debian policy issue diff --git a/grml-debootstrap b/grml-debootstrap index ae601f8..586edd8 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -72,7 +72,7 @@ MNTPOINT="/mnt/debootstrap.$$" [ -n "$POST_SCRIPTS" ] || POST_SCRIPTS='yes' [ -n "$PRE_SCRIPTS" ] || PRE_SCRIPTS='yes' [ -n "$RECONFIGURE" ] || RECONFIGURE='console-data' -[ -n "$RELEASE" ] || RELEASE='buster' +[ -n "$RELEASE" ] || RELEASE='bullseye' [ -n "$RM_APTCACHE" ] || RM_APTCACHE='yes' [ -n "$SCRIPTS" ] || SCRIPTS='no' # deprecated, replaced by POST_SCRIPTS [ -n "$SECURE" ] || SECURE='yes' @@ -103,7 +103,7 @@ Bootstrap options: -m, --mirror Mirror which should be used for apt-get/aptitude. -i, --iso Mountpoint where a Debian ISO is mounted to, for use instead of fetching packages from a mirror. - -r, --release Release of new Debian system (default: buster). + -r, --release Release of new Debian system (default: bullseye). -t, --target Target partition (/dev/...) or directory where the system should be installed to. -p, --mntpoint Mountpoint used for mounting the target system, @@ -183,10 +183,18 @@ fi # }}} # early helper functions {{{ -GOOD='' -BAD='' -WARN='' -NORMAL='' +# skip colors when running within a dumb terminal +if [ "${TERM}" = "dumb" ] ; then + GOOD= + BAD= + WARN= + NORMAL= +else + GOOD='' + BAD='' + WARN='' + NORMAL='' +fi einfo() { einfon "$1\\n" @@ -386,7 +394,7 @@ while :; do shift; _opt_debopt="$1" ;; --filesystem) # Filesystem that should be used - shift; _opt_filesystem="$1" + shift; _opt_filesystem="$1" ; FILESYSTEM="${_opt_filesystem}" ;; --interactive) # Use interactive mode (frontend) _opt_interactive=T @@ -779,7 +787,7 @@ prompt_for_bootmanager() # ask for Debian release {{{ prompt_for_release() { - [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='buster' + [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='bullseye' RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \ "Please enter the Debian release you would like to use for installation:" \ 0 50 8 \ @@ -1162,7 +1170,7 @@ fi # Support for generic release codenames is unavailable. {{{ if [ "$RELEASE" = "stable" ] || [ "$RELEASE" = "testing" ] ; then eerror "Generic release codenames (stable, testing) are unsupported. \ -Please use specific codenames such as stretch or buster." ; eend 1 +Please use specific codenames such as buster or bullseye." ; eend 1 bailout 1 fi # }}} @@ -1523,7 +1531,16 @@ if [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v | ;; esac dd if="${MNTPOINT}/usr/lib/grub/i386-pc/boot.img" of="${ORIG_TARGET}" conv=notrunc bs=440 count=1 - chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2 + case "${_opt_filesystem}" in + f2fs) + chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos f2fs + ;; + # NOTE - we might need to distinguish between further filesystems + *) + chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2 + ;; + esac + dd if="${MNTPOINT}/tmp/core.img" of="${ORIG_TARGET}" conv=notrunc seek=1 rm -f "${MNTPOINT}/tmp/core.img" fi @@ -1654,6 +1671,7 @@ preparechroot() { [ -n "$EXTRAPACKAGES" ] && echo "EXTRAPACKAGES='$(sed "s,','\\\\'',g" <<<"${EXTRAPACKAGES}")'" >> "$CHROOT_VARIABLES" [ -n "$EFI" ] && echo "EFI='$(sed "s,','\\\\'',g" <<<"${EFI}")'" >> "$CHROOT_VARIABLES" [ -n "$FALLBACK_MIRROR" ] && echo "FALLBACK_MIRROR='$(sed "s,','\\\\'',g" <<<"${FALLBACK_MIRROR}")'" >> "$CHROOT_VARIABLES" + [ -n "$FILESYSTEM" ] && echo "FILESYSTEM='$(sed "s,','\\\\'',g" <<<"${FILESYSTEM}")'" >> "$CHROOT_VARIABLES" [ -n "$FORCE" ] && echo "FORCE='$(sed "s,','\\\\'',g" <<<"${FORCE}")'" >> "$CHROOT_VARIABLES" [ -n "$GRMLREPOS" ] && echo "GRMLREPOS='$(sed "s,','\\\\'',g" <<<"${GRMLREPOS}")'" >> "$CHROOT_VARIABLES" [ -n "$GRUB" ] && echo "GRUB='$(sed "s,','\\\\'',g" <<<"${GRUB}")'" >> "$CHROOT_VARIABLES" diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index 111ca97..b572f5c 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -219,7 +219,7 @@ Options and environment variables Specify release of new Debian system. Supported releases names: lenny, squeeze, wheezy, jessie, stretch, buster, bullseye and sid. Corresponding with configuration - variable RELEASE. Default release: buster + variable RELEASE. Default release: bullseye *--remove-configs*:: @@ -294,7 +294,7 @@ Usage examples grml-debootstrap --target /dev/sda1 --grub /dev/sda -Install default Debian release (buster) on /dev/sda1 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. +Install default Debian release (bullseye) on /dev/sda1 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. grml-debootstrap --release stretch --target /dev/sda1 --grub /dev/sda --hostname debian01 --password changeme @@ -307,32 +307,32 @@ Install Debian unstable/sid on /dev/sda6 and install bootmanager GRUB in MBR (ma DEBOOTSTRAP=mmdebstrap grml-debootstrap --target /dev/sda1 --grub /dev/sda -Install default Debian release (buster) on /dev/sda1 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. +Install default Debian release (bullseye) on /dev/sda1 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. Use mmdebstrap instead of default debootstrap tool for bootstrapping. grml-debootstrap --target /dev/mapper/vg0-rootfs --grub /dev/sda -Install default Debian release (buster) on LVM device /dev/mapper/vg0-rootfs and install bootmanager GRUB in MBR (master boot record) of /dev/sda. +Install default Debian release (bullseye) on LVM device /dev/mapper/vg0-rootfs and install bootmanager GRUB in MBR (master boot record) of /dev/sda. grml-debootstrap --efi /dev/sda1 --target /dev/sda2 --grub /dev/sda -Install default Debian release (buster) on /dev/sda2 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. +Install default Debian release (bullseye) on /dev/sda2 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. Use /dev/sda1 as EFI partition (requires EFI support in booted system). mount /dev/sda1 /data/chroot grml-debootstrap --target /data/chroot -Install default Debian release (buster) in directory /data/chroot (without any bootloader). +Install default Debian release (bullseye) in directory /data/chroot (without any bootloader). grml-debootstrap --target /dev/sda3 --grub /dev/sda --mirror ftp://ftp.tugraz.at/mirror/debian -Install default Debian release (buster) on /dev/sda3 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. +Install default Debian release (bullseye) on /dev/sda3 and install bootmanager GRUB in MBR (master boot record) of /dev/sda. Use specified mirror instead of the default (http://deb.debian.org/debian) one. mount /dev/sda1 /mnt/sda1 grml-debootstrap --vmfile --vmsize 3G --target /mnt/sda1/qemu.img -Install default debian release (buster) in a Virtual Machine file with 3GB disk size (including GRUB as bootmanager in MBR of the virtual disk file): +Install default debian release (bullseye) in a Virtual Machine file with 3GB disk size (including GRUB as bootmanager in MBR of the virtual disk file): mount -o loop ./debian-CD-1.iso /media/cdrom grml-debootstrap --target /dev/sda1 --grub /dev/sda --iso /media/cdrom @@ -404,7 +404,7 @@ Where do you want to install grub to? Usage example: grub=/dev/sda release=... -Specify release of new Debian system. Defaults to Debian buster. Supported +Specify release of new Debian system. Defaults to Debian bullseye. Supported releases: lenny, squeeze, wheezy, jessie, stretch, buster, bullseye and sid. Usage example: release=stretch mirror=... diff --git a/packer/debian64.json b/packer/debian64.json index 1e684a1..d1c2595 100644 --- a/packer/debian64.json +++ b/packer/debian64.json @@ -1,78 +1,82 @@ { - "variables": { - "grml_type": "grml64-full", - "grml_version": "2020.06-rc1", - "grml_iso_checksum": "b28b54e55fc5fe1569e0201e918da49be0885646", - "debian_version": "buster", - "grml_debootstrap_version": "latest", - "grml_debootstrap_local_path": "doesnotexist" - }, - "builders": [ - { - "type": "virtualbox-iso", - "vm_name": "{{ user `grml_type` }}_{{ user `grml_version` }}", - "guest_os_type": "Debian_64", - "hard_drive_interface": "sata", - "iso_url": "http://download.grml.org/devel/{{ user `grml_type` }}_{{ user `grml_version` }}.iso", - "iso_checksum": "{{ user `grml_iso_checksum` }}", - "iso_checksum_type": "sha1", - "ssh_wait_timeout": "20m", - "ssh_username": "root", - "ssh_password": "grml", - "output_directory": "{{ user `grml_type` }}_output", - "headless": false, - "boot_wait": "5s", - "boot_command": [ - " ssh=grml " - ], - "shutdown_command": "shutdown -h now", - "guest_additions_url": "https://download.virtualbox.org/virtualbox/6.1.10/VBoxGuestAdditions_6.1.10.iso", - "guest_additions_sha256": "62a0c6715bee164817a6f58858dec1d60f01fd0ae00a377a75bbf885ddbd0a61", - "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "1024"] - ] - } + { + "boot_command": [ + " ssh=grml " + ], + "boot_wait": "5s", + "guest_additions_sha256": "88db771a5efd7c048228e5c1e0b8fba56542e9d8c1b75f7af5b0c4cf334f0584", + "guest_additions_url": "https://download.virtualbox.org/virtualbox/6.1.16/VBoxGuestAdditions_6.1.16.iso", + "guest_os_type": "Debian_64", + "hard_drive_interface": "sata", + "headless": false, + "iso_checksum": "sha1:{{ user `grml_iso_checksum` }}", + "iso_url": "http://download.grml.org/{{ user `grml_type` }}_{{ user `grml_version` }}.iso", + "output_directory": "{{ user `grml_type` }}_output", + "shutdown_command": "shutdown -h now", + "ssh_password": "grml", + "ssh_timeout": "20m", + "ssh_username": "root", + "type": "virtualbox-iso", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ] + ], + "vm_name": "{{ user `grml_type` }}_{{ user `grml_version` }}" + } + ], + "post-processors": [ + { + "override": { + "virtualbox": { + "output": "debian64_{{ user `debian_version` }}.box" + } + }, + "type": "vagrant" + } ], - "provisioners": [ + "provisioners": [ { - "type": "file", + "destination": "/tmp/fake-uname.so", "source": "fake-uname.so", - "destination": "/tmp/fake-uname.so" + "type": "file" }, { - "type": "file", + "destination": "/tmp/debian64.bats", "source": "debian64.bats", - "destination": "/tmp/debian64.bats" + "type": "file" }, { - "type": "shell", - "inline": "mkdir -vp /tmp/grml-debootstrap/" + "inline": "mkdir -vp /tmp/grml-debootstrap/", + "type": "shell" }, { - "type": "file", + "destination": "/tmp/grml-debootstrap/", "source": "{{ user `grml_debootstrap_local_path` }}/", - "destination": "/tmp/grml-debootstrap/" + "type": "file" }, { - "type": "shell", "environment_vars": [ - "GRML_DEBOOTSTRAP_VERSION={{ user `grml_debootstrap_version` }}", - "DEBIAN_VERSION={{ user `debian_version` }}" + "GRML_DEBOOTSTRAP_VERSION={{ user `grml_debootstrap_version` }}", + "DEBIAN_VERSION={{ user `debian_version` }}" ], "scripts": [ "debian64_provision.sh" - ] + ], + "type": "shell" } ], - "post-processors": [ - { - "type": "vagrant", - "override": { - "virtualbox": { - "output": "debian64_{{ user `debian_version` }}.box" - } - } - } - ] + "variables": { + "debian_version": "bullseye", + "grml_debootstrap_local_path": "doesnotexist", + "grml_debootstrap_version": "latest", + "grml_iso_checksum": "80ccb1bc1eb6116e9094a332d58a3715f2160ab1", + "grml_type": "grml64-full", + "grml_version": "2020.06" + } } +