grub4dos 引导PE UBUNTU 修复引导丢失问题

这几个月一直在装系统,然后就遇到了引导错误的问题了~然后我就郁闷了~
     首先,讲讲grub4dos,这是一个很的工具,可以引导ubuntu的镜像进行安装ubuntu当然其他的镜像也是可以的例如pe。
准备工具bootice.exe(引导山区维护的工具),grldr文件,menu.lst.还有u盘一个,
    启动bootice.exe->目标磁盘选中你的u盘->主引导记录-》grub4dos->安装/配置->(将禁止引导分区表无效的原住记录(通常。。。。引导扇区)打勾)->写入磁盘
    提示你要将grldr和menu.lst拷贝到根目录。。。ok照办~将这两个文件拷贝到u盘根目录下面。
    紧接着将ubuntu12.04.iso的镜像拷贝到u盘,还需要将ubuntu的镜像解压到u盘。
这实你u盘的根目录下有,ubuntu.iso,ubuntu的解压文件,grldr和menu.lst (注意这边需要将你的iso的名字更为与我的ubuntu.iso相同,这样你就不需要去更 改menu.lst了)
    用u盘启动然后选择ubuntu.iso就成功进入引导了。
这是一个ubuntu的安装教程很完整~
点击打开链接
引导pe只需要将u盘内的PE的iso重命名为pe.iso便可以然后就可以启动u盘了(将pe.iso拷贝到u盘)

以下下介绍一下我对memu.lst的修改
引导ubuntu镜像的menu.lst的修改
#title便是标题
title Parted Ubuntu2 ISO
#导入的镜像在哪里 用map来指引 而(hd0,0)这边指的是你的u盘而此时你的硬盘是hd1了
map (hd0,0)/ubuntu.iso (0xff) || map --mem (hd0,5)/ubuntu.iso (0xff)
map --hook
chainloader (0xff)
如果不小心将引导弄坏了ubuntu引导了只需要按照下面的代码进行增加就可以引导boot了  
title UbuntuOs
root (hd0,5) #这边指示你的根目录为你boot所在的分区
#加载内核是/boot/vmli..server-generic的版本   重新在指定你的根分区此时是 用逻辑分区的表示
kernel /boot/vmlinuz-3.2.0-32-generic root=/dev/sda6 ro quiet splash
#加载img 一样只需要更改你的版本initrd /btitle UbuntuOs
bootoot/initrd.img-版本-generic
initrd /boot/initrd.img-3.2.0-32-generic
quiet
savedefault
boot


我的menu.lst

# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.

color blue/green yellow/red white/magenta white/magenta
timeout 30
## menu border color
color border=0xEEFFEE
## set vbe mode
graphicsmode -1 640 480:800
## loading splashimage
splashimage /boot/grub/splashimage.xpm || splashimage /boot/grub/splashimage.bmp
default /default
## Menu AutoNumber
write 0x8274 0x2001

title find and load NTLDR of Windows NT/2K/XP\n find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies --ignore-cd /ntldr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
savedefault --wait=2

#iftitle only show when command in [] returns true
# set a variable named bootmgr where /bootmgr is found.
iftitle [find --set-root --devices=h /bootmgr && call set bootmgr=%@root^%] load BOOTMGR of Windows VISTA/WIN7/WIN2008 on %bootmgr%
chainloader %bootmgr%/bootmgr
savedefault --wait=2

title find and load CMLDR, the Recovery Console of Windows NT/2K/XP
fallback 3
find --set-root --ignore-floppies --ignore-cd /cmldr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /cmldr
chainloader /cmldr
#####################################################################
# write string "cmdcons" to memory 0000:7C03 in 2 steps:
#####################################################################
# step 1. Write 4 chars "cmdc" at 0000:7C03
#write 0x7C03 0x63646D63
# step 2. Write 3 chars "ons" and an ending null at 0000:7C07
#write 0x7C07 0x00736E6F

#	or.
#write --offset=3 (md)0x3e+1 cmdcons
#	or
calc *0x7c03=0x00736E6F63646D63

savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
fallback 4
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2
# you can also use below commands.
# find --set-root chainloader /io.sys
# boot
# the boot is necessary,
# please see "Delimitors or comments between titles" in grub4dos_readme.txt.

title UbuntuOs
 root (hd1,5)  
 kernel /boot/vmlinuz-3.2.0-32-generic root=/dev/sda6 ro quiet splash
 initrd /boot/initrd.img-3.2.0-32-generic
 quiet
 savedefault
 boot

title find and boot MicroPE.ISO
fallback 6
find --set-root /PE.ISO
map /PE.ISO (0xff) || map --mem /PE.ISO (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2


title Parted UbuntuD ISO
map (hd0,0)/ubuntu.iso (0xff) || map --mem (hd0,0)/ubuntu.iso (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title Parted Ubuntu ISO
fallback 7
find --set-root /ubuntu.iso
map /ubuntu.iso (0xff) || map --mem /ubuntu.iso (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title commandline
commandline

title System
find --set-root (hd1,1)/bootmgr
chainloader /bootmgr

title floppy (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
# or use below commands.
# rootnoverify (fd0)
# chainloader +1

title back to dos
quit

title reboot
reboot

title halt
halt

title MAXDOS.IMG
find --set-root --ignore-floppies /boot/MAXDOS.IMG
map --mem /boot/MAXDOS.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
哪里不清楚可以留言嘻嘻


      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值