From e42f4abd6124c31bbde28eb30726b092058a3054 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Sat, 20 Jun 2020 02:55:39 +0200 Subject: [PATCH] Meta: tweak build-image-grub.sh to allow running `make grub-image`.. without sudo. --- Documentation/INSTALL.md | 2 +- Meta/build-image-grub.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/INSTALL.md b/Documentation/INSTALL.md index 6232b6a4eba..c33966928d3 100644 --- a/Documentation/INSTALL.md +++ b/Documentation/INSTALL.md @@ -17,7 +17,7 @@ At present there is no real GPU support so don't expect OpenGL, Vulkan nor accel ## Creating a Serenity GRUB disk image -Before creating a Serenity disk image, you need to build the OS as described in the [SerenityOS build instructions](https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md). Follow those instructions up to and including running **make install**. After the OS has built, run **sudo make grub-image** to create a new file called **grub_disk_image** that has GRUB2 installed that can be booted on a real PC. +Before creating a Serenity disk image, you need to build the OS as described in the [SerenityOS build instructions](https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md). Follow those instructions up to and including running **make install**. After the OS has built, run **make grub-image** to create a new file called **grub_disk_image** that has GRUB2 installed that can be booted on a real PC. The final step is copying **grub_disk_image** onto the disk you wish to boot Serenity off using a command such as: diff --git a/Meta/build-image-grub.sh b/Meta/build-image-grub.sh index 019761dd9dc..6c1a428d248 100755 --- a/Meta/build-image-grub.sh +++ b/Meta/build-image-grub.sh @@ -8,7 +8,7 @@ die() { } if [ "$(id -u)" != 0 ]; then - die "this script needs to run as root" + exec sudo -E -- "$0" "$@" || die "this script needs to run as root" fi grub=$(command -v grub-install 2>/dev/null) || true