From 5182d896dc8cda3ac82d81544e4d9bfd3d7b7c7c Mon Sep 17 00:00:00 2001 From: James Hunt Date: Tue, 5 Aug 2014 16:11:15 +0100 Subject: [PATCH] * 03-boot_with_systemd.chroot: Check if /etc/default/grub exists (temporary fix which to stop build failing - grub will be unconfigured though. * 05-create_minimal_fstab.chroot: Configure a minimal /etc/fstab to allow systemd to mount the rootfs read-write. --- live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot | 2 +- live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot diff --git a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot index 563af73e..9c5e4a8c 100755 --- a/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot +++ b/live-build/ubuntu-core/hooks/03-boot_with_systemd.chroot @@ -3,7 +3,7 @@ # Boot using systemd and disable quiet boot # to see what is happening. systemd=/lib/systemd/systemd -sed -i \ +[ -f /etc/default/grub ] && sed -i \ -e "s,^\\([ ]*GRUB_CMDLINE_LINUX\\)=\"\"$,\\1=\"init=$systemd\",g" \ -e 's,^\([ ]*GRUB_CMDLINE_LINUX_DEFAULT\)="quiet splash",\1="",g' \ /etc/default/grub diff --git a/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot b/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot new file mode 100755 index 00000000..461c752f --- /dev/null +++ b/live-build/ubuntu-core/hooks/05-create_minimal_fstab.chroot @@ -0,0 +1,6 @@ +#!/bin/sh -x + +cat >>/etc/fstab<