linux 内核启动修复
首先看一下 linux 内核重要文件 grub.conf
- # grub.conf generated by anaconda
- #
- # Note that you do not have to rerun grub after making changes to this file
- # NOTICE: You have a /boot partition. This means that
- # all kernel and initrd paths are relative to /boot/, eg.
- # root (hd0,0)
- # kernel /vmlinuz-version ro root=/dev/sda2
- # initrd /initrd-[generic-]version.img
- #boot=/dev/sda
- default=0 #如果有多个菜单, 默认选择的菜单为 0
- timeout=5 #菜单选项栏等待 5s
- splashimage=(hd0,0)/grub/splash.xpm.gz #/dev/sda1 即 / boot 下开机启动图片
- hiddenmenu #影藏菜单
- title CentOS 6 (2.6.32-696.el6.x86_64) #标题为 CentOS 6 (2.6.32-696.el6.x86_64), 此标题不能没有
- root (hd0,0) #第一块磁盘, 第 1 个分区, 指的是 / boot
- kernel /vmlinuz-2.6.32-696.el6.x86_64 ro root=UUID=9ca5bdac-ce61-410e-a9fb-19a7877163cc rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSF ONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet # kernel 相对于 / boot 的路径, 此处根值 / boot,kenrl 后面跟有系统启动相关参数 rhgb 图形化工具 (转圈圈), 删除 rhgb 直接到正常启动界面 quiet 默认隐藏内核的启动过程
- initrd /initramfs-2.6.32-696.el6.x86_64.img
- title CentOS 6 (2.6.32-696.el6.x86_64) #标题为 CentOS 6 (2.6.32-696.el6.x86_64), 此标题不能没有
- kernel (hd0,0)/vmlinuz-2.6.32-696.el6.x86_64 ro root=UUID=9ca5bdac-ce61-410e-a9fb-19a7877163cc rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSF ONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet # 没有定义根, 后面不能调用只能在前面添加 (hd0,0)
- initrd (hd0,0)/initramfs-2.6.32-696.el6.x86_64.img
来源: https://www.cnblogs.com/zangfans/p/8672155.html