自从升级到Ubuntu18.04,Bionic就停止了我的笔记本电脑的工作。Ubuntu以UEFI模式安装,GRUB作为引导加载程序,双启动Windows。系统是完全加密的,包括引导分区。
我安装了kexec工具,并添加了以下服务:
[Unit]
DefaultDependencies=no
Requires=sysinit.target
After=sysinit.target
[Service]
Type=oneshot
ExecStart=-/bin/true
RemainAfterExit=yes
ExecStop=/usr/local/bin/load-kexec.sh
[Install]
WantedBy=basic.target而这个执行kexec重新启动的脚本:
#!/bin/sh
INITRAMFS="/initrd.img";
KERNEL="/vmlinuz";
if [ "$(cat /sys/kernel/kexec_loaded)" != "1" ]; then
echo "Load kernel ($KERNEL) and initramfs ($INITRAMFS) for kexec";
kexec -l "$KERNEL" --initrd="$INITRAMFS" --reuse-cmdline;
else
echo "Already loaded some kexec, not modifying";
fi;但是,运行sudo systemctl kexec会给出以下错误消息:
Failed to open "/boot/efi/loader/loader.conf": Datei oder Verzeichnis nicht gefunden
Failed to read boot config from "/boot/efi/loader/loader.conf": Datei oder Verzeichnis nicht gefunden
Failed to load bootspec config from "/boot/efi/loader": Datei oder Verzeichnis nicht gefunden这个配置文件不存在的事实是正确的,但是我不需要在Ubuntu16.04上创建它,在那里kexec完美地工作。
有人能解释一下升级过程中发生了什么变化,以及如何让kexec再次工作吗?
发布于 2018-05-19 00:58:21
在英语中,意思是:“未找到文件或目录”。
看着loader.conf -sd的配置文件-引导,它说:
sd(7)将在EFI系统分区(ESP)上读取
/loader/loader.conf和在/loader/loader.conf.d/下具有".conf“扩展名的任何文件。
虽然今晚我没有时间测试kexec,但是您应该能够使用以下命令修复错误:
sudo mkdir -p /boot/efi/loader/loader.conf.d/初始错误消息显示没有文件或目录。我希望创建一个目录能让它开心。下面是默认的loader.conf 文件:
# Example kexec-loader configuration file
# Read the documentation for more information.
#
# Number of seconds to wait before booting the default menu entry.
#
# timeout 5
# Explicitly enable/disable GRUB autodetection. Autodetection will be enabled
# by default, but only if no boot targets are specified in this file.
#
# grub-autodetect on
# grub-autodetect off
# Force GRUB path. Setting this will disable autodetection.
#
# grub-path (hda1)/boot/grub
# Map GRUB disks/partitions
# This overrides any mappings in device.map
#
# grub-map hd0 sda
# grub-map hd1,a hda8
# Example boot target
#
# title Generic Linux System
# root hda1
# kernel /boot/vmlinuz
# cmdline root=/dev/hda1 ro
# initrd /boot/initrd.gz https://askubuntu.com/questions/1037733
复制相似问题