You are not logged in.
Pages: 1
[Synopsis] Create a hook as shown below to silence the kernel.
I'd like to have a truly silent boot as in the Wiki but it only seems to address the login prompt.
I would also like to get rid of the (USB) boot messages pollution of the the LUKS password prompt for my encrypted root. Is there some configuration of the initramfs required to accomplish this? If so, what exactly would that be?
I should add that I boot the STUB EFI kernel so there's no bootloader as such.
Last edited by KairiTech (2013-12-14 01:27:52)
Offline
Not an Installation issue, moving to Kernel and Hardware...
Offline
The encrypt hook is just a shel script. So you could either a) modify /usr/bin/initcpio/hooks/encrypt to address these changes you wish to make, or b) copy the encrypt "hook" and "install" files to a different name, and edit them instead (calling it something like myencrypt).
I would personally go with the second option just because you seriosuly risk losing any changes you make to the encrypt hook, as it is not a file that is in the backup array of the package. So if you create a "new" hook outside of the package manager's control, this would put those risks to a minimum.
Offline
I created the hook shown below to silence the kernel and now the LUKS prompt is clean.
/usr/lib/initcpio/hooks/hushkernel
#!/usr/bin/ash
# https://bbs.archlinux.org/viewtopic.php?pid=1312342#p1312342
run_hook() {
# http://unix.stackexchange.com/questions/44999/how-can-i-hide-messages-of-udev/45525#45525
# The four values in printk denote: console_loglevel, default_message_loglevel, minimum_console_loglevel and default_console_loglevel respectively.
# These values influence printk() behavior when printing or logging error messages. See 'man 2 syslog' for more info on the different loglevels.
# • console_loglevel: messages with a higher priority than this will be printed to the console
# • default_message_level: messages without an explicit priority will be printed with this priority
# • minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set
# • default_console_loglevel: default value for console_loglevel
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
echo "3 3 3 3" > /proc/sys/kernel/printk
}/usr/lib/initcpio/install/hushkernel
#!/bin/ash
build() {
add_runscript
}
help() {
cat <<HELPEOF
This hook will suppress kernel messages during the boot LUKS password prompt
HELPEOF
}Offline
Pages: 1