新手问几个问题

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

新手问几个问题

#1

帖子 dgstrong » 2008-12-17 15:36

1、大家说的GRUB和grub4dos是不是一个软件?
2、我的硬盘80G,5,30,30作为XP使用,剩余10G分了200M做boot,4G做HOME,5G做/,1G做SWAP,安装时将引导安装在boot上,即HDA10,按照http://forum.ubuntu.org.cn/viewtopic.php?f=139&t=171840的做法,进XP按照帖子照做,尅是还是引导不起来,并且C盘没有MENU.LST文件啊,我想按照这样的方式来做,如何做才可以,谢谢!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 新手问几个问题

#2

帖子 billbear » 2008-12-17 15:58

grub4dos 官方下载 http://download.gna.org/grub4dos/grub4d ... -11-19.zip
解出里面的 grldr ,放在 c 盘根目录
在 c:\boot.ini 里添加 c:\grldr=ubuntu 并检查确认 boot.ini 里的 timeout 不为 0
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#3

帖子 dgstrong » 2008-12-17 18:34

已经按照你的做了还是不行啊!
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#4

帖子 dgstrong » 2008-12-18 9:02

没有MENU.LST文件,是不是需要新建一个啊?
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 新手问几个问题

#5

帖子 billbear » 2008-12-18 11:28

你就说一句不行怎么帮你?
提供尽量详细的信息
sekiqyq
帖子: 36
注册时间: 2008-07-23 21:49

Re: 新手问几个问题

#6

帖子 sekiqyq » 2008-12-18 11:45

新建一个menu.lst
viewtopic.php?f=139&t=167130里七楼的方法试试
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#7

帖子 dgstrong » 2008-12-18 13:38

多谢楼上的兄弟!我试一试!
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#8

帖子 dgstrong » 2008-12-18 16:25

# 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=cabd8e2a-56ca-4e31-8158-135f9d33bf35 ro locale=zh_CN

## default grub root device
## e.g. groot=(hd0,0)
# groot=3c5c5661-a1fa-4ad8-a893-ca12086b3870

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

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

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 3c5c5661-a1fa-4ad8-a893-ca12086b3870
kernel /vmlinuz-2.6.27-7-generic root=UUID=cabd8e2a-56ca-4e31-8158-135f9d33bf35 ro locale=zh_CN quiet splash
initrd /initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 3c5c5661-a1fa-4ad8-a893-ca12086b3870
kernel /vmlinuz-2.6.27-7-generic root=UUID=cabd8e2a-56ca-4e31-8158-135f9d33bf35 ro locale=zh_CN single
initrd /initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 3c5c5661-a1fa-4ad8-a893-ca12086b3870
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/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
chainloader +1

这是我的MENU.LST文件的内容,还是找不到,大家给看看!我应该在C:盘放GRLDR和GRUB两个文件吧,我的是8.10版本的
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#9

帖子 dgstrong » 2008-12-18 16:40

grub4dos 会找到并使用 linux 分区里的 menu.lst,所以不需要往 c 盘拷贝 menu.lst,除非遇到 linux 分区在大磁盘的末尾而恰好 bios 太老无法访问到那片区域的情况,如果是那样的话,光拷个 menu.lst 也没用,需要把内核和 initrd 一起拷过来,然后修改 c:\menu.lst ,从 windows 分区加载内核和 initrd。

8.10 出了点新情况,grub 新增了 uuid 命令,grub4dos 不再完全兼容新的 grub 了,它看不懂 menu.lst 里的 uuid 行,所以如果要往 c 盘拷 menu.lst,就要把 uuid 行改成老式的 root (hdx,y);如果不拷 menu.lst,把 linux 分区里 menu.lst 的 uuid 行注释掉就好。这样做还有问题,因为下次升级内核生成新的启动项的时候 menu.lst 里会新增新内核的启动项,仍然是使用 uuid 命令的,你要再次注释掉它;如果是拷贝 menu.lst 到 c 盘的,更麻烦,每次安装新内核以后要自己手动更新 c:\menu.lst。所以针对 8.10 的新情况,建议的方案是:

在 c:\ 下放置 grldr,修改 boot.ini;
c:\ 下自建 menu.lst,写
title ubuntu
root (hdx,y) #这里填 ubuntu grub (分区引导扇区代码)被安装到的分区
chainloader +1

就好了。从 grub4dos 又转入 ubuntu 的 grub,不用改变 ubuntu 的 menu.lst,也不用操心以后升级内核的事了--ubuntu 的 grub 总是明白 ubuntu 的 menu.lst 的。

