the
This commit is contained in:
@@ -20,7 +20,12 @@ environment that the initramfs uses. Here's what your welcome hook could look
|
||||
like:
|
||||
|
||||
```
|
||||
REPLACE THIS TEXT WITH THE WELCOME HOOK WHEN YOU GET ON YOUR LAPTOP
|
||||
#!/bin/sh
|
||||
|
||||
run_hook() {
|
||||
echo -e "Welcome to YOUR_COMPUTER, YOUR_NAME."
|
||||
echo -e "Getting everything set up for you..."
|
||||
}
|
||||
```
|
||||
|
||||
You'll also want to create a file with the same name in `/etc/initcpio/install`,
|
||||
@@ -30,7 +35,14 @@ text you want. The build function will just contain `add_runscript`, to add the
|
||||
file we put in the hooks folder. Here's what yours could look like:
|
||||
|
||||
```
|
||||
REPLACE THIS TEXT TOO
|
||||
#!/bin/sh
|
||||
build() {
|
||||
add_runscript
|
||||
}
|
||||
|
||||
help() {
|
||||
echo "welcoem mesage"
|
||||
}
|
||||
```
|
||||
|
||||
When that's done, you can add the `welcome` hook somewhere early on in the hooks
|
||||
@@ -48,7 +60,7 @@ silence the extra messages that the kernel usually spits out while booting up.
|
||||
The default font for the console may not be your favorite. Thankfully, there are
|
||||
plenty of fonts you can try out, kept in `/usr/share/kbd/consolefonts/`, and can
|
||||
be [previewed using `setfont`](https://wiki.archlinux.org/title/Linux_console#Preview_and_temporary_changes).
|
||||
I use the **WHAT FONT DO I USE?** font, and I have it
|
||||
I use the `ter-c18n` font, and I have it
|
||||
[set persistently](https://wiki.archlinux.org/title/Linux_console#Persistent_configuration)
|
||||
in `/etc/vconsole.conf`. To have the console load your font early on in the boot
|
||||
process, you can just add `consolefont` somewhere in your mkinitcpio hooks
|
||||
@@ -78,8 +90,6 @@ hook to that same hooks array we've been adding stuff to, run `mkinitcpio -P`,
|
||||
and reboot. You should be greeted with your welcome message, in your own font,
|
||||
with your own colors.
|
||||
|
||||

|
||||
|
||||
## Extra
|
||||
|
||||
I have an encrypted hard drive, so I'm able to put a message that appears only
|
||||
@@ -94,4 +104,4 @@ type the correct password, I'm greeted by my laptop, and it loads everything up.
|
||||
|
||||
I hope this has been helpful not only for making a cool boot screen without
|
||||
Plymouth, but I hope I also helped you learn more about how Arch Linux boots its
|
||||
system using an initramfs.
|
||||
system using an initramfs.
|
||||
|
||||
Reference in New Issue
Block a user