fix
This commit is contained in:
parent
6f02b55828
commit
e812146cfa
8
build.sh
8
build.sh
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
zola build --output-dir /var/www/virt/harryh/html/
|
nix-shell -p zola --run 'zola build --force --output-dir /var/www/harald.hoyer.xyz/html'
|
||||||
chmod go-w -R /var/www/virt/harryh/html/
|
chmod go-w -R /var/www/harald.hoyer.xyz/
|
||||||
chgrp -R apache /var/www/virt/harryh/html/
|
#chgrp -R apache /var/www/virt/harryh/html/
|
||||||
#chcon -R -t httpd_sys_content_t /var/www/virt/harryh/html/
|
#chcon -R -t httpd_sys_content_t /var/www/virt/harryh/html/
|
||||||
|
|
25
config.toml
25
config.toml
|
@ -2,15 +2,10 @@ title = "Harald Hoyer"
|
||||||
description = "Triple Faults for Debug"
|
description = "Triple Faults for Debug"
|
||||||
|
|
||||||
# The URL the site will be built for
|
# The URL the site will be built for
|
||||||
base_url = "https://harald.hoyer.xyz"
|
base_url = "https://testharald.hoyer.xyz"
|
||||||
|
|
||||||
# Whether to automatically compile all Sass files in the sass directory
|
# Whether to automatically compile all Sass files in the sass directory
|
||||||
compile_sass = true
|
compile_sass = true
|
||||||
|
|
||||||
# Whether to do syntax highlighting
|
|
||||||
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
|
|
||||||
highlight_code = true
|
|
||||||
|
|
||||||
# Whether to build a search index to be used later on by a JavaScript library
|
# Whether to build a search index to be used later on by a JavaScript library
|
||||||
build_search_index = true
|
build_search_index = true
|
||||||
|
|
||||||
|
@ -21,14 +16,24 @@ taxonomies = [
|
||||||
{name = "tags", rss = true, paginate_by=5},
|
{name = "tags", rss = true, paginate_by=5},
|
||||||
]
|
]
|
||||||
|
|
||||||
generate_rss = true
|
generate_feed = true
|
||||||
|
|
||||||
|
[markdown]
|
||||||
|
|
||||||
|
# Whether to do syntax highlighting
|
||||||
|
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
|
||||||
|
highlight_code = true
|
||||||
|
|
||||||
|
render_emoji = true
|
||||||
|
|
||||||
|
|
||||||
#highlight_theme = "dracula"
|
#highlight_theme = "dracula"
|
||||||
#highlight_theme = "inspired-github"
|
#highlight_theme = "inspired-github"
|
||||||
highlight_theme = "ir-white"
|
#highlight_theme = "ir-white"
|
||||||
#highlight_theme = "material-light"
|
#highlight_theme = "material-light"
|
||||||
|
highlight_theme = "base16-ocean-dark"
|
||||||
|
|
||||||
extra_syntaxes = [
|
extra_syntaxes_and_themes = [
|
||||||
"syntaxes",
|
"syntaxes",
|
||||||
"syntaxes/Sublime-varlink",
|
"syntaxes/Sublime-varlink",
|
||||||
"syntaxes/Sublime-console",
|
"syntaxes/Sublime-console",
|
||||||
|
@ -49,7 +54,7 @@ clean_blog_social = [
|
||||||
{url = "https://hoyer.xyz/profile/harald", icon="fab fa-mastodon"},
|
{url = "https://hoyer.xyz/profile/harald", icon="fab fa-mastodon"},
|
||||||
{url = "https://github.com/haraldh", icon="fab fa-github"},
|
{url = "https://github.com/haraldh", icon="fab fa-github"},
|
||||||
{url = "https://keybase.io/haraldhoyer/", icon="fab fa-keybase"},
|
{url = "https://keybase.io/haraldhoyer/", icon="fab fa-keybase"},
|
||||||
{url = "https://twitter.com/haraldhoyer", icon="fab fa-twitter"},
|
{url = "https://floss.social/@backslash", icon="fab fa-mastodon"},
|
||||||
{url = "$BASE_URL/rss.xml", icon="fas fa-rss"}
|
{url = "$BASE_URL/rss.xml", icon="fas fa-rss"}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
title = "Fedora Boot Optimization"
|
title = "Fedora Boot Optimization"
|
||||||
date = 2013-11-13T10:12:04+00:00
|
date = 2013-11-13T10:12:04+00:00
|
||||||
+++
|
+++
|
||||||
|
|
||||||
This article shows how to reduce boot time for Fedora 17, but the recipe can also be applied to 18, 19 and 20.
|
This article shows how to reduce boot time for Fedora 17, but the recipe can also be applied to 18, 19 and 20.
|
||||||
|
|
||||||
The target is to get a fast booting system with NetworkManager running and gdm displaying the login
|
The target is to get a fast booting system with NetworkManager running and gdm displaying the login
|
||||||
|
@ -14,7 +15,9 @@ with an INTEL SSDSA2BW160G3L harddrive.
|
||||||
|
|
||||||
First we choose a manual disk layout and use primary partitions and format them with ext4.
|
First we choose a manual disk layout and use primary partitions and format them with ext4.
|
||||||
In my case this results in:
|
In my case this results in:
|
||||||
```sda1 ext4 /boot
|
|
||||||
|
```
|
||||||
|
sda1 ext4 /boot
|
||||||
sda2 swap
|
sda2 swap
|
||||||
sda3 ext4
|
sda3 ext4
|
||||||
```
|
```
|
||||||
|
@ -22,10 +25,13 @@ sda3 ext4
|
||||||
After the first boot, setup of the user, etc. and 2 reboots (always reboot 2 times,
|
After the first boot, setup of the user, etc. and 2 reboots (always reboot 2 times,
|
||||||
before taking the measurement, because readahead needs to adapt to the changed boot process).
|
before taking the measurement, because readahead needs to adapt to the changed boot process).
|
||||||
First we update everything.
|
First we update everything.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ sudo yum update
|
$ sudo yum update
|
||||||
```
|
```
|
||||||
|
|
||||||
After the reboots, I get:
|
After the reboots, I get:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1413ms (kernel) + 2911ms (initramfs) + 10593ms (userspace) = 14918ms
|
Startup finished in 1413ms (kernel) + 2911ms (initramfs) + 10593ms (userspace) = 14918ms
|
||||||
|
@ -34,13 +40,16 @@ Startup finished in 1413ms (kernel) + 2911ms (initramfs) + 10593ms (userspace) =
|
||||||
Because I don't use any LVM, RAID or encrypted devices, I can safely turn off all nearly all
|
Because I don't use any LVM, RAID or encrypted devices, I can safely turn off all nearly all
|
||||||
`fedora-\*storage\*` services. To turn off these services, we use the `systemctl mask` command.
|
`fedora-\*storage\*` services. To turn off these services, we use the `systemctl mask` command.
|
||||||
A bonus with that mechanism is, that no rpm %post script turns them on automatically.
|
A bonus with that mechanism is, that no rpm %post script turns them on automatically.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ cd /lib/systemd/system
|
$ cd /lib/systemd/system
|
||||||
$ for i in fedora*storage* lvm2-monitor.* mdmonitor*.*; \
|
$ for i in fedora*storage* lvm2-monitor.* mdmonitor*.*; \
|
||||||
do sudo systemctl mask $i; \
|
do sudo systemctl mask $i; \
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
On Fedora 17, it seems there are still some SysV initscripts left, so we turn them off:
|
On Fedora 17, it seems there are still some SysV initscripts left, so we turn them off:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ for i in livesys livesys-late spice-vdagentd;\
|
$ for i in livesys livesys-late spice-vdagentd;\
|
||||||
do sudo chkconfig $i off;\
|
do sudo chkconfig $i off;\
|
||||||
|
@ -48,6 +57,7 @@ $ for i in livesys livesys-late spice-vdagentd;\
|
||||||
```
|
```
|
||||||
|
|
||||||
Seems like we saved half of the time in userspace:
|
Seems like we saved half of the time in userspace:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1640ms (kernel) + 6556ms (userspace) = 8197ms
|
Startup finished in 1640ms (kernel) + 6556ms (userspace) = 8197ms
|
||||||
|
@ -57,6 +67,7 @@ From now on, you really have to know what you are doing and how to revert your a
|
||||||
To compare Fedora with e.g. Ubuntu, I will now turn off all services except NetworkManager.
|
To compare Fedora with e.g. Ubuntu, I will now turn off all services except NetworkManager.
|
||||||
The result will be a Linux system without mail, firewall, printing, the abrt tools, avahi,
|
The result will be a Linux system without mail, firewall, printing, the abrt tools, avahi,
|
||||||
some mountpoints, rsyslog, irqbalance, and selinux security.
|
some mountpoints, rsyslog, irqbalance, and selinux security.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ cd /lib/systemd/system
|
$ cd /lib/systemd/system
|
||||||
$ for i in abrt*.service auditd.service avahi-daemon.* \
|
$ for i in abrt*.service auditd.service avahi-daemon.* \
|
||||||
|
@ -74,12 +85,14 @@ To disable selinux (only for measurements!), edit `/etc/selinux/config` and add
|
||||||
to the kernel command line.
|
to the kernel command line.
|
||||||
|
|
||||||
My `/etc/grub2.cfg` now looks like this:
|
My `/etc/grub2.cfg` now looks like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
linux /vmlinuz-3.3.7-1.fc17.x86_64 root=/dev/sda3 rootfstype=ext4 libahci.ignore_sss=1 raid=noautodetect selinux=0
|
linux /vmlinuz-3.3.7-1.fc17.x86_64 root=/dev/sda3 rootfstype=ext4 libahci.ignore_sss=1 raid=noautodetect selinux=0
|
||||||
initrd /initramfs-3.3.7-1.fc17.x86_64.img
|
initrd /initramfs-3.3.7-1.fc17.x86_64.img
|
||||||
```
|
```
|
||||||
|
|
||||||
Now we are really fast!
|
Now we are really fast!
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1329ms (kernel) + 1596ms (userspace) = 2926ms
|
Startup finished in 1329ms (kernel) + 1596ms (userspace) = 2926ms
|
||||||
|
@ -88,6 +101,7 @@ Startup finished in 1329ms (kernel) + 1596ms (userspace) = 2926ms
|
||||||
I also like the idea of automounting (systemd's automount feature was an idea of mine :-).
|
I also like the idea of automounting (systemd's automount feature was an idea of mine :-).
|
||||||
So I turn /boot in a "mount on demand" mountpoint. Also having /tmp as a tmpfs is one way to reduce
|
So I turn /boot in a "mount on demand" mountpoint. Also having /tmp as a tmpfs is one way to reduce
|
||||||
disk activity (useful for e.g. a slow flash disk). My resulting /etc/fstab looks like this:
|
disk activity (useful for e.g. a slow flash disk). My resulting /etc/fstab looks like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
/dev/sda3 / ext4 defaults 1 1
|
/dev/sda3 / ext4 defaults 1 1
|
||||||
/dev/sda1 /boot ext4 noauto,comment=systemd.automount 1 2
|
/dev/sda1 /boot ext4 noauto,comment=systemd.automount 1 2
|
||||||
|
@ -96,6 +110,7 @@ tmpfs /tmp tmpfs defaults 0 0
|
||||||
```
|
```
|
||||||
|
|
||||||
This only saved a little bit of time, but still:
|
This only saved a little bit of time, but still:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1342ms (kernel) + 1426ms (userspace) = 2769ms
|
Startup finished in 1342ms (kernel) + 1426ms (userspace) = 2769ms
|
||||||
|
@ -103,23 +118,27 @@ Startup finished in 1342ms (kernel) + 1426ms (userspace) = 2769ms
|
||||||
|
|
||||||
Because NetworkManager is started also by the graphical login target,
|
Because NetworkManager is started also by the graphical login target,
|
||||||
I can remove it from the multi-user target and it will be started in parallel to the gdm login screen.
|
I can remove it from the multi-user target and it will be started in parallel to the gdm login screen.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ sudo rm /etc/systemd/system/multi-user.target.wants/NetworkManager.service
|
$ sudo rm /etc/systemd/system/multi-user.target.wants/NetworkManager.service
|
||||||
```
|
```
|
||||||
|
|
||||||
This will shave of a few milliseconds:
|
This will shave of a few milliseconds:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1323ms (kernel) + 1279ms (userspace) = 2603ms
|
Startup finished in 1323ms (kernel) + 1279ms (userspace) = 2603ms
|
||||||
```
|
```
|
||||||
|
|
||||||
To see the difference readahead makes for the system, I turn it off temporarily and reboot
|
To see the difference readahead makes for the system, I turn it off temporarily and reboot
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ cd /lib/systemd/system
|
$ cd /lib/systemd/system
|
||||||
$ for i in *readahead*; do sudo systemctl mask $i;done
|
$ for i in *readahead*; do sudo systemctl mask $i;done
|
||||||
```
|
```
|
||||||
|
|
||||||
Which will give us:
|
Which will give us:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 1336ms (kernel) + 1210ms (userspace) = 2547ms
|
Startup finished in 1336ms (kernel) + 1210ms (userspace) = 2547ms
|
||||||
|
@ -130,12 +149,14 @@ is displayed is taking longer. So a fair comparison would involve a **stopwatch*
|
||||||
|
|
||||||
To turn off plymouth, because we want speed and not eye candy, I remove plymouth completely
|
To turn off plymouth, because we want speed and not eye candy, I remove plymouth completely
|
||||||
and regenerate the initramfs to get rid of it.
|
and regenerate the initramfs to get rid of it.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ sudo yum remove 'plymouth*'
|
$ sudo yum remove 'plymouth*'
|
||||||
$ sudo dracut -f
|
$ sudo dracut -f
|
||||||
```
|
```
|
||||||
|
|
||||||
After a reboot we get the stunning result of:
|
After a reboot we get the stunning result of:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ systemd-analyze
|
$ systemd-analyze
|
||||||
Startup finished in 612ms (kernel) + 499ms (initramfs) + 1330ms (userspace) = 2443ms
|
Startup finished in 612ms (kernel) + 499ms (initramfs) + 1330ms (userspace) = 2443ms
|
||||||
|
|
|
@ -14,10 +14,8 @@ Gerda-Penzel-Str. 13
|
||||||
|
|
||||||
Email:webmaster@harald.hoyer.xyz
|
Email:webmaster@harald.hoyer.xyz
|
||||||
|
|
||||||
GPG key: current [0x4BC0896FB5693595](https://harald.hoyer.xyz/files/gpg-key.txt) as seen on the key servers and [people.redhat.com](https://people.redhat.com/harald/gpg-pub-7F3D64824AC0B6B8009E50504BC0896FB5693595.asc)
|
GPG key: current [0x4BC0896FB5693595](/files/gpg-key.txt) as seen on the key servers and [github.com/haraldh.gpg](https://github.com/haraldh.gpg)
|
||||||
|
|
||||||
|
|
||||||
Keybase: [https://keybase.io/haraldhoyer/](https://keybase.io/haraldhoyer/)
|
Keybase: [https://keybase.io/haraldhoyer/](https://keybase.io/haraldhoyer/)
|
||||||
|
|
||||||
|
|
||||||
old GPG key (not compromised): C5575542 as seen on the key servers
|
old GPG key (not compromised): C5575542 as seen on the key servers
|
||||||
|
|
Loading…
Reference in a new issue