diff --git a/Makefile b/Makefile index e56bef0..eb297e0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +.PHONY: all clean LOCAL_DIR ?= $(shell readlink -m $(dir $(abspath $(lastword $(MAKEFILE_LIST))))) WORK_DIR ?= $(LOCAL_DIR)/work diff --git a/create-live-image.sh b/create-live-image.sh index 5609692..d270b4f 100755 --- a/create-live-image.sh +++ b/create-live-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eux -o pipefail @@ -33,7 +33,7 @@ trap "cleanup ${MNTDIR}" 0 1 2 3 6 15 truncate -s 16G "${IMG}" # have static UUIDs to make partition table reproducible -/usr/sbin/sfdisk "$IMG" < "${MNTDIR}/.disk/info" +# Generate BIOS bootable GRUB image +grub-install \ + --target=i386-pc \ + --root-directory="${MNTDIR}" \ + --modules="part_gpt part_msdos fat iso9660" \ + "${IMG_LOOP}" + # Umount root filesystem umount "${MNTDIR}/boot/efi" umount "${MNTDIR}" @@ -106,8 +113,3 @@ cat > "${MNTDIR}/golemwz-example.toml" << EOF #glm_per_hour = "0.25" EOF -# Generate BIOS bootable GRUB image -grub-install \ - --target=i386-pc \ - --modules="part_gpt part_msdos fat iso9660" \ - "${IMG_LOOP}" diff --git a/get-merged-rootfs.sh b/get-merged-rootfs.sh index f7b0173..35981a2 100755 --- a/get-merged-rootfs.sh +++ b/get-merged-rootfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Command-line tool that simplifies the process of extracting Docker images # and their root filesystem layers. It saves provided image to a tarball and then