Skip to content

u/TheHardew

In this archive from Jul 2018 to Aug 2023

1
posts
41
comments
0
media
131
score

Top posts

Top comments

I just saw you are also asking for tips to reduce your boot time. Arch wiki has a great article about it: https://wiki.archlinux.org/index.php/Improving_performance/Boot_process

Here are my options, which you could use as a guideline, but don't copy them without knowing what they do, so you don't make your system unbootable.

Here's my mkinitcpio:

~ $ cat /etc/mkinitcpio.conf
MODULES=(ahci sd_mod i915 btrfs)
BINARIES=(fsck fsck.btrfs)
HOOKS=(systemd)
COMPRESSION="lz4"
COMPRESSION_OPTIONS="-12 --favor-decSpeed"

I even removed the commnets, as I saw they are added to the final image. Shouldnt really make a difference, but I'm a perfectionist. I have the comments in a backup file, as they are usefull to look into sometimes.

Since I use systemd in initramfs, I removed root partition from fstab, systemd mounts it using the kernel options, and also I have a completely silent boot.

I dont have the keyboard modules, which means if something fails, I have to boot using a usb key.

I use efistub as my bootloader, since I dont dualboot on this laptop.

~ $ cat /boot/createBoot.sh 
#!/bin/sh
sudo efibootmgr -b 0000 -B
sudo efibootmgr -v -p 1 -c -L 'Arch Linux' -l \\$1 -u 'root=/dev/sda2 rootflags=rw,relatime,compress=zstd,discard=async,autodefrag initrd=\intel-ucode.img initrd=\'$(echo $1 | sed s/vmlinuz/initramfs/)'.img quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3 btusb.enable_autosuspend=0 i915.enable_fbc=1 i915.fastboot=1 resume=UUID=38d43fb3-c121-4568-994a-fc2ac19df441 resume_offset=3315554'

Be careful when copying those options, for example I believe if you set a wrong resume_offset, when hibernating, your data could be overwritten (though it's just a speculation)

I use the script like this:

/boot $ ./createBoot.sh vmlinuz-linux-zen 

linux-zen is my kernel. Idk if it improves the boot time. In the future I'll probably compile a custom kernel on my pc and push it to my laptop.

I use btrfs as my root filesystem with zstd compression. It should in theory allow for faster read speeds, so faster boot, although with my slow cpu I couldn't see any difference in boot time.

I dont use any display managers (or whatever they were called), just launch sway from my config.fish (it's like .bashrc in bash).

As far as I remember, that's most of the things I did to reduce my boot time.

​

Edit:With the 5.9 kernel I now use zstd initramfs compression with level -15, it seems higher levels hardly reduce the size, however they also quite hurt decompression speed (on my cpu level -15 is about 999 MiB/s, level -19 is about 777 MiB/s)

systemd-analyze is now under 4 s

8 points

They are on Arch, they can just read the docs. And fish 3.10 has some amazing docs. Scripts use the shebang anyway, so the only thing they need to know for now is how to set up environmental variables and that shell substitution in fish dosen't use a dollar sign in front of the first parenthesis.

5 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.