linux双系统启动引导,linux windows 双系统并存与启动引导
發(fā)現(xiàn)網(wǎng)站這類文章不好找 找到的分析也不太詳細(xì)???? 小弟不才今天就寫這么一個(gè)文章
PS: 文章是否保留出處屬于個(gè)人意愿 本人不喜歡強(qiáng)制要求
一般安裝WINDOWS 和 LINUX 并存的有兩種方式
1: 先安裝windows xp???? 在安裝LINUX???? 靠 LINUX 的grub 來選擇引導(dǎo)兩個(gè)
2: 先安裝LINUX 在安裝WINDOWSXP???? 靠 WINDOWS XP C盤根目錄下的 boot.ini 來引導(dǎo) grub FOR DOS (這個(gè)是個(gè)軟件可以下載到) 在引導(dǎo)LINUX
我的硬盤情況
/media/hda1???????? //WINDOWS C盤的
/media/hda2???????? //硬盤擴(kuò)展分區(qū)
/media/hda3???????? // LINUX SWAP 分區(qū)
/media/hda4???????? // LINUX 根分區(qū)/
/media/hda5???????? //WINDOWS D盤的
………………………………………………………………………………………………………………………………
一些補(bǔ)充: LINUX 設(shè)備中 第一塊ATA 硬盤 為hda 第一個(gè)分區(qū)為 hda1
hda1-4都為主分區(qū)???? hda5 開始為邏輯分區(qū)
………………………………………………………………………………………………………………………………
先講第一種情況 先安裝 WINDOWS XP 在安裝 LINUX 的
這種出現(xiàn)比較常見的情況 就是 可以引導(dǎo)LINUX 但是不了WINDOWS
這個(gè)原因是 LINUX 最后安裝重新刷新了 mbr(主引導(dǎo)記錄)???? grub 的配置不正確或者 grub 無法識(shí)別 WINDOWS 分區(qū)
出現(xiàn)這樣的情況解決辦法就是重新修改grub 配置文件
這個(gè)文件一般在LINUX 分區(qū)????? /boot/grub/.conf?????? 或者/boot/grub/menu.lst 詳細(xì)根據(jù)LINUX發(fā)行版本不同而不同
………………………………………………………………………………………………………………………………
補(bǔ)充:.conf 為隱藏文件 需要用ls -a 命令可以看見 或者在 X WIN 設(shè)置顯示隱藏文件也可見
一些人分區(qū)直接 就一個(gè)根分區(qū) / 和 SWAP 就完了 這樣不科學(xué) 建議設(shè)置一個(gè)/BOOT 分區(qū) 方便以后好恢復(fù)
如果沒有分/boot 分區(qū)????? 默認(rèn)的路徑就是/grub
………………………………………………………………………………………………………………………………
那么怎么來修改這個(gè)配置文件~??????? 看個(gè)例子~以下是我計(jì)算機(jī)上的grub 配置文件
# 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 default entry to 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 change this entry to 'saved' 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????????? 10?????????????????????? //超時(shí)時(shí)間
## 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=39578435-c0d9-45c6-bb67-a147d26bee3a ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,1)
## 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
## 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
## ## End Default Options ##??????? // LINUX 引導(dǎo)配置
title????????? Ubuntu, kernel 2.6.20-16-generic
root????????? (hd0,1)
kernel????????? /vmlinuz-2.6.20-16-generic root=UUID=39578435-c0d9-45c6-bb67-a147d26bee3a ro quiet splash
initrd????????? /initrd.img-2.6.20-16-generic
quiet
savedefault
title????????? Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root????????? (hd0,1)
kernel????????? /vmlinuz-2.6.20-16-generic root=UUID=39578435-c0d9-45c6-bb67-a147d26bee3a ro single
initrd????????? /initrd.img-2.6.20-16-generic
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title????????? Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS????? //windows 系統(tǒng)引導(dǎo)配置
# on /dev/hda1
title????????? Windows NT/2000/XP
root????????? (hd0,0)
savedefault
makeactive
chainloader????? +1
………………………………………………………………………………………………
#號(hào)是注釋掉的部分 沒用
………………………………………………………………………………………………
linux 引導(dǎo)配置
第一個(gè)是 title名字???? - -|~ 可以不鳥
第二個(gè)是root 系統(tǒng)所在 磁盤分區(qū)?????? hd0,1表示 hda2???? hd0,0 表示 hda1
第三個(gè)是kernel 加載內(nèi)核路徑???? 以及參數(shù)
第四個(gè)是 initrd???? 系統(tǒng)進(jìn)程
………………………………………………………………………………………………
windows引導(dǎo)配置
第一個(gè)是title????????? Windows NT/2000/XP
第二個(gè)是root 系統(tǒng)所在 磁盤分區(qū)?????? hd0,0????? 就是 hda1 c盤
………………………………………………………………………………………………
其他沒什么好講了 就根據(jù)自己的硬盤分區(qū)情況 改修里面的配置文件就可以實(shí)現(xiàn)雙系統(tǒng)啟動(dòng)了
建議C盤的 格式為FAT32 不然一些grub 確實(shí)無法識(shí)別~
第二種情況:
先安裝LINUX 在安裝WINDOWSXP???? 靠 WINDOWS XP C盤根目錄下的 boot.ini 來引導(dǎo)
這個(gè)情況個(gè)因?yàn)閣indwsxp 最后安裝 所以造成重刷MBR 是引導(dǎo)的 WINDOWS
需要來修改C 盤下的配置文 件boot.ini來實(shí)現(xiàn) 雙系統(tǒng)引導(dǎo)???? 還需要一個(gè)軟件 grub for dos
把grub for dos 下載下來之后 有 一個(gè)grldr 這個(gè)文件沒后綴的???? 復(fù)制到c盤根目錄 以及一些相關(guān)文件都弄在C盤 在修改 bootini
[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=" Windows XP????? " /noexecute=optin /fastdetect
c:\grldr=" Linux?????? "
………………………………………………………………………………………………
c:\grldr=" Linux?????? "??????? 這個(gè)是后來添加的 當(dāng)然也可以改路徑
grub for dos 里面也有個(gè)配置文件 叫 menu.lst 根據(jù) 上面講的 grub 配置根據(jù)實(shí)際情況修改一下 就可以實(shí)現(xiàn)windows 引導(dǎo)LINUX 了
完~ - -|
總結(jié)
以上是生活随笔為你收集整理的linux双系统启动引导,linux windows 双系统并存与启动引导的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android实现qq邮箱多个图标效果
- 下一篇: 浙江杭州1040阳光工程叫家里人来投资违