Compare commits

...

10 Commits

Author SHA1 Message Date
Christian
789ce22397 Update _config.yml 2021-10-27 09:53:57 -04:00
Christian
3cc13043c9 not as proud of that anymore 2021-07-27 13:29:54 -04:00
Christian
a380c5c618 post 'Nice Looking Boot Screen Without Plymouth' 2021-05-28 10:45:22 -04:00
Christian
28393a4505 forgot image 2021-05-28 10:38:53 -04:00
Christian
0106a1cee1 the 2021-05-28 10:35:42 -04:00
Christian
b01ce4ef53 get started on plymouth thing 2021-05-28 10:04:57 -04:00
Christian
1ea0b6abe9 yeah more formatting
dunno why lower headers are larger
2021-03-27 12:01:48 -04:00
Christian
820817c957 remove extra header that apparently is done for me 2021-03-27 11:57:46 -04:00
Christian
08791a346c Post 'SD Card Backer Upper' 2021-03-27 11:16:45 -04:00
Christian
76f642f2a3 ehgre about 2021-03-26 18:55:37 -04:00
6 changed files with 109 additions and 13 deletions

View File

@@ -19,7 +19,7 @@
# in the templates via {{ site.myvariable }}.
title: cesium blog
email: cesium2349@protonmail.com
email: cesium@cesium.one
description: >- # this means to ignore newlines until "baseurl:"
i like to think i do neat things so i share them but even if the things
i do are not neat i still want to share them so try and stop me

View File

@@ -0,0 +1,107 @@
---
layout: post
title: "Nice Looking Boot Screen Without Plymouth"
---
I was poking around with my Arch Linux installation and I learned that the
initcpio was done using shell scripts that I could write myself, and I ended
up trying to make my system boot process look decent without using Plymouth.
## Custom initcpio hooks
You can place custom shell scripts in `/etc/initcpio/hooks`, and have a script
to install it to the initramfs in `/etc/initcpio/install`. This is detailed further
in the [Arch Linux wiki page](https://wiki.archlinux.org/title/mkinitcpio).
You'll want to create a file named "welcome" or any other name you want in
`/etc/initcpio/hooks`. It will contain a single function `run_hook`, and within
it you can put `echo` or any other commands, as long as it's in the busybox
environment that the initramfs uses. Here's what your welcome hook could look
like:
```
#!/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`,
and it will have two functions: `build` and `help`. The help function just
outputs a message when you do `mkinitcpio -H welcome`, so it can contain any
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:
```
#!/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
part of `/etc/mkinitcpio.conf`, and run `mkinitcpio -P` as root to regenerate
the initramfs to contain your new script. Now when your computer boots, it
should run our script.
If your cool new message is quickly pushed up and off the screen by boot
messages, you can add `quiet` to your
[kernel parameters](https://wiki.archlinux.org/title/Kernel_parameters) to
silence the extra messages that the kernel usually spits out while booting up.
## Console font
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 `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
array.
## Custom colors
Your console supports custom colors, and can be easily set using
[linux-vt-setcolors](https://github.com/EvanPurkhiser/linux-vt-setcolors),
available from the AUR as `setcolors-git`. Also install the
[mkinitcpio-colors](https://github.com/EvanPurkhiser/mkinitcpio-colors) program
from the AUR as `mkinitcpio-colors-git`. You can add your color scheme to
`/etc/vconsole.conf` using the format specified on the project's
[README](https://github.com/EvanPurkhiser/mkinitcpio-colors#configuration):
```
COLOR_0=000000 # black
COLOR_1=550000 # darkred
...
COLOR_15=ffffff # white
```
You can use something like [terminal.sexy](https://terminal.sexy/) to get colors
that you like, and then add the colors to the vconsole config matching the
numbers 0-15 to the same colors. Once you're done with that, add the `colors`
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
after I unlock my drive. I created a second, very similar hook in
`/etc/initcpio/hooks` and created its `/etc/initcpio/install` counterpart, and
put a funny warning in it, and in the `/etc/mkinitcpio.conf` hooks array, I put
my new hook BEFORE the `encrypt` hook, and I put my `welcome` hook AFTER the
`encrypt` hook. Since the hooks run in order, the warning is displayed, and if I
type the correct password, I'm greeted by my laptop, and it loads everything up.
![image](/assets/mybootscreen.png)
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. If anything is unclear, email me via the address at
the bottom of the page, and I'll update this post.

View File

@@ -4,15 +4,4 @@ title: About
permalink: /about/
---
This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)
You can find the source code for Minima at GitHub:
[jekyll][jekyll-organization] /
[minima](https://github.com/jekyll/minima)
You can find the source code for Jekyll at GitHub:
[jekyll][jekyll-organization] /
[jekyll](https://github.com/jekyll/jekyll)
[jekyll-organization]: https://github.com/jekyll
there isnt SHIT here yet lmfao ill get around to it

BIN
assets/mybootscreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/sdcardfolder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
assets/sdcardpithing.mp4 Normal file

Binary file not shown.