主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
luchang
帖子: 14
注册时间: 2008-10-07 7:17

主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#1

帖子 luchang » 2008-10-12 21:36

1.两个硬盘都插上的话,用光盘不能安装。 详细: viewtopic.php?f=77&t=154994
出现的是:BUSYBOX V1.1.3
INITRANFS [215.967524]ATA1.00
^^^^^^^^^^^
^^^^^^^^^^^
n
^^类似上面的一串数字
2.我拔了主盘(IDE0) 。光盘安装ubuntu8.04在从盘。成功。重启后能进ubuntu8.04。开关机速度真快啊。想想winxp进入系统等啊等的。
3.插上主盘,bios设置第一启动主盘。能进xp. bios设置第一启动从盘,在 ubuntu8.04的--滚动条来回的滚动--不能进入桌面。
过了十来分钟同1的情况出现:BUSYBOX V1.1.3
INITRANFS [215.967524]ATA1.00
^^^^^^^^^^^
^^^^^^^^^^^
n
4拔了主盘,在ubuntu8.04系统里。把BOOT复制在本地磁盘里。
5插上主盘,在xp里把ubuntu8.04的BOOT剪切黏贴在c:
下载grub4dos,黏贴 grldr文件也放到C盘。
然后修改boot.ini 再最后加入一句 C:\grldr=ubuntu 结果同2

6再最后加入一句 C:\grldr=grub 光标移动到某个ubuntu启动项,按e键进行编辑,把 root (hd0,x) 那一行按d删掉,然后按b启动 这个也不行。

折腾了两天还是不能双启动。只能发帖求助了。不好意思了。
GOOGLE了很多,一个LINUX论坛的教程和我的基本一样的情况,用的也是grub4dos,这个是自动搜索的。我也看到了root (hd1,1),以为成功了
还是在滚动条上滚啊滚,进不去……
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#2

帖子 aoskas » 2008-10-13 10:37

6再最后加入一句 C:\grldr=grub 光标移动到某个ubuntu启动项,按e键进行编辑,把 root (hd0,x) 那一行按d删掉,然后按b启动 这个也不行。

试一下.改这一句为:
root (hd1,0)
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#3

帖子 luchang » 2008-10-14 16:00

谢谢楼上回家试试 :em01
strikefreedom
帖子: 9
注册时间: 2008-06-21 18:59

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#4

帖子 strikefreedom » 2008-10-16 8:10

修复主盘的分区表试一下
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#5

帖子 luchang » 2008-10-22 20:05

strikefreedom 写了:修复主盘的分区表试一下
先谢了。怎么修复主盘的分区表呢。



改为root (hd1,0)也不行

进到ubuntu的滚动条就一直滚啊滚
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#6

帖子 luchang » 2008-10-22 20:17

让我想起了:我装ubuntu之前在hd0的第二个分区装过vista.
后来重装了(hd0,1)上的xp-sp3。
双系统菜单就没有了。
由于老机子,进入vista要7分钟之久。也没有再用v的冲动了。
之后学装ubuntu.直接格式化了主盘的第二分区。(这里是不是破坏了主盘的分区表。可我不会修复。)谁能教教我。也google,么有整明白
拔了hd0的电源线。在从盘装了u.
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#7

帖子 aoskas » 2008-10-24 12:12

把整个的MENU.LST贴出来...我的与你情况差不多...我的如下.你自看一下.还是有问题就把你整个的MENU.LST贴出来

timeout 10

default 1



find --set-root /wyboot.ck_

fontfile /minipe/boot/fonts.gz

splashimage /minipe/boot/grass.gz



title 【00】 启动本机Microsoft Windows 2008 (h0,0)

find --set-root /yyk2008.ck_

chainloader /BOOTMGR



title 【00】 启动本机Microsoft Windows 2003 (h0,0)

find --set-root /yyk2003.ck_

chainloader /ntldr



title Puppy Linux

find --set-root /wyboot.ck_
kernel (hd0,3)/puppy/vmlinuz root=/dev/ram0

initrd (hd0,3)/puppy/initrd.gz



title Ubuntu 8.04.1 --2.6.24-21

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=/dev/sdb1 ro quiet splash

initrd /boot/initrd.img-2.6.24-21-generic

quiet



title Ubuntu 8.04.1 --2.6.24-19

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro quiet splash

initrd /boot/initrd.img-2.6.24-19-generic

quiet



title Ubuntu 8.04.1 (rec)

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro single

initrd /boot/initrd.img-2.6.24-21-generic

quiet





title 【00】 启动本机Microsoft Windows 2003 (h0,0)

rootnoverify (hd0,0)

makeactive

chainloader +1



title 【00】 启动本机 HD1,1 (USB-HDD)

mem map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,1)

makeactive

chainloader +1



