From 99f758691a4530a04e8449053638efea96734a13 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sat, 12 Apr 2025 10:06:45 +0000 Subject: [PATCH] armbian_rootenc_setup.sh: various minor fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - increase boot partition size to 400MB - add ‘lan’ to ethdev search list Tested on: Nano Pi M6 - Ubuntu Noble Gnome desktop, vendor kernel Nano Pi M6 - Ubuntu Noble IOT/minimal, mainline kernel Use the -m option to include all loaded modules in initrd --- README.md | 2 +- scripts/armbian_rootenc_setup.sh | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 35bf160..e2cef6c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Code repository: Code repository mirrors: [Github](https://github.com/mmgen/mmgen-geek-tools) | [Gitlab](https://gitlab.com/mmgen/mmgen-geek-tools) | -[Gitflic](https://gitflic.ru/project/mmgen/mmgen-geek-tools) +[Codeberg](https://codeberg.org/mmgen/mmgen-geek-tools) [Keybase](https://keybase.io/mmgen) | [Twitter](https://twitter.com/TheMMGenProject) | [Reddit](https://www.reddit.com/user/mmgen-py) | diff --git a/scripts/armbian_rootenc_setup.sh b/scripts/armbian_rootenc_setup.sh index 37ac92e..22930ea 100755 --- a/scripts/armbian_rootenc_setup.sh +++ b/scripts/armbian_rootenc_setup.sh @@ -609,7 +609,7 @@ get_partition_info() { *) die "$partition_table_type: unrecognized partition table type!" ;; esac [ $((start_sector % 8)) -eq 0 ] || die "start sector: $start_sector: first partition misaligned!" - boot_partition_sectors=409600 # 200MB + boot_partition_sectors=819200 # 400MB pu_msg "Image partition table type: ${partition_table_type^^}" } @@ -989,7 +989,7 @@ copy_etc_files() { _print_net_dev() { local text net_pfx text="$(ip --brief link)" - for net_pfx in eth enp end eno enP enD enO en; do + for net_pfx in eth enp end eno enP enD enO en lan; do grepout="$(echo "$text" | grep ^$net_pfx)" || true if [ "$grepout" ]; then echo "$grepout" | head --lines=1 | cut --delimiter=' ' --field=1 @@ -1156,9 +1156,7 @@ edit_initramfs_conf() { edit_initramfs_modules() { local modlist file hdr [ "$ADD_ALL_MODS" -o "$ADD_MODS" -o "$USB_GADGET" ] && { - if ! _kernels_match; then - warn 'Host and target kernels do not match. Not adding modules to initramfs' - elif ! _distros_match; then + if ! _distros_match; then warn 'Host and target distros do not match. Not adding modules to initramfs' else local g_mods='libcomposite u_ether usb_f_rndis g_ether usb_f_eem'