更新内核后卡在 warning: /dev/vda1 does not exist

/ 0评 / 0

一台VPS原来装的是nanqinglang的魔改版bbr,现在打算换成cx9208的bbrplus,在三台机器上直接用bbrplus的一键脚本先恢复优化参数-重启-安装bbrplus内核-优化参数-重启都成功了,在最后一台anynode的小机上却失败了。
进入anynode的管理页面,用vnc看启动信息发现最后停在dracut#这里。
上面的错误信息显示为warning: /dev/vda1 does not exist
于是在vnc里用ls /dev查看设备信息显示:

autofs           hpet                ptmx      tty0   tty26  tty43  tty60    vcs3
block            hugepages           pts       tty1   tty27  tty44  tty61    vcs4
bsg              hwrng               random    tty10  tty28  tty45  tty62    vcs5
btrfs-control    initctl             raw       tty11  tty29  tty46  tty63    vcs6
bus              input               rtc       tty12  tty3   tty47  tty7     vcsa
cdrom            kmsg                rtc0      tty13  tty30  tty48  tty8     vcsa1
char             log                 sda       tty14  tty31  tty49  tty9     vcsa2
console          loop-control        sda1      tty15  tty32  tty5   ttyS0    vcsa3
core             mapper              sda2      tty16  tty33  tty50  ttyS1    vcsa4
cpu              mem                 sg0       tty17  tty34  tty51  ttyS2    vcsa5
cpu_dma_latency  memory_bandwidth    sg1       tty18  tty35  tty52  ttyS3    vcsa6
cuse             mqueue              shm       tty19  tty36  tty53  uhid     vfio
disk             net                 snapshot  tty2   tty37  tty54  uinput   vga_arbiter
dri              network_latency     snd       tty20  tty38  tty55  urandom  vhci
fb0              network_throughput  sr0       tty21  tty39  tty56  usbmon0  vhost-net
fd               null                stderr    tty22  tty4   tty57  usbmon1  vhost-vsock
full             nvram               stdin     tty23  tty40  tty58  vcs      zero
fuse             port                stdout    tty24  tty41  tty59  vcs1
hidraw0          ppp                 tty       tty25  tty42  tty6   vcs2

根本就没有vda这个设备嘛!
我知道是因为升级内核时设备信息改变了造成系统无法启动,但是却不知道怎么修改(因为是半吊子水平),后来找到了寻真的博客,按照他的方法成功修改了设备信息重启成功。
他介绍了两种方法,其实第一种很少有人会有先见之明预见到会出错误,一般都是出错时用第二种。
在vnc界面输入

# mount /dev/sda1 /tmp
# sed -i ‘s/vda/sda/g’ /tmp/etc/fstab
# sed -i ‘s/vda/sda/g’ /tmp/boot/grub2/grub.cfg
# reboot

reboot后如果没有反应,就用控制台界面重启系统,经过这样的修改,我的系统救活了,感谢寻真!

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注