slashbeast / better-initramfs

Small and reliable initramfs solution supporting (remote) rescue shell, lvm, dmcrypt luks, software raid, tuxonice, uswsusp and more.
BSD 3-Clause "New" or "Revised" License
318 stars 54 forks source link

Add better support for multiple initramfs #19

Closed nordaux closed 10 years ago

nordaux commented 10 years ago

Fix a problem that we can't insert kernel modules in the early hooks for network and any other things. We can not use the init hooks for inserting kernel modules because /proc/modules isn't available at this stage. Also wait for sshd only if rescueshell has never occur and don't wait remaining time for sshd_wait if we send resume-boot from remote shell.

This changes allow me to use standalone better-initramfs with separated kernel modules and with following boot-update config:

"Funtoo Linux better-initramfs standalone+modules" { kernel kernel[-v] initrd = initramfs.standalone.cpio.gz initrd += initramfs.modules.only.cpio.gz initrd += initramfs.remote.cpio.gz initrd += initramfs.prompt.cpio.gz initrd += initramfs.strace.cpio.gz initrd += initramfs.htop.cpio.gz

params += initramfsdebug

#params += rootdelay=10
params += binit_net_if=eth0
params += binit_net_addr=10.9.1.27/24
params += binit_net_gw=10.9.1.1
params += sshd_wait=20
params += sshd
params += rw

}

P.S.: boot-update also need this patch https://github.com/nordaux/boot-update/commit/2e8d4850de998a1d4b9ab1ec33112f0655c32453

slashbeast commented 10 years ago

Hello,

Seems resonable, I will merge it tonight into devel branch, thanks.