No description
Find a file
Ratchanan Srirattanamet e6a91ad5db scripts/halium: deal with (broken) symlink in sync_dirs
This is our version of [1] from Snap's initramfs. The original commit read:

> The sync_dirs() has a test -e that fails to take broken symlinks
> into account. This means that symlinks that are broken when
> sync_dir runs (which is a very special environment) are not
> copied. This breaks e.g. the symlink snapd.snap-repair.timer
> in /etc/systemd/system/timer-target.wants.

In our case, we want this so that having `/etc/systemd` on
writable-paths' `synced` mode works properly.

[1] 843b8c7bb1
2023-01-05 13:37:44 +01:00
.github/workflows build.yml: (ab-)use the GitHub release to store built image 2021-12-01 09:04:16 -06:00
bootimg Removing the 'apparmor=0' boot cmdline as the android container profile is 2013-06-27 12:29:31 -03:00
conf Replace 'touch' and 'ubuntu' with 'halium', fix a couple of mistakes in the 'touch' script 2018-01-18 15:55:12 +01:00
debian Unify coding style 2018-01-19 18:08:34 +01:00
etc/initramfs/post-update.d Unify coding style 2018-01-19 18:08:34 +01:00
hooks Add resize2fs to initramfs 2018-02-25 09:47:24 +01:00
scripts scripts/halium: deal with (broken) symlink in sync_dirs 2023-01-05 13:37:44 +01:00
usr/sbin Unify coding style 2018-01-19 18:08:34 +01:00
.gitignore .gitignore: ignore build/ and out/ 2021-12-01 10:39:20 -06:00
build-initrd.sh build-initrd: correctly creating chroot's root 2021-12-01 10:39:29 -06:00
fstab * make the data partition detection more generic and use the actual device 2013-06-15 14:26:29 +02:00
Jenkinsfile Add Jenkinsfile 2018-01-12 09:59:03 +00:00
README.md Removed unused code, only deploy on master (#5) 2018-02-09 16:50:18 +01:00

initramfs-tools-halium

Hooks and configuration to build a Halium initramfs

Build an initramfs image

Building your own initramfs image wtih the tools in this repository is simple.

Requirements:

  • Any OS with debootstrap
  • sudo rights on the machine, to create the chroot
  1. Clone this repository into your home folder
  2. Install the prerequisites: sudo apt install debootstrap qemu-user-static binfmt-support dpkg-dev
  3. cd into the repository
  4. Run sudo ./build-initrd.sh -a [ARCH]

The initrd will be saved as ./out/initrd.img-touch-$ARCH by default.

Command-line / Environment options

-a|--arch / ARCH= The architecture to build an initrd for. Can be any architecture supported by Debian. Default armhf.

-m|--mirror / MIRROR= Mirror to pass to debootstrap. Default http://deb.debian.org/debian.

RELEASE= Debian release to use for building this initrd. Default stable.

ROOT= Location to place build chroot. Default ./build/$ARCH.

OUT= Location to copy finished initrd to. Default ./out.

INCHROOTPACKAGES= Packages to install in the chroot. These are installed in addition to the minbase packages specified by debootstrap. Default initramfs-tools dctrl-tools e2fsprogs libc6-dev zlib1g-dev libssl-dev busybox-static

FAQ

I'm getting a strange error when I try to build

Try deleting your chroots (normally in the build/ directory) and building again.

I can't delete my chroots! They say that something is busy!

Just run umount build/*/* to unmount anything that's mounted. If that doesn't work, reboot your computer. The mounts should be gone after that. Then you can delete the chroots.