Ubuntu Server 22.04重启后出现「Gave up waiting for root file system device」错误无法启动求助
Ubuntu Server 22.04重启后出现「Gave up waiting for root file system device」错误无法启动求助
各位大佬好,这个问题之前有人问过好几次,但好像一直没有通用的解决方案。我试了好几种办法都没搞定,实在没办法了来求助大家。
我的Ubuntu Server 22.04服务器之前两周运行完全正常,今天重启的时候突然卡壳,出现了下面的错误:
Begin: Mounting root file system .. Begin Running /scripts/local-top ... Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg ... mdam: No arrays found in config file or automatically done. Gave up waiting for root file system device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Missing modules (cat /proc/modules; ls dev) ALERT! /dev/mapper/ubuntu--vg-ubuntu--lv does not exist. Dropping to a shell! BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs)
补充一下我的环境:服务器上有一个用2块硬盘搭建的ZFS池(现在已经断开连接了),系统启动盘是NVMe硬盘,安装系统的时候就配置了LUKS加密。之前重启都没出过问题,昨天我折腾Python安装的时候可能改了些东西,但具体操作记不太清了...
在initramfs的shell里执行了几个命令,输出如下:
执行blkid的结果:
/dev/nvme0n1p3 UUID=<uuid> TYPE="crypto_LUKS" PARTUUID=<uuid> /dev/nvme0n1p1 UUID=<uuid> BLOCK_SIZE="512" TYPE="vfat" PARTUUID=<uuid> /dev/nvme0n1p2 UUID=<uuid> BLOCK_SIZE="4096" TYPE="ext4" PARTUUID=<uuid>
执行ls /dev/mapper的结果:
control
后来我用Live镜像启动来调试,成功用cryptsetup openLuks /dev/nvme0n1p3 test解密了硬盘。这时候再执行blkid,就能看到/dev/mapper/test和/dev/mapper/ubuntu--vg-ubuntu--lv的条目了。
接着执行vgchange -ay,然后挂载mount /dev/ubuntu-vg/ubuntu-lv /mnt,就能正常访问/mnt下的所有文件。但我检查/mnt/etc/crypttab的时候,发现这个文件是空的。
如果需要更多调试信息,比如Live镜像下的其他命令输出,我随时可以提供。麻烦各位大佬帮忙看看,万分感谢!
备注:内容来源于stack exchange,提问作者Harry Stuart
相关产品推荐
相关产品推荐