title 【00】 启动本机 HD1,2 (USB-HDD)

mem map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,2)

makeactive

chainloader +1



title 【00】 启动老九 WinPE 老毛桃修改之撒手不管版(Build 070911)

find --set-root /wyboot.ck_

chainloader /minipe/ldrxpe
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#8

帖子 luchang » 2008-10-25 20:32

aoskas 写了:把整个的MENU.LST贴出来...我的与你情况差不多...我的如下.你自看一下.还是有问题就把你整个的MENU.LST贴出来

timeout 10

default 1



find --set-root /wyboot.ck_

fontfile /minipe/boot/fonts.gz

splashimage /minipe/boot/grass.gz



title 【00】 启动本机Microsoft Windows 2008 (h0,0)

find --set-root /yyk2008.ck_

chainloader /BOOTMGR



title 【00】 启动本机Microsoft Windows 2003 (h0,0)

find --set-root /yyk2003.ck_

chainloader /ntldr



title Puppy Linux

find --set-root /wyboot.ck_
kernel (hd0,3)/puppy/vmlinuz root=/dev/ram0

initrd (hd0,3)/puppy/initrd.gz



title Ubuntu 8.04.1 --2.6.24-21

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=/dev/sdb1 ro quiet splash

initrd /boot/initrd.img-2.6.24-21-generic

quiet



title Ubuntu 8.04.1 --2.6.24-19

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro quiet splash

initrd /boot/initrd.img-2.6.24-19-generic

quiet



title Ubuntu 8.04.1 (rec)

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro single

initrd /boot/initrd.img-2.6.24-21-generic

quiet





title 【00】 启动本机Microsoft Windows 2003 (h0,0)

rootnoverify (hd0,0)

makeactive

chainloader +1



title 【00】 启动本机 HD1,1 (USB-HDD)

mem map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,1)

makeactive

chainloader +1



title 【00】 启动本机 HD1,2 (USB-HDD)

mem map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,2)

makeactive

chainloader +1



title 【00】 启动老九 WinPE 老毛桃修改之撒手不管版(Build 070911)

find --set-root /wyboot.ck_

chainloader /minipe/ldrxpe




谢ls的大侠
是c盘的MENU.LST吗?
# This is a sample menu.lst file. You should make some changes to it.
# Added items for installing GRUB [ which is on your DOS drive C: ] to MBR

color black/cyan yellow/cyan
timeout 60
default 0

title DOS/Win9x/Me/NT/2K/XP on (hd0,0)
root (hd0,0)
chainloader +1

title Mandrake Linux on (hd0,7)
kernel (hd0,7)/boot/vmlinuz root=/dev/hda8 quiet devfs=mount acpi=ht vga=788
initrd (hd0,7)/boot/initrd.img

title Red Hat Linux on (hd0,8)
kernel (hd0,8)/boot/vmlinuz root=/dev/hda9

title floppy on (fd0)
root (fd0)
chainloader +1

title DOS/Win9x on (hd1,0) -- Do not use this to start WinMe/2K or later
pause Warning: drive map used. Press any key to start DOS/Win9x on (hd1,0)...
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1

title DOS/Win9x on (hd2,0) -- Do not use this to start WinMe/2K or later
pause Warning: drive map used. Press any key to start DOS/Win9x on (hd2,0) ...
root (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)
makeactive
chainloader +1

title install GRUB on (hd0,0) to MBR (hd0) and reboot. Password: danger
pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install GRUB in (hd0,0)/boot/grub/ to MBR. Press any key to begin...
root (hd0,0)
setup (hd0)
pause GRUB install OK! Press any key to reboot your machine...
reboot

title install GRUB on (hd0,1) to MBR (hd0) and reboot. Password: danger
pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install GRUB in (hd0,1)/boot/grub/ to MBR. Press any key to begin...
root (hd0,1)
setup (hd0)
pause GRUB install OK! Press any key to reboot your machine...
reboot

title install GRUB on (hd0,2) to MBR (hd0) and reboot. Password: danger
pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install GRUB in (hd0,2)/boot/grub/ to MBR. Press any key to begin...
root (hd0,2)
setup (hd0)
pause GRUB install OK! Press any key to reboot your machine...
reboot

title install GRUB on (hd0,3) to MBR (hd0) and reboot. Password: danger
pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install GRUB in (hd0,3)/boot/grub/ to MBR. Press any key to begin...
root (hd0,3)
setup (hd0)
pause GRUB install OK! Press any key to reboot your machine...
reboot

title mandrake ISO install (using vmlinuz and all.rdz)
pause Installing an OS is dangerous because it may overwrite all your disks(and partitions)! A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install Mandrake using iso files. Press any key to continue...
kernel (hd0,0)/vmlinuz ramdisk_size=128000 root=/dev/ram3 automatic=method:disk acpi=ht vga=788
initrd (hd0,0)/all.rdz
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#9

