grub软件包的安装
1,安装rpm或者源码包
2,安装到mbr中
*编写/boot/grub/grub.conf文件
*grub-install /dev/hda
制作grub启动盘(将自动载软盘上创建一个/boot目录)
mke2fs /dev/fd0
mount /dev/fd0 /mnt/floppy
grub-install --root-directory=/mnt/floppy/'(fd0)'
利用grub引导盘恢复被覆盖的引导系统
先安装windows在安装linux,grub可以很好的识别并启动windows,这个过程中grub并不能直接加载windows核心引导文件,而是调用windows自身的引导器boot.ini通常是windows所在分区的引导扇区,但是再次安装windows系统时,将重写mbr.这就造成了只能启动新安装的windows,而无法启动linux,因为grub本身就安装在mbr中,被新安装windows的引导覆盖了
grub>root (查看根)
grub>find /boot/grub/grub.conf (查看grub.conf在哪个分区)
grub>root (hd0,0)
grub>setup (hd0) (把grub重新安装到hd0的mbr中)
grub配置文件说明
default saved 指定默认启动项为上次保存值
default 0 默认从第一个菜单启动
splashimage (hd0,0) /boot/grub/splash.xpm.gz 指定grub背景图片
timeout 10 指定菜单延迟的时间
title Red Hat linux 指定菜单的名称
root (hd0,0) 设置grub的根设备 root为linux内核所在的分区
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ 加载linux内核
initrd /boot/initrd-2.4.20-8.img 使用initrd命令加载镜像文件
title winxp 定义windows启动菜单
map (hd0) (hd1) 用map命令交换磁盘或分区在BIOS中的标志符,用于启动在第二个硬盘中的windows
map (hd1) (hd0)
root (hd1,0) 设置真实windows所在的分区为grub的根设备
makeactive 设置根设备为活动分区(针对windows不能从非活动分区启动)
chainloader+1 调用Windows分区的启动引导器来引导windows系统
savedeafult --> 保存当前启动项为默认启动菜单
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
更新日志
- 邰肇玫.1981-雪歌(滚石25周年经典复刻系列)【滚石】【WAV+CUE】
- 《Duck Side of the Moon》特色玩法介绍
- 《刀郎 辉煌10年绝版珍藏 3CD》[WAV/分轨][1.6GB]
- 《张韶涵 全面沦陷》[WAV/分轨][370MB]
- 《极品汽车音乐 三十而立 一起走过的岁月 2CD》[WAV/分轨][990MB]
- 周冰倩1997-珍藏精选-真的好想你[WAV+CUE]
- 许廷铿2017《THEULTIMATECOLLECTION》2CD[星梦娱乐][WAV+CUE]
- 徐小明1983-再向虎山行(LP版)[文志][WAV+CUE]
- 《黑神话:悟空》石双双COS热潮持续升温 丝袜你喜欢么
- Qiddiya IRL游戏之旅在东京电玩展重磅登场
- 北京首家任天堂Switch体验店开业:国行机立减200元
- 张秀卿.1999-赢【神采】【WAV+CUE】
- 群星.1977-多多宝丽多(LP版)【宝丽金】【WAV+CUE】
- 刘德华.1989-永远...记得你(2012金碟复刻版)【EMI百代】【WAV+CUE】
- 《维纳斯璀璨假期死或生Xtreme》游戏特色玩法