多LiveCD引导问题-GRUB2下的GRUB

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
zbclzf
帖子: 24
注册时间: 2010-01-13 19:56

多LiveCD引导问题-GRUB2下的GRUB

#1

帖子 zbclzf » 2010-02-03 13:38

我的问题描述如下:
以前是xp,后来装上了Linux Mint 8,下载grub4dos-0.4.4,解压其中的grldr文件放在C盘根目录下,将Linux Mint的ISO文件放在C盘根目录下,把iso中的casper/initrd.lz和casper/vmlinuz两个文件解压出来,放在C盘根目录下,创建menu.lst文件:
title Ubuntu 9.10 LiveCD
root (hd0,0)
kernel /vmlinuz boot=casper iso-scan/filename=/Ubuntu-9.10-desktop-i386.iso ro quiet splash locale=zh_CN.UTF-8
initrd /initrd.lz
boot
在Windows中,"我的电脑" 上点右键->属性->高级->启动和故障恢复右边的"设置"->上半部分的"编辑"出现用记事本打开的 boot.ini 文件。
在文件的末尾,加上一行
c:\grldr="GRUB"
保存文件,退出,重新启动,选择进入了GRUB,并安装Linux Mint成功,重启后第一个启动画面是GRUB2,是UBUNTU9.10自带的,能够正常进入Linux Mint,如果选择进入windows,出现列表,有xp,ghost(以前在xp下装的矮子DOS)和GRUB。
现在我下载了crunchbang-9.04.01.i386=Standard Edition - 32-bit.iso和xubuntu-9.10-desktop-i386.iso,和CDlinux_CE-0.9.5.iso想从GRUB中引导使用这三个LiveCD,修改的menu.lst如下
default 0
timeout 40

title =========1-XUbuntu install loader(Hard Driver=C)========
root (hd0,4)
kernel /vmlinuz APPEND file=/xubuntu/preseed/xubuntu.seed boot=casper
initrd /initrd.lz quiet splash

title =========2-XUbuntu install loader(Hard Driver=D)=======
root (hd0,4)
kernel (hd0,4)/casper/vmlinuz APPEND file=/xubuntu/preseed/xubuntu.seed boot=casper
initrd (hd0,4)/casper/initrd.lz quiet splash

title ============3-Xbuntu 9.10 LiveCD======================
root (hd0,4)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/xubuntu-9.04-desktop-i386.iso quiet splash ro locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.lz
title ===========4-Xbuntu 9.10 LiveCD======================
root (hd0,4)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/xubuntu-9.04-desktop-i386.iso quiet splash ro locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.lz
title ==========5Goback to Windows=========
root (hd0,0)
chainloader +1

title ==========6-crunchbang-9.04.01.i386=Standard Edition - 32-bit(Hard Driver)========
root (hd0,4)
kernel (hd0,4)/crunchban/casper/vmlinuz APPEND file=/crunchban/preseed/custom.seed boot=casper
initrd (hd0,4)/crunchban/casper/initrd.gz quiet splash


title ==========6-2-crunchbang-9.04.01.i386=Standard Edition - 32-bit(Hard Driver)========
root (hd0,4)
kernel (hd0,4)/crunchban/casper/vmlinuz APPEND file=/crunchban/preseed/custom.seed boot=casper
initrd (hd0,0)/initrd.lz quiet splash


title ============7-crunchbang-9.04.01.i386=Standard Edition - 32-bit LiveCD(c lz)============
root (hd0,4)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/crunchbang-9.04.01.i386=Standard Edition - 32-bit.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.lz



title ============8-crunchbang-9.04.01.i386=Standard Edition - 32-bit LiveCD(c gz)============
root (hd0,4)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/crunchbang-9.04.01.i386=Standard Edition - 32-bit.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,0)/initrd.gz


title ============9-crunchbang-9.04.01.i386=Standard Edition - 32-bit LiveCD(c gz)============
root (hd0,4)
kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/crunchbang-9.04.01.i386=Standard Edition - 32-bit.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,4)/crunchban/casper/initrd.gz quiet splash


title ==========10-LinuxMint-8-Universal(C Driver ISO)===================
root (hd0,0)
kernel /vmlinuz boot=casper iso-scan/filename=/LinuxMint-8-Universal.iso ro quiet splash locale=zh_CN.UTF-8
initrd /initrd.lz

title ===========11-LinuxMint-8-Universal(e Driver ISO)==================
root (hd0,5)
kernel /vmlinuz boot=casper iso-scan/filename=/LinuxMint-8-Universal.iso ro quiet splash locale=zh_CN.UTF-8
initrd /initrd.lz