帖子 aoskas » 2008-10-25 21:22

看了半天.没有看见你的menu.lst...也就是没有看见你要启动的ubuntu在你的menu.lst中的反应!.我的是在WINDOWS中(或PE中)把grub4dos写入C盘的MBR中的.那么它在启动后.就会在盘中的各个分区的根目录下依次找.grldr这个文件.找到后.加载对应分区根目录下的menu.lst (以找到的第一grldr个为准).没有找到这个menu.lst.就加载内置的menu.lst.在ubuntu中.怎么写入mbr一时还没有会...但是.这个原理是一样的.你现在需在C盘中写入GRUB到mbr.并COPY 对应的grldr到根目录下.哪个分区没有关系.(我的在hd0.1中.与PE在一起的)...同时编一下.menu.lst 看一下其它人的menu.lst就会的..要是还有问题的话.再把你编的贴上来..但愿没有!!!
windows 下写入grub4dos 到mbr的工具和方法...在无忧启动论坛上找一下...
ubuntu 下怎么写入..这里的高人有的是.你自问一下吧.我不会.(才用ubuntu一个月)
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#10

帖子 luchang » 2008-10-25 21:35

timeout 10

default 1



find --set-root /wyboot.ck_

fontfile /minipe/boot/fonts.gz

splashimage /minipe/boot/grass.gz


title WinXp
rootnoverify (hd0,0)
chainloader +1




title Ubuntu 8.04.1 --2.6.24-21

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=/dev/sdb1 ro quiet splash

initrd /boot/initrd.img-2.6.24-21-generic

quiet



title Ubuntu 8.04.1 --2.6.24-19

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro quiet splash

initrd /boot/initrd.img-2.6.24-19-generic

quiet



title Ubuntu 8.04.1 (rec)

root (hd1,0)

kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro single

initrd /boot/initrd.img-2.6.24-21-generic

quiet

前面自己加的,后面抄了你的。能进到UBUNTU的滚动条。不能进去。后变成一串一串的数字
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#11

帖子 aoskas » 2008-10-25 22:56

UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 这个你要改.你的UUID与我的不一样.我的这个是装GHOST ubuntu 8.04后的...你的应不一样.
我也是为了不要这个东西改的.root=/dev/sdb1 当这个不对时.就只有ubuntu的条子在滚动...进去不了.这个我试过
1....法.你进入一下你的ubuntu 看一下这个UUID (怎么看还要自已.我还不会.)....就用.root=uuid=xxxxxxxxxxxxxxxxxxxxx...看一下怎么样...内核是21的.还是.19的..还是什么的..你自改一下...
2..法.进入你的ubuntu.看一下.你的ubuntu..在/dev/sdb1.还是什么位置...用.root=/dev/xxx......再试一下吧.


还不成只有问这里的ubuntu的高手了.
luchang
帖子: 14
注册时间: 2008-10-07 7:17

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#12

帖子 luchang » 2008-10-26 8:31

aoskas 写了:UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 这个你要改.你的UUID与我的不一样.我的这个是装GHOST ubuntu 8.04后的...你的应不一样.
我也是为了不要这个东西改的.root=/dev/sdb1 当这个不对时.就只有ubuntu的条子在滚动...进去不了.这个我试过
1....法.你进入一下你的ubuntu 看一下这个UUID (怎么看还要自已.我还不会.)....就用.root=uuid=xxxxxxxxxxxxxxxxxxxxx...看一下怎么样...内核是21的.还是.19的..还是什么的..你自改一下...
2..法.进入你的ubuntu.看一下.你的ubuntu..在/dev/sdb1.还是什么位置...用.root=/dev/xxx......再试一下吧.


还不成只有问这里的ubuntu的高手了.
啊,兄弟。这真是个热心人。一直在论坛给我指导。
而且我的困惑你也经历过。
不管怎么样真是要交你这个朋友。
我的QQ:20755127
我在努力试试。谢谢
还有一点疑惑:我在IT168上看到。两个硬盘不是在一条数据线上的话,那就不是主从盘的关系。我的两个硬盘不在同一条数据线上
aoskas
帖子: 249
注册时间: 2007-11-06 13:56

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#13

帖子 aoskas » 2008-10-26 11:06

以下是我的过程.写在盛世雄风上了.可惜没有人看!...LZ 看一下吧..或许有点帮助!

装GHOST版.ubuntu 8.04到任意盘的任意分区的启动方法:
缘起
因本人的机器装有两个老的ATA 硬盘.装有2003.2008操作系统.前在三个分区中装有PE.为了这些东西不相互影响.就只有一个方法.GRUB启动.在MENU.LST上多想点办法.当然.2008的启动要用工具软件先把其中的2003的启动项删了.才能用.这个另说了.所在.在本人的盘中.有三个分区中有MENU.LST 这个是不可能都改名或删了的.也不可能都内置了.内置了不方便.所以就只能在现有的GRUB4DOS启到后的MENU.LST上想办法了.

