This file contains some advice for developing Super GRUB2 Disk daily. How to update Grub installation ================================ First of all we are assuming that you have performed the original built described at its: 'Super Grub2 Disk Jessie Chroot Build' section in INSTALL file. As you might know Super Grub2 Disk depends on a grub installation. These steps describe how to update Super Grub2 Disk's Grub built and its installation so that you do not have to recreate and download again all of it. First of all make sure that you modify grub-build-config file so that GRUB2_COMMIT reflects the commit or tag that you want to use in order to base your Super Grub2 Disk release. Never use a moving target like the master branch. Well, actually, you can use it, but please read the 'What to do when you release a new Super Grub2 Disk version' section. Then you just run: ./grub-build-002-clean-and-update ./grub-build-003-build-all ./grub-build-004-make-check (optional) ./grub-build-005-install-all What to do when you release a new Super Grub2 Disk version ========================================================== Make sure that you are building Super Grub2 Disk with its own build scripts. Make sure that the commit found at: grub-build-config file is the one you have used to build it (usually it will be the case). Update your Super Grub2 Disk's grub installation as described in 'How to update Grub installation' section if needed. Run: ./supergrub-meta-mkrescue When you make a public announcement make sure to reflect the exact commit or tag you are using to build grub so that grub experts can understand what features to expect from our grub build. How does Super Grub2 Disk versioning work? ========================================== Beta release example -------------------- 2.02s1-beta1 means: 2.02: Upstream Grub 2.02 version s1 : Super Grub2 Disk scripts version (inside this Upstream Grub version) beta1: Beta 1 Stable release example -------------------- 2.02s1 means: 2.02: Upstream Grub 2.02 version s1 : Super Grub2 Disk scripts version (inside this Upstream Grub version) DOCKER ====== DOCKER - Manual Development =========================== 0. You need to have docker installed and your user needs to be able to create docker instances. These instructions are for Ubuntu 22.04 but they should work similar in other GNU/Linux distributions. https://linuxconfig.org/how-to-install-docker-on-ubuntu-22-04 ``` sudo apt update sudo apt install docker.io sudo systemctl start docker.service sudo systemctl enable docker.service sudo docker version sudo docker info sudo usermod -aG docker yourlinuxusername ``` Reboot so that changes are taken into account. 1. We first create a Debian 11 minimal installation so that we can install required packages. docker build --tag supergrub-manual-builder . -f manual-builder.Dockerfile 2. Then we use it to run stuff inside of it. docker run -it --privileged -v /dev:/dev -v $(pwd):/supergrub2-repo:ro -v $(pwd)/releases:/supergrub2-build/releases:rw -v $(pwd)/news-releases:/supergrub2-build/news-releases:rw supergrub-manual-builder:latest 3. Save your current work. 3.1. Exit from your docker. 3.2. Identify your docker container id. rescatuxs@adrianpc2020:~$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 266d2332828a supergrub-manual-builder:latest "bash" 5 minutes ago Exited (0) 3 minutes ago sleepy_pascal 164e04ac8430 supergrub-manual-builder:latest "-v /home/rescatuxs/…" 6 minutes ago Created loving_snyder 7bc628fc3fb2 6704c2737d6d "-v /home/rescatuxs/…" 8 minutes ago Created angry_jang c027082f37df 6704c2737d6d "-v /home/rescatuxs/…" 13 minutes ago Created dreamy_goodall 7bd0f3fc4440 6704c2737d6d "bash" 16 minutes ago Exited (0) 14 minutes ago modest_khorana d28f50a47eff hello-world "/hello" 36 minutes ago Exited (0) 36 minutes ago gifted_sutherland 3.3. Commit your recent changes into it: rescatuxs@adrianpc2020:~$ docker commit 266d2332828a supergrub-manual-builder:latest sha256:bf28c6efaa1595dfde6571a7e257c80c03fa3276fcb698d827f67541e6cbc504 4. Now you can run more stuff inside of it again docker run -it --privileged -v /dev:/dev -v $(pwd):/supergrub2-repo:ro -v $(pwd)/releases:/supergrub2-build/releases:rw -v $(pwd)/news-releases:/supergrub2-build/news-releases:rw supergrub-manual-builder:latest Do not run `docker build` again because you will lose your changes. 5. Usual git stuff inside Docker image # Use a local-only branch for docker development minimal changes cd /supergrub2-build git pull origin 6. EXTRA TIP Attach to a running container: docker exec -it 644ca2ffdfe5 bash This is useful when you want the container to keep building and at the same time you want to keep a look at the logs. DOCKER - Release build ======================