[整理]有關設置grub默認進入的操作系統的問題

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
zzyubuntu
帖子: 55
注册时间: 2006-12-09 19:22

#31

帖子 zzyubuntu » 2006-12-23 19:46

zzy@zzy-desktop:~$ sudo gedit /boot/grub/menu.lst
cannot open display: (null)
运行“gedit --help”可查看可用的命令行选项的全部列表。
gren
帖子: 132
注册时间: 2006-12-01 16:42
来自: 金城

#32

帖子 gren » 2007-01-07 0:35

很好的,谢谢楼主了,学习了
正在转向linux的好奇人!
—————————————---------
Ubuntu7.04
华硕P4B533+intelP42.0+kingstonDDR266 256M*2+
艾尔莎MX440+80G IDE+SyncMaster 757DFX
+Creative2.1
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#33

帖子 millenniumdark » 2007-01-28 13:26

gzy19750510 写了:请教:
我在装UBUNTU时一开始把用户设为ROOT最后进不了系统了后来加了一个用户USER1进去了但是打不开WINDOWS的盘,而且我在XWINDOWS下的盘符显示是以S开头而其他人的机子显示是以H开头,我该怎么办,如何看到其他盘上的资料?
把/etc/fstab贴出来看看。
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#34

帖子 millenniumdark » 2007-01-28 13:29

zzyubuntu 写了:zzy@zzy-desktop:~$ sudo gedit /boot/grub/menu.lst
cannot open display: (null)
运行“gedit --help”可查看可用的命令行选项的全部列表。
尝试一下

代码: 全选

sudo nano /boot/grub/menu.lst
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#35

帖子 millenniumdark » 2007-01-28 13:31

gzy19750510 写了:请教:
UBUNTU安装时没看装的软件包装完后想看装的软件包怎么办,主要是想看默认装没装GCC及GDB,UBUNTU好像是6.己的版本
如果是gnome的话,菜单系统》管理里有“新立得”。

不行的话,终端下

代码: 全选

aptitude
头像
clock88731
帖子: 206
注册时间: 2007-01-01 20:26
来自: 湖北武汉

#36

帖子 clock88731 » 2007-01-29 13:49

哈哈 这个困扰了我好久阿 现在解决了 支持下
DRIFT
帖子: 177
注册时间: 2007-01-25 13:04

grub资料

#37

帖子 DRIFT » 2007-02-03 15:46

icyleaf1026
帖子: 86
注册时间: 2007-02-03 4:04
来自: 四川

#38

帖子 icyleaf1026 » 2007-02-03 18:22

晕死..看不懂啊~~~有没有什么地方讲解下?
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#39

帖子 millenniumdark » 2007-02-05 18:33

icyleaf1026 写了:晕死..看不懂啊~~~有没有什么地方讲解下?
去irc找人問吧。
头像
yaoyuan3333
帖子: 11
注册时间: 2006-12-22 8:46

修改中间的 default=0 ?

#40

帖子 yaoyuan3333 » 2007-03-07 9:50

修改中间的 default=0这句在哪?
没人讲明白,对新手没什么帮助的。
yaoyuan3333
头像
yaoyuan3333
帖子: 11
注册时间: 2006-12-22 8:46

“修改中间的 default=0”

#41

帖子 yaoyuan3333 » 2007-03-07 9:57

# 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 这一行就是所谓的“修改中间的 default=0”。
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10 这一行是设置启动的时间。
[/b]
yaoyuan3333
头像
dillyking
帖子: 19
注册时间: 2007-03-11 16:52
来自: Shanghai
联系:

越说越糊涂

#42

帖子 dillyking » 2007-03-14 10:16

别的就别再扯了,说点实在的吧!
比如我原先装了Ubuntu6.10,现在我装了Windows XP,要把WinXP设成默认,具体应该怎么做?
要说的人就写写清楚,要么就走人!省得你我浪费时间!
头像
huangjiahua
帖子: 3294
注册时间: 2005-03-30 0:27
联系:

#43

帖子 huangjiahua » 2007-03-17 23:46

楼上别扯了
millenniumdark 写了:修改中间的 default=0
你想默认进入的操作系统位于第几项(从0开始计算)。就把0改成几。
你可以看不懂 dark 说的这话, 但是不可以这样不尊重人。


附: 楼上骂人的帖子
跃过无数的时间断层,只为了在
seacucumber
帖子: 3
注册时间: 2007-03-19 11:42

#44

帖子 seacucumber » 2007-03-21 0:23

:lol: 非常好
头像
ericlam
帖子: 340
注册时间: 2007-05-06 20:42
来自: Matrix

#45

帖子 ericlam » 2007-05-06 23:45

虽然还没用上UBUNTU,也想做点事“humanity to others" 以下是网上找的,我想这样大家会明白的。

修改Ubuntu启动菜单 - 使XP变为默认操作系统

自从装了Ubuntu和XP双系统后,变得很麻烦,每次都得在启动菜单上选来选去,浪费了不少时间。
现在想修改使XP成为默认的操作系统,怎么办呢?

其实很简单,修改 /boot/grub/menu.lst 文件,使其中default值变动一下即可。
过程如下:

1、 打开命令行终端;
2、输入:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
sudo gedit /boot/grub/menu.lst
注: 第一句做备份用。
3、假设文件内容如下:

代码: 全选

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

.
.
.

## ## End Default Options ##

title Ubuntu, kernel 2.6.15-23-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot

title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot

title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
boot

### 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/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
-------------------------------------------------------------


现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu, kernel 2.6.15-23-386。
现在把它修改成“default 4”,那么XP就成为默认的操作系统了。
因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为4。
另外我们还可以通过修改timeout的值来变更默认等待时间。
上次由 ericlam 在 2008-04-18 20:07,总共编辑 1 次。
回复