diff options
author | Steven <steven.vasilogianis@gmail.com> | 2023-06-13 16:51:51 -0400 |
---|---|---|
committer | u <u@billy> | 2023-11-17 08:44:10 -0500 |
commit | f34258ce281f5484473969c1959147a715dbc787 (patch) | |
tree | 6a1c303fe571470d97bd8fd70a092c0c6909ccc2 | |
parent | 7052167f53dab5733a838b9d5398121f39016def (diff) |
experimental grub simplification
-rw-r--r-- | partitions/part3.conf | 2 | ||||
-rwxr-xr-x | src/partvi | 30 | ||||
-rw-r--r-- | src/samizdat-paths.in | 2 |
3 files changed, 10 insertions, 24 deletions
diff --git a/partitions/part3.conf b/partitions/part3.conf index 63d44ea..0692e76 100644 --- a/partitions/part3.conf +++ b/partitions/part3.conf | |||
@@ -1,4 +1,4 @@ | |||
1 | name=samizdat-boot | 1 | name=samizdat-boot |
2 | type=boot | 2 | type=boot |
3 | allocation=200M | 3 | allocation=2G |
4 | rebuild=always | 4 | rebuild=always |
@@ -1,26 +1,5 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | add_initrd() | ||
4 | { | ||
5 | initrd_suffix=.samizdat | ||
6 | $sudo mkdir -p "$mnt"/linux | ||
7 | $sudo rsync -aL --info=STATS "${1}vmlinuz${2}" "$mnt"/linux/vmlinuz | ||
8 | $sudo rsync -aL --info=STATS "${1}initrd.img${2}${2:+$initrd_suffix}" "$mnt"/linux/initrd.img | ||
9 | } | ||
10 | |||
11 | add_grub_cfg() | ||
12 | { | ||
13 | $sudo mkdir -p "$mnt"/grub | ||
14 | $sudo cp -aL "$GRUB_CONFIG" "$mnt"/grub | ||
15 | } | ||
16 | |||
17 | install_boot_dir() | ||
18 | { | ||
19 | local mnt="$1" | ||
20 | add_grub_cfg | ||
21 | add_initrd "$samizdat_linux_dir"/ "${version_suffix}" | ||
22 | } | ||
23 | |||
24 | msg() { printf '%s: %s: %s\n' "$0" "$1" "$2" >&2; } | 3 | msg() { printf '%s: %s: %s\n' "$0" "$1" "$2" >&2; } |
25 | die() { msg Error "${*:-Exiting on fatal error.}"; exit 1; } | 4 | die() { msg Error "${*:-Exiting on fatal error.}"; exit 1; } |
26 | warn() { msg Warning "${*:-Something is wrong.}"; } | 5 | warn() { msg Warning "${*:-Something is wrong.}"; } |
@@ -315,7 +294,14 @@ copy_data_to_mounted_target_filesystems() | |||
315 | case "$type" in | 294 | case "$type" in |
316 | boot) | 295 | boot) |
317 | BOOT_DIR=$mnt | 296 | BOOT_DIR=$mnt |
318 | install_boot_dir "$mnt" | 297 | $sudo rsync -a --info=STATS /boot/ "$mnt"/ |
298 | while mountpoint -q /boot | ||
299 | do | ||
300 | $sudo umount /boot | ||
301 | done | ||
302 | $sudo mount --bind "$mnt" /boot | ||
303 | $sudo update-grub | ||
304 | $sudo umount /boot | ||
319 | ;; | 305 | ;; |
320 | samizdat-keys) | 306 | samizdat-keys) |
321 | $sudo rsync -a --info=STATS "$GPG_INPUT_DIR"/ "$mnt"/gnupghome/ | 307 | $sudo rsync -a --info=STATS "$GPG_INPUT_DIR"/ "$mnt"/gnupghome/ |
diff --git a/src/samizdat-paths.in b/src/samizdat-paths.in index c1773fe..c3037d3 100644 --- a/src/samizdat-paths.in +++ b/src/samizdat-paths.in | |||
@@ -8,6 +8,6 @@ samizdat_bindir=PREFIX/bin | |||
8 | samizdat_isolinux_dir=${samizdat_libdir}/isolinux | 8 | samizdat_isolinux_dir=${samizdat_libdir}/isolinux |
9 | samizdat_linux_dir=${samizdat_libdir}/isolinux/linux | 9 | samizdat_linux_dir=${samizdat_libdir}/isolinux/linux |
10 | samizdat_grub_efi_dir=${samizdat_libdir}/grub-efi | 10 | samizdat_grub_efi_dir=${samizdat_libdir}/grub-efi |
11 | samizdat_initramfs_conf_dir=${samizdat_libdir}/initramfs-tools | 11 | samizdat_initramfs_conf_dir=/etc/initramfs-tools |
12 | 12 | ||
13 | samizdat_iso_dir=. | 13 | samizdat_iso_dir=. |