LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1261|回复: 18

高手请进

[复制链接]
发表于 2006-6-27 19:21:17 | 显示全部楼层 |阅读模式
我的台式机硬盘装了两个LINUX系统,HDC1(6G)装了KNOPPIX5。0,HDC2为SWAP(512M),HDC3(5G)装了个SLACKWARE10,现在问题是:因为KNOPPIX先装,是GRUB启动,而后装的SLACKWARE是LILO,现在只能从LILO启动SLACKWARE,而进入不了KNOPPIX5。请问如何解决?
发表于 2006-6-27 19:27:05 | 显示全部楼层
不知道LILO是否可以手动改,如果Grub引导的话可以手动更改menu.lst来引导。
自己查一下看看,我猜应该可以的。
回复 支持 反对

使用道具 举报

发表于 2006-6-27 19:27:29 | 显示全部楼层
两个方法,二选其一:

1. 把 Knoppix 的有关选项加到 Slackware 里的 /etc/lilo.conf 然後再执行 lilo
2. 把 Slackware 的有关选项加到 Knoppix 里的 /boot/grub/menu.lst,重装 Grub
回复 支持 反对

使用道具 举报

发表于 2006-6-27 20:00:36 | 显示全部楼层
比较倾向后者。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-1 10:46:15 | 显示全部楼层
Post by d00m3d
两个方法,二选其一:

1. 把 Knoppix 的有关选项加到 Slackware 里的 /etc/lilo.conf 然後再执行 lilo
2. 把 Slackware 的有关选项加到 Knoppix 里的 /boot/grub/menu.lst,重装 Grub

可否告知两种方法具体怎样做?我是没软驱的,但有两种系统的LIVECD。谢了!!!!!小弟还菜的很,尽管现在能TRASH WINDOWS。又要麻烦d00m3d兄了。
回复 支持 反对

使用道具 举报

发表于 2006-7-1 10:52:33 | 显示全部楼层
今时今日还要软驱干啥?

你先把你硬盘里 Slackware 的 /etc/lilo.conf 以及 Knoppix 的 /boot/grub/menu.lst 贴出来以便说明
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-1 11:43:04 | 显示全部楼层
KINOPPIX的MENU如下:
# 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                5

# 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=/dev/hdc1 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=791

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

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

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) 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                Debian GNU/Linux, kernel 2.6.17 Default
root                (hd0,0)
kernel                /boot/vmlinuz root=/dev/hdc1 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=791
initrd                /boot/initrd.img
savedefault
boot

title                Debian GNU/Linux, kernel 2.6.17
root                (hd0,0)
kernel                /boot/vmlinuz-2.6.17 root=/dev/hdc1 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=791
initrd                /boot/initrd.img-2.6.17
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-1 11:47:24 | 显示全部楼层
slackware的LILO。CONF如下:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hdc
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 800x600x64k
vga = 788
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hdc3
  label = Linux
  read-only
# Linux bootable partition config ends
回复 支持 反对

使用道具 举报

发表于 2006-7-1 12:40:43 | 显示全部楼层
方法一:

你现在是用 Slackware 启动的,直接修改 /etc/lilo.conf,加入 Knoppix 的选项:

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hdc3
label = Linux
read-only

image = /boot/vmlinuz-2.6.17
initrd = /boot/initrd.img-2.6.17
append = "ramdisk_size=100000 lang=us apm=power-off nomce vga=791"
root = /dev/hdc1
label = Knoppix
read-only

存档後,要再运行一次 lilo 才行

#lilo -C /etc/lilo.conf

如无问题便可重启

方法二:

你可以在 Slackware 或者用 LiveCD 把 hdc1 挂起,如:
#mkdir /mnt/hdc1
#mount /dev/hdc1 /mnt/hdc1

然後 chroot 到 Knoppix 下操作:
#chroot /mnt/hdc1

用 text editor 修改 /boot/grub/menu.lst,加入 Slackware 的选项

title Debian GNU/Linux, kernel 2.6.17 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdc1 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=791
initrd /boot/initrd.img
savedefault
boot

title Debian GNU/Linux, kernel 2.6.17
root (hd0,0)
kernel /boot/vmlinuz-2.6.17 root=/dev/hdc1 ro ramdisk_size=100000 lang=us apm=power-off nomce vga=791
initrd /boot/initrd.img-2.6.17
savedefault
boot

title Slackware 10
root (hd0,2)
kernel /boot/vmlinuz root=/dev/hdc3 ro vga=791
savedefault
boot

完成後存档,再重新配置 GRUB

#grub
>root (hd0,0)
>setup (hd0)   //假设你要把 GRUB 装到 MBR 里
>quit

重启

疑问:

1. 为什麽 Slackware 的 lilo.conf 用 vga=788? Knoppix 却是 791?建议统一用 791
2. 你的 Knoppix 在 hdc1 上,为何对应 (hd0,0)?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-1 14:32:11 | 显示全部楼层
d00m3d兄不但是高手而且又很热心,偶像呀!不明白还有那么多弱智的人去崇拜超女、明星什么的。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表