“Ubuntu From Scratch”(UFW,或一般指从零自己构建的 Ubuntu 风格系统)启动慢,通常不是 Ubuntu 本身的问题,而是你构建方式或系统配置不完整导致的。下面按常见原因逐一说明。
initramfs如果你是自己用 debootstrap 构建的:
initrd.imgahci, nvme, ext4)mkinitramfs 参数错误现象:
Loading initial ramdisk✅ 解决:
update-initramfs -c -k all
特别是用自定义内核时:
ext4 被编成模块但没进 initramfsbtrfs / xfs 但没支持✅ 检查:
ls /lib/modules/$(uname -r)/kernel/fs
/etc/fstab错误示例:
UUID=xxxx / ext4 defaults 0 1
但:
✅ 启动会卡在:
A start job is running for /dev/disk/by-uuid/...
(默认 90 秒)
From Scratch 系统常忘记:
systemd-networkdnetwork-online.target✅ 查看:
systemd-analyze blame
systemd-analyze critical-chain
udev 或 systemd-udevd 没启动后果:
✅ 确保安装:
apt install udev
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
GRUB 加:
systemd.log_level=debug
很多慢是基础组件没装:
apt install \
linux-image-generic \
initramfs-tools \
systemd \
systemd-sysv \
udev \
netplan.io \
dbus
那启动慢通常是:
/etc/inittabCONFIG_DEVTMPFSUbuntu From Scratch 启动慢,90% 是 initramfs / fstab / systemd / 驱动 没配好,不是 Ubuntu 慢。
如果你愿意,可以贴:
systemd-analyze blame 输出debootstrap 还是 LFS我可以直接帮你精准定位。