误解与弯路
习惯了WINDOWS的启到方式.第一个想到的就是在MENU.LST中加一句.用GHOST回去的分区启到.本人是GHOST到第二盘的第4分区的.(不知为什么第三分区没有见到了.这是后话).也就是加.

title 【00】 启动本机 HD1,2 (1HDD_UBUNTU)
mem map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,3)
makeactive
chainloader +1

结果是可想而知的. LINUX就不是用这个分区自引导的.它是一定要用GRUB引导的.
上边的不可启动.我就又来了点"灵感"!用PE启到windows的方法,写下了又一个错误.改为:

title 【24】 测试 lxldr
find --set-root /lxldr
chainloader /lxldr
这样的灵感太灵了.但这次例外!

分析与学习

这下是没有法了.只有来分析上边说到的LXLDR了.先用grubediter这个东西.打开LXLDR的内置菜单.其如下.

default 1
timeout 1
fallback 1

title find /memu.lst
find --set-root --ignore-floppies /memu.lst
configfile /memu.lst

title find /boot/grub/menu.lst
fallback 2
find --set-root --ignore-floppies /vmlinuz
configfile /boot/grub/menu.lst

title find /grub/menu.lst
fallback 3
find --set-root --ignore-floppies /grub/menu.lst
configfile /grub/menu.lst

title commandline
commandline

title reboot
reboot

title halt
halt

结果是它要在装了这个UBUNTU盘的根下去一个叫VMLINUZ的文件.
但这个文件是干什么用的.怎么用法.就百思不得其解了.这时就满网上的转.查了这个查那个.真个是"上穷碧落下黄泉,两处茫茫皆不见"..无法.又打开 WINPE想看一下这个EX3分区是不是主分区.是不是活动的.有问题没有.无意间有了一个发现.老毛桃的WINPE 0911版的内核还能看见这个EX3的文件.一阵狂喜后又是大悲.能看见.但是打不开文件.没有法了.
只能退而求其次.装个其它版的吧.越小越好.主要是为了试一下启动的问题.还是网上狂搜.搜了一个
Puppy Linux.看了说明.它有硬盘上装的方法.见其法为.


kernel (hd0,X)/puppy/vmlinuz root=/dev/ram0
initrd (hd0,X)/puppy/initrd.gz

马上照单抓药.写为
title Puppy Linux
kernel (hd0,3)/puppy/vmlinuz root=/dev/ram0
initrd (hd0,3)/puppy/initrd.gz
启到这个选项.还真成功了.进入.看了一下本人的硬盘.没有什么问题.想来用这个启到UBUNTU一定也会对.

写下

title 【24】 测试
kernel (hd1,3)/boot/vmlinuz root=/dev/hdc4
initrd (hd1,3)/boot/initrd.img
结果还是有问题.这时才想起来.用上边的puppy linux去看一下LXLDR中要求的UBUNTU启上的. /root/grub/meun.lst
进去后.才明白...把它中的我要的一段COPY出来.为.


title 【24】 测试
root (hd1,3)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=112d6f08-9a31-43f8-8a17-89e46ba65e17 ro quiet splash


initrd /boot/initrd.img-2.6.24-19-generic quiet

这回真是成功了.

总结:
这个GHOST的UBUNTU可以装到任何的分区也能装到U盘.条件是要在主盘中能启动GRUB.要改动的只是装入的分区[也就是要改的是 (hdx,y) 中的x.y这两个数.]和root=UUID=后边的这串码子.来源当从UBUNTU分区中的 root/grub/menu.lst中去找!!

以上是本人的学习过程.能对看家有点小用就算是没有白写了.
题外:
grub4dos: 去这里下. http://bbs.znpc.net/forumdisplay.php?fid=4
工具:写GRUB入MBR的工具 grubinst11w32 (这个是WINDOWS下用的) 去 http://bbs.wuyou.com/ 下.
GRUB内置菜编辑器. grubediter 去http://bbs.wuyou.com/ 下
deadleon
帖子: 13
注册时间: 2007-01-31 18:20

Re: 主盘-xp.从盘-ubuntu8.04。用grub4dos无法引导ubuntu8.04

#14

帖子 deadleon » 2008-10-26 16:05

主要是找boot下的两个镜像,uuid那个东西如果有就不用确定分区了,如果分区确定好引导是很简单的。grub中硬盘编号和分区从0开始,linux分区编号从1开始。加入从外置硬盘启动,则外置硬盘变为hd(0,*)。
回复