本教程以Centos7为例
错误提示:Kernal Panic - Not syncing : VFS: unable to mount root fs on unknown-block (0,0)
1、登录digitalocean管理Droplets,关闭Droplets,点击Recovery,切换启动方式(如图所示)
2、切换完成后,开机,并打开控制台(如图所示)
3、进入控制台后,会出现如下
1. Mount your Disk Image [Not Mounted]
2. Check Filesystem
3. Reset Droplet Root Password
4. Configure Keyboard
5. Attempt to 'chroot' into installed system
6. Interactive Shell [/bin/bash]
提示,选择1,出来路径后,选择5,进入chroot
4、到了下图位置,按照官方文档的https://www.digitalocean.com/docs/droplets/how-to/kernel/use-non-default/#install-kernel 安装内核,添加引导后不成功,
遇到failed to get canonical path of overlay问题,尝试
https://hacklove.net/discussion/157/error-grub-install-error-failed-to-get-canonical-path-of-overlay?__cf_chl_jschl_tk__=05937c1183534fec6b56d226a54e46789e283ec3-1585119888-0-Ad7ST-IYhImdCuVtIwK7e8EMW6zBDn14uA_C2NUqaUNHh-LkOmgqE9PscLAa7NDwTtTMxwUT5yvXSEcn-o3XtxxQYfXcOEdzFvVPHSKz1tu-hbMus7fkLVjM8mlry7sxchvrccBoP38mE9dfsDl-kQBm25PR7DWfk8t2IDPONq3wCeniuCw76mf7U_YWevmEZNpsuvF4kvT7XOc4d5EVdd-fp7_isWU8vBnoO6QZxZ_2iuN1N88tEqDlytJYi2hlgsmPLqqY5GmrqrccT4dCoV7lgGie_r3c-JCx2Oh4d103CSPLwuR1h5qJd49eJ0OdXIHtl454rrlXIP7LlLPnw0-m0qxqA2bqFQOH95Ef6QGmkGFoNA2wzRlJWb0Bmmg2eQ
方法,未果,
cat /boot/grub2/grub.cfg |grep menuentry
无法显示我新安装的内核,我尝试直接切换内核启动。参看有什么内核能切换,尝试切换其他内核,命令
cat /boot/grub2/grub.cfg |grep menuentry
grub2-set-default "内核名"
我切换的是0-rescue-…的内核。
5、切换后进行如下图所示,关机,切换硬盘启动、开机、开控制台等步骤。我这边能进入系统了,如果还是无法进入系统,可再尝试iso修复:https://blog.csdn.net/qq_38243612/article/details/105096345 遇到的问题是相似的