(已解决)[问题]怎样让grub管理两块硬盘的启动

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
heroreno
帖子: 38
注册时间: 2006-10-26 17:09
联系:

(已解决)[问题]怎样让grub管理两块硬盘的启动

#1

帖子 heroreno » 2007-11-06 13:24

机器上装了两块硬盘,一块SATA,一块IDE,SATA硬盘装了7.04和winxp,7.04是我正常使用的系统,已经设置得比较完善,也用得非常顺手。前两天在IDE硬盘上整盘装了7.10,有空的时候学习学习,正在做一些自定义的设置。目前启动时通过选择不同的引导硬盘来选择进入哪个操作系统,启动的时候有点麻烦。能否在一块硬盘的grub上加入另一块硬盘的启动信息,在grub菜单中选择进入哪个系统呢?请大家指点,谢谢。

代码: 全选

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          16      128488+  83  Linux
/dev/sda2              17        4865    38949592+   5  Extended
/dev/sda5              17         140      995998+  82  Linux swap / Solaris
/dev/sda6             141         748     4883728+  83  Linux
/dev/sda7             749         991     1951866   83  Linux
/dev/sda8             992        2433    11582833+  83  Linux
/dev/sda9            2434        3041     4883728+  83  Linux
/dev/sda10           3042        4865    14651248+  83  Linux

Disk /dev/sdb: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        2550    20482843+   c  W95 FAT32 (LBA)
/dev/sdb2            2551        5100    20482875    7  HPFS/NTFS
/dev/sdb3            5101        9730    37190475    5  Extended
/dev/sdb5            5101        5115      120456   83  Linux
/dev/sdb6            5116        5236      971901   82  Linux swap / Solaris
/dev/sdb7            5237        5844     4883728+  83  Linux
/dev/sdb8            5845        6452     4883728+  83  Linux
/dev/sdb9            6453        8276    14651248+  83  Linux
/dev/sdb10           8277        9492     9767488+  83  Linux
/dev/sdb11           9493        9730     1911703+  83  Linux
这是我的硬盘及分区信息。

代码: 全选

title		Ubuntu, kernel 2.6.20-16-generic
root		(hd0,4)
kernel		/vmlinuz-2.6.20-16-generic root=UUID=4a73b9c9-96ef-429d-88ab-afee2d6c9a6f ro quiet splash
initrd		/initrd.img-2.6.20-16-generic
quiet
savedefault

title		Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root		(hd0,4)
kernel		/vmlinuz-2.6.20-16-generic root=UUID=4a73b9c9-96ef-429d-88ab-afee2d6c9a6f ro single
initrd		/initrd.img-2.6.20-16-generic

title		Ubuntu, memtest86+
root		(hd0,4)
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
makeactive
chainloader	+1
这是SATA硬盘上的menu.lst信息。

代码: 全选

title		Ubuntu 7.10, kernel 2.6.22-14-generic
root		(hd0,0)
kernel		/vmlinuz-2.6.22-14-generic root=UUID=7d75f436-97f0-4012-b6a0-59ec3fc01322 ro quiet splash
initrd		/initrd.img-2.6.22-14-generic
quiet

title		Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root		(hd0,0)
kernel		/vmlinuz-2.6.22-14-generic root=UUID=7d75f436-97f0-4012-b6a0-59ec3fc01322 ro single
initrd		/initrd.img-2.6.22-14-generic

title		Ubuntu 7.10, memtest86+
root		(hd0,0)
kernel		/memtest86+.bin
quiet
这是IDE硬盘上的menu.lst信息。
上次由 heroreno 在 2007-11-06 16:21,总共编辑 2 次。
HadesEnduos
帖子: 193
注册时间: 2005-12-27 14:05
来自: 中国
联系:

#2

帖子 HadesEnduos » 2007-11-06 13:43

关键点在于root (hd0,4)那一行。
另外已经用UUID了。
..::Outstanding people always stand out::..

AMD Athlon(tm) 64 Processor 3200+
Kinston DDR400 512MB SS * 2
ASUS A8V Deluxe Wireless Edition - VIA K8T800PRO
Dataland AIW 9800SE - ATI Technologies Inc R350 AH [Radeon 9800]
heroreno
帖子: 38
注册时间: 2006-10-26 17:09
联系:

#3

帖子 heroreno » 2007-11-06 13:49

我也知道关键在那一行
就是怎么修改才能达到目的呢。
HadesEnduos
帖子: 193
注册时间: 2005-12-27 14:05
来自: 中国
联系:

#4

帖子 HadesEnduos » 2007-11-06 15:14

硬盘的顺序从0开始
第一块是0第二块是1以此类推
..::Outstanding people always stand out::..

AMD Athlon(tm) 64 Processor 3200+
Kinston DDR400 512MB SS * 2
ASUS A8V Deluxe Wireless Edition - VIA K8T800PRO
Dataland AIW 9800SE - ATI Technologies Inc R350 AH [Radeon 9800]
heroreno
帖子: 38
注册时间: 2006-10-26 17:09
联系:

#5

帖子 heroreno » 2007-11-06 16:19

HadesEnduos 写了:硬盘的顺序从0开始
第一块是0第二块是1以此类推
问题已经解决。
我现在的menu.lst的内容如下:

代码: 全选

title		Ubuntu 7.04, kernel 2.6.20-16-generic
root		(hd0,4)
kernel		/vmlinuz-2.6.20-16-generic root=UUID=4a73b9c9-96ef-429d-88ab-afee2d6c9a6f ro quiet splash
initrd		/initrd.img-2.6.20-16-generic
quiet
savedefault

title		Ubuntu 7.04, kernel 2.6.20-16-generic (recovery mode)
root		(hd0,4)
kernel		/vmlinuz-2.6.20-16-generic root=UUID=4a73b9c9-96ef-429d-88ab-afee2d6c9a6f ro single
initrd		/initrd.img-2.6.20-16-generic

title		Ubuntu 7.10, kernel 2.6.22-14-generic
root		(hd1,0)
kernel		/vmlinuz-2.6.22-14-generic root=UUID=7d75f436-97f0-4012-b6a0-59ec3fc01322 ro quiet splash
initrd		/initrd.img-2.6.22-14-generic
quiet

title		Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root		(hd1,0)
kernel		/vmlinuz-2.6.22-14-generic root=UUID=7d75f436-97f0-4012-b6a0-59ec3fc01322 ro single
initrd		/initrd.img-2.6.22-14-generic

title		Ubuntu, memtest86+
root		(hd0,4)
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
makeactive
chainloader	+1
回复