]> git.sesse.net Git - pistorm/blob - boot_scripts/README.md
Add boot script and information on faster boot
[pistorm] / boot_scripts / README.md
1 # PiStorm on Pi Boot
2
3 ## Bootup script
4
5 To start PiStorm on automatically on boot, copy this file into /etc/systemd/system/ in your Pi's filesystem. Then run:
6
7 ```bash
8 sudo systemctl enable pistorm
9 ```
10
11 This script will start PiStorm *before* the network connections have started.
12
13 ## Faster boot
14
15 The Pi does several things that aren't needed for PiStorm at bootup, the following steps will accelerate the boot time for you.
16
17 ### config.txt
18
19 Edit `/boot/config.txt` and add the following lines:
20
21 ```ini
22 # Disable the rainbow splash screen
23 disable_splash=1
24
25 # Set the bootloader delay to 0 seconds. The default is 1s if not specified.
26 boot_delay=0
27
28 # Disable Bluetooth
29 dtoverlay=disable-bt
30 ```
31
32 By default there is a 1 second boot delay and initialising bluetooth takes a couple of seconds.
33
34 ### cmdline.txt
35
36 Edit the `/boot/cmdline.txt` and add `quiet` near the end, as an example (do **NOT** copy/paste this line):
37
38 ```
39 console=serial0,115200 console=tty1 root=PARTUUID=5f1219ae-02 rootfstype=ext4 elevator=deadline fsck.repair=yes quiet rootwait
40 ```
41
42 This shaves a little time off spitting out boot logs to the screen.
43
44 ### fstab
45
46 Disable `/boot` remount on boot, this will mean you will need to do `sudo mount /boot` when you want to change files in that partition, but it shaves off half a second from boot. To do this add `noauto` to the options second for the `/boot` line, for example (do **NOT** copy/paste this line):
47
48 ```
49 PARTUUID=5f1219ae-01  /boot           vfat    defaults,noauto          0       2
50 ```
51
52 ### Disable swap
53
54 If we need swap something went wrong. This shaves about another second off the boot time:
55
56 ```bash
57 sudo systemctl disable dphys-swapfile.service
58 ```