title ============12-CDlinux LiveCD============
root (hd0,4)
kernel (hd0,4)/vmlinuz boot=casper iso-scan/filename=/CDlinux_CE-0.9.5.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,4)/initrd.lz

title ============13-CDlinux LiveCD============
root (hd0,4)
kernel (hd0,4)/vmlinuz boot=casper iso-scan/filename=/CDlinux_CE-0.9.5.iso ro quiet splash locale=zh_CN.UTF-8
initrd (hd0,4)/initrd.gz
title ===========14-Run CDLINUX============
root (hd0,4)
kernel (hd0,4)/cdlinux/CDlinux/bzImage rw quiet CDL_LANG=zh_CN.UTF-8 ramdisk_size=15000 root=/dev/ram0 rw
initrd (hd0,4)/CDlinux/autoboot/CDlinux vga=788
boot


其中的initrd.lz和initrd.gz都是从iso中提取的,crunchban中提取的是initrd.gz
但是启动总是不成功,请高手帮忙看看是不是这个menu.lst哪里写的不对,或是提取的vmlinuz与initrd.lz和initrd.gz路径不对。
非常感谢!
头像
kzw
帖子: 6
注册时间: 2009-02-07 15:17

Re: 多LiveCD引导问题-GRUB2下的GRUB

#2

帖子 kzw » 2010-02-03 14:11

root (hd0,4)
kernel (hd0,0)/……
initrd (hd0,0)/……


为什么分区不一样呢?
zbclzf
帖子: 24
注册时间: 2010-01-13 19:56

Re: 多LiveCD引导问题-GRUB2下的GRUB

#3

帖子 zbclzf » 2010-02-03 14:16

回楼上,我是在做实验,除了一个mint的iso在C盘,另一个mint的iso在e盘(两个ISO一样,如果放在e盘的也能用,就把c盘的mint的ISO删了,但是无法从e盘的mint的ISO启动),其他的iso和解压后的文件都在d盘,这么做是试试看到底哪个可以启动LiveCD
zbclzf
帖子: 24
注册时间: 2010-01-13 19:56

Re: 多LiveCD引导问题-GRUB2下的GRUB

#4

帖子 zbclzf » 2010-02-03 14:18

一旦指定了root (hd0,4),就不能够再指定其它盘根目录下或文件夹里的initrd.lz和vmlinuz了么?
头像
kzw
帖子: 6
注册时间: 2009-02-07 15:17

Re: 多LiveCD引导问题-GRUB2下的GRUB

#5

帖子 kzw » 2010-02-03 15:47

zbclzf 写了:一旦指定了root (hd0,4),就不能够再指定其它盘根目录下或文件夹里的initrd.lz和vmlinuz了么?
这下你问到我了,我也不知道,8过看下面那个链接貌似也可以这么用的。
-------
ROOT是GRUB识别硬盘和文件格式的命令,告诉GRUB下一步可以到那里找GRUB的配置文件,启动核心,或启动IMG文件等。

http://www.bitscn.com/linux/system_mana ... /7242.html
这里也使用了跟主楼类似的格式。

按理说应该是可以的。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 多LiveCD引导问题-GRUB2下的GRUB

#6

帖子 smallapple » 2010-02-03 22:41

看晕了。
内存够大不?用 map --mem ,不用解压那么多东东。
zbclzf
帖子: 24
注册时间: 2010-01-13 19:56

Re: 多LiveCD引导问题-GRUB2下的GRUB

#7

帖子 zbclzf » 2010-02-04 9:37

我的是老机,内存512的rambus,楼上的能否帮忙写下menu.lst,我是菜鸟,不知道mem怎么在grub中使用,非常感谢!
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 多LiveCD引导问题-GRUB2下的GRUB

#8

帖子 smallapple » 2010-02-04 10:09

512内存太小了,map --mem 用不了。

CDLinux的menu.lst

title CDLinux
root (hd0,4)
kernel /CDlinux/bzImage CDL_LANG=zh_CN.UTF-8
initrd /CDlinux/initrd

xubuntu的,把casper内的两个内核拷出来
title Xubuntu
root (hd0,4)
kernel /casper/vmlinuz boot=casper iso-scan/filename=/xubuntu-9.04-desktop-i386.iso quiet splash
initrd /casper/initrd.lz

crunchbang-9.04.01.i386=Standard Edition没见过
回复