登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

lgjmfyx的博客

享受生活每一天

 
 
 

日志

 
 

xp和ubuntu双系统启动   

2008-08-11 18:22:49|  分类: 技术技巧 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

xp和ubuntu双系统启动

其实我想每一个装ubuntu的人一开始可能并不想抛弃xp,更多是想双操引导,双系统启动。我是物理隔离下安装的xp和ubuntu,所以当我把两个硬盘都插上电脑的时候,双系统启动肯定是要设置了才可以。前两篇介绍的如何安装和加快更新速度。这篇其实更是急迫一些。下面详细介绍如何双系统启动。
我的xp是安装在sata的250GB硬盘上,ubuntu是安装在ide的80GB的硬盘上。两个系统都是在物理隔离(拔了另一个电源线)的情况下安装的。当然下面的方法对于在一个硬盘安装的双系统,也是可以用的。
首先,到ubuntu的/boot/grub复制menu.lst文件到u盘(如果你的u盘中毒了,可以看我的另一篇),如果你没有u盘可以上传到网络硬盘或者你的邮箱。
然后去下载一个名叫glrldr的文件,如果你找不到,或者觉得网络上的不可靠,可以找我要。我的这个至少我用的很好,可以引导双操启动。
然后进windows xp,把刚刚说的两个文件都拷贝到c盘的根目录下。然后显示所有隐藏文件和系统文件。找到一个叫boot.ini的文件,在这个文件上点右键,将只读取消,然后打开这个文件,在最后换行加入一句话C:\grldr=ubuntu 7.10
下面是我的boot.ini的内容(两个-------之间的内容,不包括------------)
---------------------------------------------------------------
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
C:\grldr=ubuntu 7.10
--------------------------------------------------------------


这样基本的事情做完了。但是有一个地方要改改才能顺利启动ubuntu。
下面是我的menu.lst的原始文件的内容。

---------------------------------------------------------


# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default        0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout        3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title        Windows 95/98/NT/2000
# root        (hd0,0)
# makeactive
# chainloader    +1
#
# title        Linux
# root        (hd0,1)
# kernel    /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=b6038bb7-6d4a-4f78-a071-adbb6459113a ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash locale=zh_CN

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title        Ubuntu 7.10, kernel 2.6.22-14-generic
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.22-14-generic root=UUID=b6038bb7-6d4a-4f78-a071-adbb6459113a ro quiet splash locale=zh_CN
initrd        /boot/initrd.img-2.6.22-14-generic
quiet

title        Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.22-14-generic root=UUID=b6038bb7-6d4a-4f78-a071-adbb6459113a ro single
initrd        /boot/initrd.img-2.6.22-14-generic

title        Ubuntu 7.10, memtest86+
root        (hd0,0)
kernel        /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST


-------------------------------------------------------------------------------------
我没有删除注释部分。下面是我改后的(只贴了部分),已经用红色黑体并大了一号。原来是0的地方,我改成了1。下面讲一下为什么。这个hd(数字一,数字二),数字一是指第几块硬盘,数字二是指第几个分区。因为我的ubuntu安装在第二块硬盘第一个分区所以是1,0(这个数字是从0开始的),所以大家可以依葫芦画瓢。只有一块硬盘的第一个数字肯定是0,后面的分区数字大家可以试试,很容易就可以启动了。
itle        Ubuntu 7.10, kernel 2.6.22-14-generic
root        (hd1,0)
kernel        /boot/vmlinuz-2.6.22-14-generic root=UUID=b6038bb7-6d4a-4f78-a071-adbb6459113a ro quiet splash locale=zh_CN
initrd        /boot/initrd.img-2.6.22-14-generic
quiet

title        Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root        (hd1,0)
kernel        /boot/vmlinuz-2.6.22-14-generic root=UUID=b6038bb7-6d4a-4f78-a071-adbb6459113a ro single
initrd        /boot/initrd.img-2.6.22-14-generic

title        Ubuntu 7.10, memtest86+
root        (hd1,0)
kernel        /boot/memtest86+.bin
quiet


通过上面的工作,在开机之后会在进入xp的有两个选项(大概就是下面的样子),选下一个进可以进ubuntu了。那个ubuntu 7.10是自己写的,可以在boot.ini里随便改成什么。

Microsoft Windows XP Professional
ubuntu 7.10

下面再总结一下,首先要有两个文件glrldr(可以找我要)和menu.lst(自己的ubuntu文件,要改动内容)都放在c盘根目录。改动boot.ini,就可以启动了。其实非常容易就可以做到双系统引导了。

btw:昨天的那个地图update貌似feed没有更新,所以,再贴一次。

[A] Recommended code to include in your page (hint: click below and use CTRL+A to select ALL):

[B] Simple (for those with site or hosting restrictions):


[C] Advanced (for those requiring true W3C XHTML1.1 validation)
(please note that it needs to be embedded in a valid XHTML1.1 document to work correctly):

[D] Minimalist (for MySpace and other sites needing the plainest code):




引文来源  xp和ubuntu双系统启动 - petcon - 网易博客

----------------------------
一键转贴,快速捕捉生活精彩,赢每周好礼!查看活动首页>>

  评论这张
 
阅读(460)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018