[问题]关于双系统menu.lst的配置

为当前最终发行版之前的所有版本提供支持
回复
sysboy
帖子: 75
注册时间: 2007-05-16 11:00
送出感谢: 0
接收感谢: 0

[问题]关于双系统menu.lst的配置

#1

帖子 sysboy » 2007-05-16 19:21

我的爱机有两个硬盘,一个SATA160G,分四个区,C,D,E,F四个区,CDE文件格式NTFS,F为FAT32格式
C:盘安装winxp系统,另外一个硬盘为IDE 40G,安装ubuntu,安装是手工划分分区,两个区,一个/,一个swap
自动生成的menu.lst如下,但是在启动时,没有ubuntu启动菜单,根据网上资料,我安装了grub4dos,把grldr和menu.lst拷贝到c:\,更改了boot.ini 加了行C:\grldr=“START GRUB4DOS”
启动后自动进入grub4dos菜单,但是无论ubuntu和winxp都无法进入,不知道怎么回事?由于是新手,请教各位帮忙一下,谢谢!




# 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 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

## 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=4432870a-6a3e-4895-b989-fe7d48ba7161 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

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=4432870a-6a3e-4895-b989-fe7d48ba7161 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=4432870a-6a3e-4895-b989-fe7d48ba7161 ro single
initrd /boot/initrd.img-2.6.20-15-generic

title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/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/sda1
title Microsoft Windows XP Professional
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
sysboy
帖子: 75
注册时间: 2007-05-16 11:00
送出感谢: 0
接收感谢: 0

#2

帖子 sysboy » 2007-05-17 15:08

希望高手给看看下,谢谢!
头像
sevk
帖子: 2059
注册时间: 2007-05-08 16:26
系统: arch
来自: 火星内核某分子内某原子核内
送出感谢: 20 次
接收感谢: 6 次
联系:

#3

帖子 sevk » 2007-05-17 15:56

其实装完UBUNTU,就有grub的,他的menu.lst在 /boot/grub/menu.lst
如果你现在又重新安装了grub4dos,那么menu.lst可能在C盘根目录。

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=4432870a-6a3e-4895-b989-fe7d48ba7161 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault

你说你ubuntu是装在第二个硬盘,那么这里第二行root (hd0,0) 就应该是root (hd1,0) 。。。
hd1,0才是第二个硬盘。
同样,你的XP那里:
title Microsoft Windows XP Professional
root (hd1,0) ----> 应该是 root (hd0,0) 。。。
头像
sevk
帖子: 2059
注册时间: 2007-05-08 16:26
系统: arch
来自: 火星内核某分子内某原子核内
送出感谢: 20 次
接收感谢: 6 次
联系:

#4

帖子 sevk » 2007-05-17 15:58

硬盘安装 LINUX VISTA XP 双系统 三系统
http://hi.baidu.com/sevk/blog/item/923d ... 457fd.html
头像
内存不足
论坛版主
帖子: 3277
注册时间: 2005-08-18 18:43
送出感谢: 0
接收感谢: 1 次
联系:

#5

帖子 内存不足 » 2007-05-17 17:44

我都是两个系统独立安装,装一个的时候把另一块硬盘拿掉。
在bios里设置ubuntu的那块硬盘启动
最后改一下 /boot/grub/menu.lst 去选择要默认进哪个系统
໌→ iCookie Gtk Theme
໌→DropPlusBluetheme
กรัก กรัก`菠萝
sysboy
帖子: 75
注册时间: 2007-05-16 11:00
送出感谢: 0
接收感谢: 0

#6

帖子 sysboy » 2007-05-17 20:55

两个硬盘,一个SATA160G,分四个区,C,D,E,F四个区,CDE文件格式NTFS,F为FAT32格式
C:盘安装winxp系统,另外一个硬盘为IDE 40G,安装ubuntu,安装是手工划分分区,两个区,一个/,一个swap
到底menu.lst是怎样的,虽然自动产生了,可是拷贝到c:\是无法启动的
头像
sevk
帖子: 2059
注册时间: 2007-05-08 16:26
系统: arch
来自: 火星内核某分子内某原子核内
送出感谢: 20 次
接收感谢: 6 次
联系:

#7

帖子 sevk » 2007-05-19 8:58

在grub4dos菜单那里按C,进入命令行。
输入:
root (hd1,0)
chainloader +1
boot

root (hd1,0)/ntldr
chainloader +1
boot

root (hd0,0)/ntldr
chainloader +1
boot

root (hd0,4)/ntldr
chainloader +1
boot

反正多试几个命令,肯定有一个能进系统,然后记下来,并写入menu.lst。
回复

回到 “老旧版本支持”