树莓派 - 自启动 电子相册(含快速启动, 启动logo)(pi 3b)

本文介绍如何通过诊断和分析Raspberry Pi启动时间过长的问题,找出主要消耗时间的服务如raspapd和raspi-config,并指导读者如何禁用这些不必要的服务以实现快速启动,提升用户体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

树莓派电子相册 - 简书

改变启动过程中的logo图片

raspbian - Changing plymouth boot splash - Raspberry Pi Stack Exchange

The splash screen is a PNG file at /usr/share/plymouth/themes/pix/splash.png – you can change the image to whatever you want as long as you use the same file name.

启动后,全屏显示gpicview,并slideplay 图片

启动后,全屏显示gpicviewDisplay full screen image on Startup - Raspberry Pi Forums

快速启动 fast boot

refer

Raspberry Pi 3/4 faster boot time in few easy steps - Panther.software

http://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html

Raspberry Pi 3 Fastboot - Less Than 2 Seconds - Bir Coder'ın Günlüğü

 

 

First of all, diagnose the issue by following command
~$ systemd-analyze

this will output some general timing, like:

Startup finished in 2.947s (kernel) + 17.969s (userspace) = 20.917s

Not so good huh?

We can be more specific about timings using instruction „blame” to find out who needs to blame for those nasty timings, so:
~$ systemd-analyze blame

this will output some specific boot elements, like:

9.297s raspapd.service
1.547s dev-mmcblk0p2.device
1.412s raspi-config.service
1.065s lighttpd.service
1.007s rpi-eeprom-update.service
741ms dhcpcd.service
568ms netfilter-persistent.service
514ms log2ram.service
504ms systemd-udev-trigger.service
497ms dphys-swapfile.service
495ms keyboard-setup.service
436ms systemd-fsck@dev-disk-by\x2dpartuuid-028d1236\x2d01.service
435ms networking.service
327ms systemd-timesyncd.service
315ms wpa_supplicant.service
295ms systemd-journald.service
260ms rsyslog.service
249ms ssh.service
210ms systemd-fsck-root.service
204ms rng-tools.service
203ms systemd-logind.service
196ms dnsmasq.service
195ms systemd-remount-fs.service
180ms user@1000.service
163ms systemd-udevd.service
142ms hostapd.service
129ms triggerhappy.service
126ms systemd-tmpfiles-setup.service
124ms fake-hwclock.service
86ms systemd-journal-flush.service
etc. [...]

So I already know what to blame, in this case AP Interface (hotspot/access point web ui) eat 9 seconds. I don’t like other services as well, most important – I don’t need them in my use case. How to disable unwanted?

sudo systemctl disable raspapd.service
sudo systemctl disable raspi-config.service
sudo systemctl disable keyboard-setup.service
sudo systemctl disable dphys-swapfile.service
sudo systemctl disable avahi-daemon.service
sudo systemctl disable sys-kernel-debug.mount
sudo systemctl disable raspi-config.service
sudo systemctl disable systemd-udev-trigger.service
sudo systemctl disable rpi-eeprom-update.service
sudo systemctl disable rsyslog.service
sudo systemctl disable systemd-journald.service
sudo systemctl disable systemd-fsck-root.service
sudo systemctl disable systemd-logind.service
sudo systemctl disable bluetooth.service
sudo systemctl disable hciuart.service

Your list can vary – use with caution or google out specific services and compare to your needs before disabling.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值