- 论坛徽章:
- 0
|
安装多个linux发行版并存后,各系统中menu.lst有所不同,主要是/dev/sda1和/dev/hda1的区别.
比如我的IBM x31笔记本,我特别试验了一下,在不同的发行版下,终端输入fdisk -l,磁盘的表示方法是不同的:有的发行版将磁盘表示为sda,而有的表示为hda.
suse,mandriva,ubuntu识别为sda,分别为sda1,sda6,sda3
而slackware,debian则识别为hda,分别为hda2和hda7,
ubuntu出自debian,为什么两者还有区别??
如果搞错了这一点,启动系统时就没有办法找到内核,无法启动.最典型的例子莫过于使用ubuntu下的grub引导slackware.
##Opensuse Linux 11.2
# Modified by YaST2. Last modification on 19 10:23:41 CST 2009
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader
default 0
timeout 6
##YaST - generic_mbr
gfxmenu (hd0,0)/boot/message
##YaST - activate
title openSUSE 11.2 - 2.6.31.5-0.1
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 resume=/dev/sda5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
title Failsafe -- openSUSE 11.2 - 2.6.31.5-0.1
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 showopts
apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off
highres=off processor.max_cstate=1 x11failsafe vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
title Slackware Linux (Slackware 12.0.0) (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2 ro
savedefault
boot
title Ubuntu 8.10, kernel 2.6.27-7-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda3 ro locale=zh_CN quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda3 ro locale=zh_CN single
initrd /boot/initrd.img-2.6.27-7-generic
title Mandriva Linux 2010.0 (on /dev/sda6)
root (hd0,5)
kernel /boot/vmlinuz root=/dev/sda6
initrd /boot/initrd.img
savedeault
boot
title Debian GNU/Linux, kernel 2.6.26-2-686 (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro quiet
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode) (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro single
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
#######################################################################
##Ubuntu 8.10
# 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 6
#hiddenmenu
color cyan/blue white/blue
title Ubuntu 8.10, kernel 2.6.27-7-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda3 ro locale=zh_CN quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda3 ro locale=zh_CN single
initrd /boot/initrd.img-2.6.27-7-generic
title openSUSE 11.2 - 2.6.31.5-0.1 (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 resume=/dev/sda5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
savedefault
boot
title Failsafe -- openSUSE 11.2 - 2.6.31.5-0.1 (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 showopts
apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off
highres=off processor.max_cstate=1 x11failsafe vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
savedefault
boot
title Slackware Linux (Slackware 12.0.0) (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2 ro
savedefault
boot
title Mandriva Linux 2010.0 (on /dev/sda6)
root (hd0,5)
kernel /boot/vmlinuz root=/dev/sda6
initrd /boot/initrd.img
savedeault
boot
title Debian GNU/Linux, kernel 2.6.26-2-686 (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro quiet
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode) (on /dev/sda7)
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro single
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
#####################################################################
##Mandriva Linux 2010.0
timeout 6
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 0
title linux
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sda6 resume=/dev/sda5 splash=silent vga=788
initrd (hd0,5)/boot/initrd.img
title linux-nonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=/dev/sda6 resume=/dev/hda5
initrd (hd0,5)/boot/initrd.img
title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=/dev/sda6 failsafe
initrd (hd0,5)/boot/initrd.img
title OpenSUSE 11.2 (on /dev/sda1)
VERSION = 11.2
root (hd0,0)
configfile /boot/grub/menu.lst
title Slackware Linux 12.0.0 (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2
savedefault
boot
title Ubuntu 8.10 (on /dev/sda3)
root (hd0,2)
configfile /boot/grub/menu.lst
title Debian GNU/Linux 5.0 (on /dev/sda7)
root (hd0,6)
configfile /boot/grub/menu.lst
######################################################################
##Debian GNU/Linux 5.0
default 0
timeout 6
color cyan/blue white/blue
title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro quiet
initrd /boot/initrd.img-2.6.26-2-686
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda7 ro single
initrd /boot/initrd.img-2.6.26-2-686
title OpenSUSE 11.2 (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 resume=/dev/sda5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
savedefault
boot
title Failsafe -- OpenSUSE 11.2 (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/sda1 showopts
apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off
highres=off processor.max_cstate=1 x11failsafe vga=0x317
initrd /boot/initrd-2.6.31.5-0.1-default
savedefault
boot
title Slackware Linux 12.0.0 (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2 ro
savedefault
boot
title Ubuntu 8.10 (on /dev/sda3)
root (hd0,2)
kernel /boot/vmlinuz-2.6.31-14-generic root=/dev/sda3 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
savedefault
boot
title Ubuntu8.10 (recovery mode) (on /dev/sda3)
root (hd0,2)
kernel /boot/vmlinuz-2.6.31-14-generic root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.31-14-generic
savedefault
boot
title Mandriva Linux 2010.0 (on /dev/sda6)
root (hd0,5)
kernel /boot/vmlinuz root=/dev/sda6
initrd /boot/initrd.img
savedeault
boot
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15173/showart_2166432.html |
|