Linux启动报错missing operating system
用UltraISO制作了一个Red Hat Enterprise Linux Server release 5.7系统的U盘启动盘,然后在一台PC上安装,由于安装过程中在干别的事情,有些选项没有细看。安装完成后,启动系统时报错:missing operating system。
插上U盘,在BIOS里面选择从U盘启动就能正常启动系统,搜索了一些资料后,发现在安装LINUX操作系统过程中,由于使用的是U盘方式安装,引导的grub信息被默认安装到了U盘中(很多时候没有注意到这个),拔除U盘后,启动过程无法读取相应的启动管理器的代码信息,导致系统无法启动。关于GRUB的介绍如下:
GRUB全称为Grand Unified Boot Loader,是Linux操作系统主流的启动引导管理器。主要作用是启动和装载Linux操作系统。系统启动过程中一旦完成了BIOS自检,GRUB会被立刻装载。在GRUB里面包含了可以载入操作系统的代码以及将操作系统引导权传递给其他启动引导管理器的代码。GRUB可以允许用户选择使用不同的kernel启动系统,或者在启动系统的过程中设置不同的启动参数。
于是特意重装验证一下,如下图所示,在安装过程中,Linux的grub安装选项默认为“The GRUB boot loader will be installed on /dev/sdb"。这个/dev/sdb设备恰恰就是我的U盘。
网上有些资料介绍了如何解决这个问题,就是插入U盘,成功启动操作系统后,在终端做下面操作
[root@localhost ~]# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root(hd0,0);
root(hd0,0);
Error 27: Unrecognized command
grub> root (hd0,0);
root (hd0,0);
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.
grub> quit
quit
[root@localhost ~]#
然后修改vi /etc/grub.conf文件中的hd1改为hd0, 我测试实验当中,根本没有/boot/gurb/grub.conf这个配置文件,不知是否与操作系统版本有关系。
[root@localhost ~]# vi /etc/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 (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-274.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-274.el5.img
title Other
rootnoverify (hd1,3)
chainloader +1
[root@localhost ~]# more /etc/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 (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-274.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-274.el5.img
title Other
rootnoverify (hd0,3)
chainloader +1
修改后重启操作操作系统即可解决问题。另外测试过程中发现不用做grub任何操作,只需修改/etc/grub.conf 亦能解决问题。另外,我测试过程特意测试了一下选择”No boot loader will be installed“, 安装结束reboot,就会出现下面界面,可以进入grub,然后按照上面操作解决问题。
参考资料:
http://blog.sina.com.cn/s/blog_5e48f39c0100jmwp.html
http://www.cnblogs.com/darktime/p/3404584.html
Linux启动报错missing operating system的更多相关文章
- ogg 传输进程启动报错 Missing filename opening checkpoint file.
GGSCI (hosta) 48> view report dpfull ************************************************************ ...
- Idea启动报错 Error:java: System Java Compiler was not found in classpath
报错信息:Error:java: System Java Compiler was not found in classpath 使用IDEA启动的时候出现了这个错误,查找了很久,才找到解决办法 1. ...
- springboot放到linux启动报错:The temporary upload location [/tmp/tomcat.8524616412347407692.8111/work/Tomcat/localhost/ROOT/asset] is not valid
1.背景 笔者的springboot在一个非root用户环境下运行,这种环境下可以保证不被潜在的jar/开源框架漏洞提权. 比如在防火墙上把外网访问来的443端口映射到本地8443的java web端 ...
- linux启动报错:kernel panic - not attempted to kill init
系统类型:CentOS 6.4(x64) 启动提示:Kernel panic - not syncing: Attempted to kill init 解决办法: 系统启动的时候,按下‘e’键进入g ...
- Ubuntu 16.04下使用UNetbootin制作的ISO镜像为U盘启动出现:Missing Operating System (mbr.bin)
通过以下方式进行排查: 1.确定U盘是否真的有启动系统 2.分区是否已经标记为激活状态,尤其使用了Fdisk进行分区时,如果分区>=2时默认是不设置激活分区. 比如下面是通过Fdisk进行设置分 ...
- u盘安装CENTOS后,启动missing operating system ,只能用U盘才能启动系统
好久之前就想把家里闲置的那台老的不能再老的笔记本换成linux的,用来学习 从N久之前用光盘安装的时候发现光驱坏掉了之后就没有再装过,最近又想安装于是就试了U盘安装 U盘安装过程也很简单,只需要制作一 ...
- Linux下Tomcat项目启动报错
Linux下Tomcat项目启动报错 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading cla ...
- 【spring boot】整合LCN,启动spring boot2.0.3 启动报错:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
spring boot 2.0.3启动报错: Error starting ApplicationContext. To display the conditions report re-run yo ...
- Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案
Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案 在win7 32位旗舰版下,启动1.0.8版本nginx,显示如下错误: [plain] 2012/04/0 ...
随机推荐
- JAVA常见面试题之Forward和Redirect的区别
用户向服务器发送了一次HTTP请求,该请求可能会经过多个信息资源处理以后才返回给用户,各个信息资源使用请求转发机制相互转发请求,但是用户是感觉不到请求转发的.根据转发方式的不同,可以区分为直接请求转发 ...
- “WPF老矣,尚能饭否”—且说说WPF今生未来(上):担心
近日微软公布了最新的WPF路线图,一片热议:对于老牌控件提供商葡萄城来说,这是WPF系列控件一个重要的机遇,因此,Spread Studio for WPF产品做了一次重要更新,并随着Spread S ...
- [WCF编程]13.并发:服务并发模式
一.概述 传入的客户端调用消息会分发给Windows I/O线程池(线程默认为1000)上的服务实例.多个客户端可以发起多个并发的调用,并且服务可以在多个线程上处理这些请求.如果传入的调用分发给同一个 ...
- C#~异步编程再续~async异步方法与同步方法的并行
返回目录 今天晚上没事写了个测试的代码,又看了看.net的并行编程,两个方法,一个是异步async修饰的,另一个是普通的方法,在控制台程序的Main方法里去调用这两个方法,会有什么结果呢? 首先我们看 ...
- bzoj1202--带权并查集+前缀和
http://www.lydsy.com/JudgeOnline/problem.php?id=1202 记s[i]=a[1]+a[2]+...+a[i],即s[i]为前缀和.再令v[i]=s[f[i ...
- WinFrom窗体始终置顶
调用WindowsAPI使窗体始终保持置顶效果,不被其他窗体遮盖: [DllImport("user32.dll", CharSet = CharSet.Auto)] privat ...
- stm32 usart 异步传输示例
STM32F103xE的USART异步数据传输示例 USART全称Universal Synchronous/Asynchronous Receiver/Transmitter,是一种可以进行同步/异 ...
- Lind.DDD.IoC(大叔推荐)~在服务定位器中引入IoC容器~容器的适配器
回到目录 关于依赖倒置(DIP) 高层模块不依赖于低层模块的实现,而低层模块依赖于高层模块定义的接口,通俗的讲,就是高层模块定义接口,低层模块负责实现,这在我们实际开发中经常被用到,层与层之间引用,经 ...
- Visual Studio for Mac 简介
2016-12-13 Hutchinson 微软中国MSDN 在 11 月举行的 Connect(); 上,Microsoft 将推出 Visual Studio for Mac 预览版.这是一个激动 ...
- Apache Lucene(全文检索引擎)—分词器
目录 返回目录:http://www.cnblogs.com/hanyinglong/p/5464604.html 本项目Demo已上传GitHub,欢迎大家fork下载学习:https://gith ...