diff --git a/geninitrd b/geninitrd index 7b962b5..a4de196 100755 --- a/geninitrd +++ b/geninitrd @@ -1103,8 +1103,7 @@ sym_exists() { # find best compressor (or forced one) for initrd find_compressor() { local mode="$1" - # fastest initrd decompression speed is first - local compressors='lzo gzip xz lzma bzip2' + local compressors='xz lzma bzip2 gzip lzo' # a specified one, take it if ! is_yes "$mode"; then diff --git a/mod-md.sh b/mod-md.sh index a0cd7aa..d9093d4 100644 --- a/mod-md.sh +++ b/mod-md.sh @@ -139,13 +139,15 @@ initrd_gen_md() { inst_exec $mdassemble /bin/mdassemble + echo "DEVICE partitions containers" >> "$DESTDIR/etc/mdadm.conf" + # LVM on RAID case local dev_list_extra ex_dev dev_list_extra=$(awk '/^DEVICE / { for (i=2; i<=NF; i++) { printf "%s ", $i; }; } ' /etc/mdadm.conf | xargs) new_dev_list_extra="" for ex_dev in $dev_list_extra; do - if [ "$ex_dev" = "partitions" ]; then - echo "DEVICE partitions" >> "$DESTDIR/etc/mdadm.conf" + if [ "$ex_dev" = "partitions" -o "$ex_dev" = "containers" ]; then + echo "DEVICE $ex_dev" >> "$DESTDIR/etc/mdadm.conf" # FIXME: find and copy partition devices from /proc/partitions # - best if done at runtime, now initrd gen time continue commit 11202855dbaee5bc32209913df1ae8738c210c39 Author: Arkadiusz Miśkiewicz Date: Sat May 14 00:36:02 2016 +0200 Make rootdev fallback work. diff --git a/geninitrd b/geninitrd index 92a519d..771245e 100755 --- a/geninitrd +++ b/geninitrd @@ -1004,7 +1004,11 @@ initrd_gen_initramfs_switchroot() { # XXX hack, fallback to rootdev from geninitrd time if [ ! -e "$device" ]; then + EOF + add_linuxrc <<-EOF device="$rootdev" + EOF + add_linuxrc <<-'EOF' echo "DEVICE set to $device based on fstab entry from initrd gen time" fi commit 583a7f5f8783fb1f92b75ca9f651d675df016b73 Author: Arkadiusz Miśkiewicz Date: Tue Jun 7 08:30:46 2016 +0200 Mount /run with 0755. diff --git a/geninitrd b/geninitrd index 771245e..62e47ee 100755 --- a/geninitrd +++ b/geninitrd @@ -273,7 +273,7 @@ mount_run() { fi run_mounted=yes - echo "mount -t tmpfs run /run" | add_linuxrc + echo "mount -t tmpfs run /run -o mode=0755" | add_linuxrc } # unmount all mountpoints mounted by geninitrd commit b5a01dda8ca06f88b1210f806f3ac6da7c0019f0 Author: Arkadiusz Miśkiewicz Date: Fri May 4 15:50:18 2018 +0200 ext4 can use crc32 but has it in softdep only diff --git a/geninitrd b/geninitrd index 0a18298..c75c22b 100755 --- a/geninitrd +++ b/geninitrd @@ -435,6 +435,9 @@ find_depmod() { warn "mounting multidevice btrfs volume requires rootfsflags=device=/dev/...,device=/dev/... kernel option" find_depmod "-libcrc32c" ;; + ext4) + find_depmod "-libcrc32c" + ;; crc-t10dif) find_depmod "-crct10dif-pclmul" find_depmod "-crct10dif" commit 256e0bedb591a982ce87fb2ca1b38e1353d5b33a Author: Arkadiusz Miśkiewicz Date: Fri Aug 10 10:40:59 2018 +0200 ramdisk_size warning makes no sense for initramfs. diff --git a/geninitrd b/geninitrd index c75c22b..025674d 100755 --- a/geninitrd +++ b/geninitrd @@ -1759,14 +1759,16 @@ case "$INITRDFS" in die "Filesystem $INITRDFS not supported by $PROGRAM" esac -CONFIG_BLK_DEV_RAM_SIZE=$(ikconfig | awk -F= '/^CONFIG_BLK_DEV_RAM_SIZE/{print $2}') -if [ -z "$CONFIG_BLK_DEV_RAM_SIZE" ]; then - CONFIG_BLK_DEV_RAM_SIZE=4096 - warn "No CONFIG_BLK_DEV_RAM_SIZE detected, fallback to $CONFIG_BLK_DEV_RAM_SIZE" -fi +if [ "$INITRDFS" != "initramfs" ]; then + CONFIG_BLK_DEV_RAM_SIZE=$(ikconfig | awk -F= '/^CONFIG_BLK_DEV_RAM_SIZE/{print $2}') + if [ -z "$CONFIG_BLK_DEV_RAM_SIZE" ]; then + CONFIG_BLK_DEV_RAM_SIZE=4096 + warn "No CONFIG_BLK_DEV_RAM_SIZE detected, fallback to $CONFIG_BLK_DEV_RAM_SIZE" + fi -if [ "$IMAGESIZE" -gt $CONFIG_BLK_DEV_RAM_SIZE ]; then - warn "Your image size is larger than $CONFIG_BLK_DEV_RAM_SIZE, Be sure to boot kernel with ramdisk_size=$IMAGESIZE!" + if [ "$IMAGESIZE" -gt $CONFIG_BLK_DEV_RAM_SIZE ]; then + warn "Your image size is larger than $CONFIG_BLK_DEV_RAM_SIZE, Be sure to boot kernel with ramdisk_size=$IMAGESIZE!" + fi fi if ! is_no "$COMPRESS"; then