+grml-debootstrap (0.81) unstable; urgency=medium
+
+ * [0617fa8] Add e2fsprogs to Depends. Thanks to Helmut Grohne
+ <helmut@subdivi.de> for the bugreport (Closes: #887224)
+ * [9bdd7a1] Bump Standards-Version to 4.1.3
+
+ -- Michael Prokop <mika@grml.org> Mon, 15 Jan 2018 10:58:37 +0100
+
+grml-debootstrap (0.80) unstable; urgency=medium
+
+ * [351237a] Fix a bunch of typos
+ * [7803bf3] packer: add support for building Debian/buster
+ * [ecff5b9] packer: use current Grml release 2017.05 for building
+ * [3314417] packer: use latest VirtualBox Guest Additions ISO
+ * [05ed1a4] Identify UUID of target system even if it's SWRAID or a
+ mountpoint. Thanks to hex2a for reporting and testing
+ * [d8de50b] Bump Standards-Version to 4.1.2
+
+ -- Michael Prokop <mika@grml.org> Fri, 08 Dec 2017 12:54:17 +0100
+
+grml-debootstrap (0.79) unstable; urgency=medium
+
+ [ Bigo ]
+ * [d0cd2dd] Update /dev and /dev/pts mount from --bind to proper fs type
+
+ [ Darshaka Pathirana ]
+ * [263c465] Add documentation for --defaultinterfaces command line
+ option
+
+ [ Michael Prokop ]
+ * [1fba2a2] Depend on fdisk | util-linux (<< 2.29.2-3~) Thanks to
+ Andreas Henriksson <andreas@fatal.se> (Closes: #872219)
+ * [f56ca7d] Bump Standards-Version to 4.0.1
+
+ -- Michael Prokop <mika@grml.org> Thu, 17 Aug 2017 14:42:01 +0200
+
grml-debootstrap (0.78) unstable; urgency=medium
The "hello vienna, hello stretch" release
docbook-xsl,
shunit2,
xsltproc
-Standards-Version: 3.9.8
+Standards-Version: 4.1.3
Homepage: https://grml.org/grml-debootstrap/
Vcs-git: git://git.grml.org/grml-debootstrap.git
Vcs-Browser: https://git.grml.org/?p=grml-debootstrap.git
Architecture: all
Depends: debian-archive-keyring,
debootstrap (>= 0.3.3.3) | cdebootstrap (>= 0.3.16),
+ e2fsprogs,
+ fdisk | util-linux (<< 2.29.2-3~),
gawk,
kmod,
${misc:Depends},
# grml-debootstrap --target /srv/debian --password grml --hostname docker [--force]
````
-*TIP:* to speed up the build prepend `eatmydata` in the the grml-debootstrap command line
+*TIP:* to speed up the build prepend `eatmydata` in the grml-debootstrap command line
*TIP:* if you want to have access to the generated Debian systems after exiting the container make sure to share your working directory as `/srv` via adding `-v $PWD:/srv/` to your `docker run` command line
fi
# }}}
-# backwards compability checks {{{
+# backwards compatibility checks {{{
if [ -n "$GROOT" ] ; then
eerror "Error: you seem to have \$GROOT configured."
eerror "This variable is no longer supported, please visit the"
if fsck.vfat -bn "$EFI" >/dev/null; then
einfo "EFI partition $EFI seems to have a FAT filesystem, not modifying." ; eend 0
else
- einfo "EFI partition $EFI doesn't seem to be formated, creating filesystem."
+ einfo "EFI partition $EFI doesn't seem to be formatted, creating filesystem."
mkfs.fat -F32 -n "EFI System Partition" "$EFI"
RC=$?
if [ $RC -eq 0 ] ; then
# race conditions :-/
sleep 2
- eval "$(blkid -o udev "$TARGET" 2>/dev/null)"
- [ -n "$ID_FS_UUID" ] && TARGET_UUID="$ID_FS_UUID" || TARGET_UUID=""
-
eend $RC
fi
}
# }}}
+identify_target_uuid() {
+ local device="$1"
+
+ if ! [ -b "$device" ] ; then
+ return 1
+ fi
+
+ eval "$(blkid -o udev "$1" 2>/dev/null)"
+
+ if [ -n "$ID_FS_UUID" ] ; then
+ echo "$ID_FS_UUID"
+ else
+ return 1
+ fi
+}
+
+mountpoint_to_blockdevice() {
+ TARGET_UUID=''
+
+ TARGET_UUID=$(identify_target_uuid "$TARGET" 2>/dev/null || true)
+ if [ -n "$TARGET_UUID" ] ; then
+ einfo "Identified UUID $TARGET_UUID for $TARGET"
+ return 0
+ fi
+
+ # $TARGET might be a mountpoint and not a blockdevice, search for according entry
+ for file in /sys/block/*/*/dev ; do
+ if grep -q "^$(mountpoint -d "${TARGET}")$" "$file" ; then
+ local dev
+ dev="${file%/dev}"
+ dev="/dev/${dev##*/}"
+ TARGET_UUID=$(identify_target_uuid "$dev" 2>/dev/null || true)
+
+ if [ -n "$TARGET_UUID" ] ; then
+ einfo "Identified UUID $TARGET_UUID for $TARGET (via $file)"
+ return 0
+ fi
+ fi
+ done
+}
+
# modify filesystem settings {{{
tunefs() {
if [ -n "$TUNE2FS" ] && echo "$MKFS" | grep -q "mkfs.ext" ; then
mount -t proc none "${MNTPOINT}"/proc
mount -t sysfs none "${MNTPOINT}"/sys
- mount --bind /dev "${MNTPOINT}"/dev
- mount --bind /dev/pts "${MNTPOINT}"/dev/pts
+ mount -t devtmpfs udev "${MNTPOINT}"/dev
+ mount -t devpts devpts "${MNTPOINT}"/dev/pts
# Has chroot-script installed GRUB to MBR using grub-install (successfully), already?
# chroot-script skips installation for unset ${GRUB}
eend 1
else
einfo "Executing chroot-script now"
- mount --bind /dev "$MNTPOINT"/dev
- mount --bind /dev/pts "$MNTPOINT"/dev/pts
+ mount -t devtmpfs udev "${MNTPOINT}"/dev
+ mount -t devpts devpts "${MNTPOINT}"/dev/pts
if [ "$DEBUG" = "true" ] ; then
chroot "$MNTPOINT" /bin/bash -x /bin/chroot-script ; RC=$?
else
# }}}
# now execute all the functions {{{
-for i in format_efi_partition prepare_vm mkfs tunefs mount_target debootstrap_system \
+for i in format_efi_partition prepare_vm mkfs tunefs \
+ mount_target mountpoint_to_blockdevice debootstrap_system \
preparechroot execute_pre_scripts chrootscript execute_post_scripts \
remove_configs umount_chroot finalize_vm fscktool ; do
if stage "${i}" ; then
Execute in very verbose way. Useful for debugging possible problems
with grml-debootstrap or identify what's actually executed.
+*--defaultinterfaces*::
+
+ Install a default /etc/network/interfaces file (enabling DHCP for eth0)
+ instead of taking over config from host system.
+
*--efi* _device_::
Partition where EFI boot manager should be installed to. If the
fake-uname.so:
gcc -shared -fPIC -ldl fake-uname.c -o fake-uname.so
+# Debian 10
+buster: fake-uname.so clean install
+ packer build -var debian_version=$@ -var grml_debootstrap_version=$(GRML_DEBOOTSTRAP_VERSION) -var grml_debootstrap_local_path=$(GRML_DEBOOTSTRAP_LOCAL_PATH) debian64.json
+
# Debian 9
stretch: fake-uname.so clean install
packer build -var debian_version=$@ -var grml_debootstrap_version=$(GRML_DEBOOTSTRAP_VERSION) -var grml_debootstrap_local_path=$(GRML_DEBOOTSTRAP_LOCAL_PATH) debian64.json
lenny: fake-uname.so clean install
packer build -var debian_version=$@ -var grml_debootstrap_version=$(GRML_DEBOOTSTRAP_VERSION) -var grml_debootstrap_local_path=$(GRML_DEBOOTSTRAP_LOCAL_PATH) debian64.json
-.PHONY: compile stretch jessie wheezy squeeze lenny
+.PHONY: compile buster stretch jessie wheezy squeeze lenny
@test "debian_version exists and is valid version" {
run cat "${mountpath}/etc/debian_version"
[ "$status" -eq 0 ]
- [[ "$output" == [0-9].[0-9]* ]] || [[ "$output" == 'stretch/sid' ]]
+ [[ "$output" == [0-9].[0-9]* ]] || [[ "$output" == 'buster/sid' ]]
}
@test "kernel exists" {
{
"variables": {
"grml_type": "grml64-full",
- "grml_version": "2014.11",
- "grml_iso_checksum": "120bfa48b096691797a73fa2f464c7c71fac1587",
- "debian_version": "jessie",
+ "grml_version": "2017.05",
+ "grml_iso_checksum": "9a6d788879699e2e1dce8edd4556e07f63d19c14",
+ "debian_version": "stretch",
"grml_debootstrap_version": "latest",
"grml_debootstrap_local_path": "doesnotexist"
},
"boot_command": [
"<tab> ssh=grml <enter>"
],
- "shutdown_command": "shutdown -h now"
+ "shutdown_command": "shutdown -h now",
+ "guest_additions_url": "https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_5.2.1-118918.iso",
+ "guest_additions_sha256": "5023b5b6314593c092d2680fbbfe37870977b1d7fa790af9bdd4a75944ca0603",
+ "vboxmanage": [
+ ["modifyvm", "{{.Name}}", "--memory", "1024"]
+ ]
}
],
"provisioners": [
mountpoint "${TARGET}/media/cdrom" >/dev/null && umount "${TARGET}/media/cdrom"
mount -t iso9660 $isofile "${TARGET}/media/cdrom/"
UTS_RELEASE=$KERNELVERSION LD_PRELOAD=/tmp/fake-uname.so grml-chroot "$TARGET" /media/cdrom/VBoxLinuxAdditions.run --nox11 || true
- tail -10 "${TARGET}/var/log/VBoxGuestAdditions.log"
+ if grep -q "make: .*vboxguest.*Error 2" "${TARGET}/var/log/vboxadd-install.log" ; then
+ echo "Error: looks like a fatal error happened during installation of VirtualBox Guest Additions." >&2
+ exit 1
+ fi
+ [ -r "${TARGET}/var/log/VBoxGuestAdditions.log" ] && tail -10 "${TARGET}/var/log/VBoxGuestAdditions.log"
+ [ -r "${TARGET}/var/log/vboxadd-install.log" ] && tail -10 "${TARGET}/var/log/vboxadd-install.log"
+ [ -r "${TARGET}/var/log/vboxadd-setup.log" ] && tail -10 "${TARGET}/var/log/vboxadd-setup.log"
umount "${TARGET}/media/cdrom/"
# work around bug in VirtualBox 4.3.18 which leaves process behind,
if [[ $CMD == *:: ]] ; then
DELIM="="
fi
- # CMD expects addional parameter
+ # CMD expects additional parameter
if [[ $CMD == *: ]] ; then
PARAM=$RANDOM
fi