我已经使用 Ubuntu 一段时间了,直到现在它一直运行良好。每次尝试启动时,我都会收到此消息,无法再继续:
BusyBox v1.17.1 (Ubuntu 1:1.17.1-10ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands
(initramfs)
Run Code Online (Sandbox Code Playgroud)
我主要担心的是我的文件和图片,因为我没有备份。
任何建议将不胜感激!
我有一个系统,其中除/boot之外的所有分区(/、/home和swap)都已加密。/boot驻留在外部设备中,该设备还包含一组用于自动解密所有分区的加密密钥文件。换句话说,我想要的最终结果是使用外部设备和密码进行 2 因素身份验证,其中密码将在启动期间输入一次,启动脚本将使用该密码解密所有分区。
我是 Ubuntu(以及一般的 Linux)的新手,但我使用update-initramfs修改了initrd.img 中的各种脚本。该cryptroot脚本似乎在做所有的工作挂载分区在第一,但一些尝试后,似乎它只是用于解密根文件系统负责。我修改了脚本中的一个字符串,将Enter the passphrase更改为简单的Password,这在解密根文件系统时似乎有效,但再次使用旧提示来解密下一个分区。换句话说,这就是我得到的:
我认为 Ubuntu 可能正在某处运行cryptroot脚本的另一个副本来解密 root 之后的所有其他分区,但我不知道还有什么要修改的。
在 Ubuntu Server 设置期间,我可以选择安装一个“目标”initrd,其中只包含我的计算机需要的模块。我选择了另一个选项,“通用”。既然我已经安装了系统,我该如何安装“目标”initrd?
我创建了自己的 initramfs 脚本(基于 live-initramfs),我需要设置网络连接(使用 DHCP)来获取远程文件。那么我需要向 initramfs 挂钩文件(ifconfig、dhclient?)添加什么。以及如何编写我的 initramfs 脚本?现在我正在尝试这样的事情:
mkdir -p /var/run/network # needed by ifup
modprobe af_packet # for DHCP?
udevadm trigger
udevadm settle
ifup eth0 #???
Run Code Online (Sandbox Code Playgroud)
对于 ifup,我需要 /etc/network/interfaces 文件具有:
auto eth0
iface eth0 inet dhcp
Run Code Online (Sandbox Code Playgroud)
但通常我不知道网络设备到底需要做什么才能在 initramfs 中正常工作。
任何想法或帮助?
我想首先说我对 Linux 非常陌生(使用它大约 1 个月)。到目前为止,我没有遇到任何问题。
我正在从带有 250 GB 硬盘驱动器和 3 GB 内存的东芝笔记本电脑上运行 Ubuntu 12.04。
昨天一切正常。我所做的唯一改变是我下载了 Banshee 来尝试替代 Rhythmbox,并做了一些推荐的更新。今天早上我尝试启动,花了很长时间,我终于得到了这个错误:
mount: mounting /dev/disk/by-uuid/02bc41cc-1e21-4700-a179-be2805a658c4 on /root failed: Invalid argument
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
BusyBox v1.18. (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter …Run Code Online (Sandbox Code Playgroud) 我的电脑死机了。我将其关闭并重新启动并出现此错误:
/dev/sda2 contains a file system with errors, check forced. Inodes that were part of a corrupt orphan linked list found.
/dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. Fsck exited with status code 4.
Run Code Online (Sandbox Code Playgroud)
请向我解释我需要做什么,因为我对 Ubuntu 真的很陌生。
我全新安装了 Ubuntu 17.10(擦除整个磁盘并让 Ubuntu 安装程序执行任何需要的操作)。
它看起来类似于这两个问题:
基本上,当我开始按 shift 键以访问 grub 菜单并使用恢复模式时,我最终得到:
升级到 20.04 后,我的加密磁盘在启动时没有被解密。我没有被要求输入任何密码,所以它显然找不到任何分区并引导到 initrd 提示符。
可能是什么原因:/cryptroot/crypttab在 initrd 映像中是完全空的。
我可以手动打开 luks 并 chroot 进入系统。这是我/etc/crypttab在真正根目录中的内容:
nvme0n1p3_crypt UUID=<some uuid> none luks
(UUID 都是正确的,无处不在)
当我运行时update-initramfs -c -k all,输出是:
cryptsetup: WARNING: target 'nvme0n1p3_crypt' not found in /etc/crypttab
这有点奇怪,因为它正是该文件中唯一单个条目的目标名称。它也被列为/dev/mapper链接../dm-0,似乎也是正确的。
我尝试将设备重命名为crypt仅使用,dmsetup rename ...但这当然没有帮助。
我认为这是我问题的根本原因。
我最近擦拭了我的盒子并安装了 20.10,我喜欢它,非常棒!这次我决定要生活在边缘并使用实验性的 zfs 支持,但在安装软件包和更新一段时间后,我现在遇到了一个奇怪的问题,我的启动 zpool 太满了。
每当我在软件更新程序中点击“立即更新”时,我都会收到如下消息:
The upgrade needs a total of 254 M free space on disk '/boot'. Please free at least an additional 194 M of disk space on '/boot'. You can remove old kernels using 'sudo apt autoremove', and you could also set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce the size of your initramfs.
Run Code Online (Sandbox Code Playgroud)
我已经运行了sudo apt autoremove,它没有删除任何内容,我犹豫更改 initramfs 上的压缩,因为这更像是针对可能较低问题的补丁(也许我错了哈哈)。
我仍然可以手动升级,sudo apt update && sudo apt upgrade但每次都会收到此错误:
ERROR couldn't save system state: Minimum free …Run Code Online (Sandbox Code Playgroud) init在 bootint 过程中,初始 ramdisk 中有一个脚本。在最后一次操作中,它说:
# Chain to real filesystem
exec run-init ${rootmnt} ${init} "$@" ${recovery:+--startup-event=recovery} <${rootmnt}/dev/console >${rootmnt}/dev/console 2>&1
panic "Could not execute run-init."
Run Code Online (Sandbox Code Playgroud)
我在ramdisk内容中搜索所有脚本,找不到任何类似的文件名或函数名。run-init实际上是什么?
initramfs ×10
boot-failure ×2
busybox ×2
cryptroot ×2
10.04 ×1
12.04 ×1
17.10 ×1
20.10 ×1
apt ×1
boot ×1
cryptsetup ×1
dhcp ×1
encryption ×1
ethernet ×1
fsck ×1
grub2 ×1
initrd ×1
kernel ×1
luks ×1
networking ×1
server ×1
source-code ×1
updates ×1
zfs ×1