双硬盘,双系统出现的问题

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
logo09
帖子: 24
注册时间: 2005-11-01 8:59

双硬盘,双系统出现的问题

#1

帖子 logo09 » 2008-12-20 18:02

双硬盘,一个40G(hd0),IDE硬盘,一个320G(hd1),SATA硬盘;XP已装在320G硬盘上,用Ubuntu安装光盘也安装在320G硬盘。

问题:重启在系统引导菜单上进入XP或Ubuntu需要放任何一张光盘才能进去,如没光盘进入任何一个系统都会出现 error 22; No such partion... 的提示。

装了 grub4dos, 进入 grub 的命令窗口下输入 find /boot/grub/stage1 后提示 error 15: find not found.

如果要使用系统必须要放任何一张光盘才能进入。 请大虾们帮我看看怎么解决,谢谢。 
以下是我的 fdisk 命令和 menu.lst
fdisk -l:
root@constine-desktop:~# fdisk -l

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x328f328e

Device Boot Start End Blocks Id System
/dev/sda1 * 2 4865 39070080 f W95 Ext'd (LBA)
/dev/sda5 2 4865 39070048+ 7 HPFS/NTFS

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf0b1ebb0

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sdb2 1913 2001 714892+ 83 Linux
/dev/sdb3 2974 38912 288680017+ f W95 Ext'd (LBA)
/dev/sdb4 2002 2973 7807590 83 Linux
/dev/sdb5 3825 15297 92156841 7 HPFS/NTFS
/dev/sdb6 15298 26770 92156841 7 HPFS/NTFS
/dev/sdb7 26771 38912 97530583+ 7 HPFS/NTFS
/dev/sdb8 2974 3094 971869+ 82 Linux swap / Solaris
/dev/sdb9 3095 3824 5863693+ 83 Linux



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 10

## 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=71ecae5a-53b7-4140-b7d8-fec458df1638 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 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 8.04, kernel 2.6.24-16-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro quiet splash locale=zh_CN
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd1,1)
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd1,1)
kernel /memtest86+.bin
quiet

### 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
# on /dev/sdb1
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
上次由 logo09 在 2008-12-20 18:53,总共编辑 2 次。
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 双硬盘,双系统出现的问题

#2

帖子 aoskas » 2008-12-20 18:18

把grub4dos 的grldr和你的这个menu.lst 放在你的sda1的根下边!!就对了!
logo09
帖子: 24
注册时间: 2005-11-01 8:59

Re: 双硬盘,双系统出现的问题

#3

帖子 logo09 » 2008-12-20 18:29

谢谢, 请问 sda1 是不是指我的40G硬盘分区? 
头像
32idea
帖子: 1251
注册时间: 2006-12-15 9:32
系统: linux

Re: 双硬盘,双系统出现的问题

#4

帖子 32idea » 2008-12-20 18:32

如果主板bios支持的话,可以试着改变硬盘的启动顺序试试,(不知道你的grub写到哪个盘的mbr上了,估计这个方法不行,)

我觉得和你的光驱及硬盘的接入方式有关,只是猜测。(当有光盘的时候,你的320硬盘被系统认成hd1,当没有光盘的时候,320硬盘被系统认成了别的,)
logo09
帖子: 24
注册时间: 2005-11-01 8:59

Re: 双硬盘,双系统出现的问题

#5

帖子 logo09 » 2008-12-20 20:35

aoskas 写了:把grub4dos 的grldr和你的这个menu.lst 放在你的sda1的根下边!!就对了!
这方法试过了不行,出现 error 20 的提示。
1234qw
帖子: 389
注册时间: 2007-12-31 11:40

Re: 双硬盘,双系统出现的问题

#6

帖子 1234qw » 2008-12-20 22:33

比较笨的办法,光盘进系统重新安装GRUB到MBR
sudo grub
root (hd1,1)
setup (hd0)
---------------------
root (hd1,1)
setup (hd1)
两个硬盘的MBR都给它装上
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 双硬盘,双系统出现的问题

#7

帖子 aoskas » 2008-12-21 2:19

把你的menu.lst 改个名。新建一个menu.lst 内容如下。(条件你用的是grub4dos),

要是成功了。你就在你的root 下边放一个空文件 。取个名叫。nbuntu810.ck_
再改这一句
find --set-root /vmlinuz-2.6.24-16-generic为
find --set-root /nbuntu810.ck_
也在你的XP的根目录下放一个空文件 取名为xp.ck_
同样改这句。
find --set-root /ntldr 为
find --set-root /xp.ck_


这个引导要是成功。但是起不起启不了ubuntu 就是你的UUID的问题了!
那时再看了!


############################menu.lst#################
timeout 10
default 0

title Ubuntu 8.04, kernel 2.6.24-16-generic
find --set-root /vmlinuz-2.6.24-16-generic
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro quiet splash locale=zh_CN
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
#root (hd1,1)
find --set-root /vmlinuz-2.6.24-16-generic
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
#root (hd1,1)
find --set-root /vmlinuz-2.6.24-16-generic
kernel /memtest86+.bin
quiet

title Microsoft Windows XP Professional
#root (hd1,0)
find --set-root /ntldr
chainloader /ntldr
##########################end#############################
上次由 aoskas 在 2008-12-21 2:43,总共编辑 1 次。
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 双硬盘,双系统出现的问题

#8

帖子 aoskas » 2008-12-21 2:26

把这个menu.lst 放在你的40G的盘的第一个分区中。grldr也放在那里。
对了。你的grub4dos的引导是不是装在这个40G的盘的MBR中的??我也是二个盘。80G的老盘为sda
320的sata盘为。sdb 两个盘的MBR中都装入了grub4dos的引导!两个盘的第一分区中都只装了什么grldr.menu.lst 和PE之类的!引导的尚好!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 双硬盘,双系统出现的问题

#9

帖子 billbear » 2008-12-21 16:24

把 grub 装到 sata 上,bios 设置为从 sata 启动。然后
title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,1)
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro quiet splash locale=zh_CN
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,1)
kernel /vmlinuz-2.6.24-16-generic root=UUID=71ecae5a-53b7-4140-b7d8-fec458df1638 ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04, memtest86+
root (hd0,1)
kernel /memtest86+.bin
quiet

### 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
# on /dev/sdb1
title Microsoft Windows XP Professional
root (hd0,0)
#savedefault
#makeactive
#map (hd0) (hd1)
#map (hd1) (hd0)
chainloader +1
回复