summaryrefslogtreecommitdiff
path: root/Meta/build-image-grub.sh
AgeCommit message (Collapse)Author
2022-12-20Meta: Tweak shell_include.shNico Weber
* `chmod -x` as it's for sourcing, not for executing * Remove run line, for the same reason * Rename it from .shell_include.sh to shell_include.sh, since e.g. `rg` doesn't search in hidden files by default No behavior change.
2022-12-14Meta: Factorize path resolutionLucas CHOLLET
This patch adds the `find_executable()` function that will hopefully find executables in a distro-agnostic way and that is (hopefully as well) easily upgradable. The function uses some bash functionalities. So, we now require bash for each script that includes `.shell_include.sh`.
2022-12-14Meta: Don't depend on sudo for privileged operationsBaitinq
We previously depended on sudo's specific -E flag to keep all the environment variables when performing a privilege escalation. We now incorporate the -E flag into the $SUDO variable, allowing for other privilege escalation binaries (such as doas) to be used (as long as they preserve the current environment variables).
2022-10-16Meta: Start moving common shell definitions into a common fileTim Schumacher
2022-10-16Meta: Define `SUDO` for all the image building scriptsTim Schumacher
Back when adding support for `pls` as a `sudo` replacement, `build-image-qemu` dynamically set the `SUDO` variable depending on what system it was running on and used the contents of that variable to call the correct elevation utility. During recent changes to the elevation error message, that usage of the variable was replicated across all of our scripts, but without also replicating the logic to set that variable in the first place. Add back the variable setting logic to all the other scripts to keep them from running into unset variables.
2022-10-15Meta: Don't tell to run script as root when that's not the actual errordemostanis
Before, and that was the cause of many confusion in #build-problems on Discord, the Meta/build-image-*.sh scripts would error out with the message "this script needs to run as root" while the actual error was unrelated.
2021-05-16Meta: Run 'du' with '--apparent-size', except on macOSSiddharth Kapoor
Fixes #7172.
2021-05-15Meta: Bump BIOS/MBR boot partition size of grub disk image to 1MiBLinus Groh
As of ~April 2021 the Meta/build-image-grub.sh script no longer works for me (on Fedora 34) and fails with the following error: /usr/sbin/grub2-install: warning: ../grub-core/partmap/msdos.c:403: your core.img is unusually large. It won't fit in the embedding area. /usr/sbin/grub2-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /usr/sbin/grub2-install: error: will not proceed with blocklists. Changing the size of the boot partition from 32 kiB to 1 MiB (2048 sectors) fixes the issue. This is also described in the following Ubuntu grub2 bug (as well as 40 duplicates!) from 2012, which suggests the same fix: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1059827 The Arch Linux wiki also uses 1 MiB in their BIOS/MBR examples for parted: https://wiki.archlinux.org/title/Parted I'm not sure why this suddenly stopped working, however I was able to boot with an image created with this change applied.
2021-04-20Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIRPanagiotis Vasilopoulos
2021-03-01Meta: Allow specifying custom grub config file for build-image-grub.shTom
This allows passing a custom grub config file as second argument to build-image-grub.sh.
2020-12-27Build: Fix build of grub image when choosing EBR schemeLiav A
2020-12-27Build: Fix build of grub image when choosing GPT schemeLiav A
2020-07-28Meta: Fix style of image building scriptsPeter Elliott
Oops. I didn't know there was a style guide for the scripts.
2020-07-28Meta: Calculate image size based on size of Build/Root and BasePeter Elliott
This reduces the size of the default build, while allowing people to install as many ports as they want, without having to manually specify disk size.
2020-06-21Meta: default SUDO_UID and SUDO_GID to 0 in build-image-*.sh scriptsEmanuele Torre
In the GNU coreutils version of chown, ":" is a valid argument (the command will result in a no-op), but POSIX chown does not consider that valid. If the user who ran build-image-*.sh was root, SUDO_UID and SUDO_GID would not be set and, if the version of chown installed on the system did not allow passing just a ":" as argument, the script would fail. Let's default the value of SUDO_UID and SUDO_GID to 0 just in case.
2020-06-21Meta: tweak build-image-grub.sh to allow running `make grub-image`..Emanuele Torre
without sudo.
2020-05-28Build: Use a separate byproduct name for the GRUB disk image (#2424)etaIneLp
The grub-image target no longer conflicts with normal image target. This unbreaks using CMake with Ninja. Fixes #2423.
2020-05-28Meta: build-image-grub.sh looks for grub configs in the right placeetaIneLp
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080