BILLBEAR,“#这里填 ubuntu grub (分区引导扇区代码)被安装到的分区”这个需要怎么写?针对我贴的MENU.LST如何更改?多谢!
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 新手问几个问题

#10

帖子 billbear » 2008-12-18 17:16

你还没有把你的情况说清楚。
现在选 ubuntu 出来什么?
是进入
grub>
提示符吗?
如果是,输入
find /grub/menu.lst
信息是什么?
输入
root (hd0,按tab键
给出的分区信息是?
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#11

帖子 dgstrong » 2008-12-18 17:22

不是,选UBUNTU黑屏,然后出来说是由于硬件配置问题,WINDOWS无法启动。出现这个是不是我安装的分区太靠后了,我分了5,30,30,剩下的才给UBUNTU,是不是这样的不行?
附件
选择UBUNTU
选择UBUNTU
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 新手问几个问题

#12

帖子 billbear » 2008-12-18 20:00

这么重要的信息到 11楼你才说 ...
你确认你把 grldr 放在 c 盘了吗?
这样吧,你先进 xp ,到命令行下运行
dir c:\ /a

type c:\boot.ini
把输出信息拷贝上来看看。(在命令提示符窗口左上角-编辑-全选,复制)

然后,用 livecd 启动,给出
sudo fdisk -l
的输出信息。
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#13

帖子 dgstrong » 2008-12-19 8:36

billbear 写了:这么重要的信息到 11楼你才说 ...
你确认你把 grldr 放在 c 盘了吗?
这样吧,你先进 xp ,到命令行下运行
dir c:\ /a

type c:\boot.ini
把输出信息拷贝上来看看。(在命令提示符窗口左上角-编辑-全选,复制)

然后,用 livecd 启动,给出
sudo fdisk -l
的输出信息。
一开始没有的,只是黑屏,后来才出现,第一次接触LINUX,不了解啊。
dir c:\ /a

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\dgstrong>dir c: /a
驱动器 C 中的卷是 WINXP
卷的序列号是 AC09-8844

2008-12-18 17:12 <DIR> .
2008-12-18 17:12 <DIR> ..
2008-12-17 08:33 <DIR> Application Data
2008-12-18 16:15 <DIR> Cookies
2008-12-17 09:07 <DIR> Favorites
2008-12-18 15:35 173 layout.cfg
2005-06-08 09:41 <DIR> Local Settings
2005-06-08 10:20 <DIR> My Documents
2008-11-04 17:26 <DIR> NetHood
2008-12-18 17:46 2,621,440 NTUSER.DAT
2008-12-19 08:29 1,024 ntuser.dat.LOG
2008-12-18 17:46 98 ntuser.ini
2005-06-08 09:41 <DIR> PrintHood
2008-12-18 17:12 <DIR> Recent
2008-11-05 13:33 <DIR> SendTo
2005-06-08 10:09 <DIR> Templates
2005-06-08 10:44 <DIR> UserData
2005-06-08 09:41 <DIR> 「开始」菜单
2008-12-18 17:32 <DIR> 桌面
4 个文件 2,622,735 字节
15 个目录 3,240,558,592 可用字节

这里好像没有 grldr啊,可是在WINDOWS里面有的。

type c:\boot.ini
C:\Documents and Settings\dgstrong>type c:\boot.ini
[boot loader]
timeout=10
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"

另外我的C盘分区是NTFS格式的行不行?是不是这个的原因?
附件
1.JPG
dgstrong
帖子: 38
注册时间: 2008-10-31 20:15

Re: 新手问几个问题

#14

帖子 dgstrong » 2008-12-19 14:43

sudo fdisk -l 的运行结果:
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80060424192 bytes
240 heads, 63 sectors/track, 10341 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x74bb74bb

Device Boot Start End Blocks Id System
/dev/sda1 * 1 694 5246608+ 7 HPFS/NTFS
/dev/sda2 695 10341 72931320 f W95 Ext'd (LBA)
/dev/sda5 695 4856 31464688+ 7 HPFS/NTFS
/dev/sda6 4857 9018 31464688+ 7 HPFS/NTFS
/dev/sda7 9050 9178 975208+ 82 Linux swap / Solaris
/dev/sda8 9179 9695 3908488+ 83 Linux
/dev/sda9 9696 10341 4883728+ 83 Linux
/dev/sda10 9019 9049 234328+ 83 Linux

Partition table entries are not in disk order
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 新手问几个问题

#15

帖子 billbear » 2008-12-19 20:20

dir c: /a
我说的是 dir c:\ /a 来着。不过现在不需要了。
“c:\grldr=ubuntu"
把引号去掉。居然还有一个中文引号一个英文引号 :em06
回复