通过修改Ubuntu的Grub来调整多系统的启动顺序
2025-11-04 00:45:59阅读量:11 字体:大 中 小
机器上装了双系统(Ubuntu 8.10+WinXP),每次启动的时候假如不在Grub那里选择WinXP的话就会默认启动到Ubuntu。但是一般我都是用WinXP的,这样每次选择对我这种懒人来说太麻烦了,所以今天我就修改了Grub的配置,让它默认启动WinXP...
我们进入Ubuntu后,打开终端,先备份一下Grub的启动列表文件menu.lst:
复制代码代码如下:
然后使用Gedit来编辑menu.lst
复制代码代码如下:
打开以后会看到很长很长的东西,不过那些以"#"开头的东西全部都是没用的,而大家要修改的也只有一个地方(大概在18行左右):default 0
这个0就代表了Grub默认启动项为Ubuntu,而大家要改成...这个因机而已了,我们往下看。
# 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 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
# 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=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN
## default grub root device
## e.g. groot=(hd0,0)
# groot=3738b672-62f3-490d-916a-cad379fdb57b
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## 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=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) 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
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-11-generic
uuid 3738b672-62f3-490d-916a-cad379fdb57b
kernel /vmlinuz-2.6.27-11-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN quiet splash
initrd /initrd.img-2.6.27-11-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-11-generic (recovery mode)
uuid 3738b672-62f3-490d-916a-cad379fdb57b
kernel /vmlinuz-2.6.27-11-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN single
initrd /initrd.img-2.6.27-11-generic
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 3738b672-62f3-490d-916a-cad379fdb57b
kernel /vmlinuz-2.6.27-7-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN quiet splash
initrd /initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 3738b672-62f3-490d-916a-cad379fdb57b
kernel /vmlinuz-2.6.27-7-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN single
initrd /initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid 3738b672-62f3-490d-916a-cad379fdb57b
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
恩,我用了7种不同的颜色标记了下面的每一部分,依次编号为0、1、2、3、4、5、6。所以我们看到WinXP系统的编号是6,所以我们只要把 default 0 修改为 default 6 就可以了。
这个是我的电脑,XP的编号为6,你的电脑需要你自己去看是多少。
PS.这里有个技巧,你需要数有多少个title就可以啦,哈哈!
另外上面我不同颜色标记的东西是可以删除的,删除以后Grub启动列表里的对应项目就会消失,貌似可以美观一些,嘎嘎...
免责声明:
本文《通过修改Ubuntu的Grub来调整多系统的启动顺序》版权归原作者所有,内容不代表本站立场!
如本文内容影响到您的合法权益(含文章中内容、图片等),请及时联系本站,我们会及时删除处理。
推荐阅读

无聊猿BAYC大涨82% APE强涨52%!NFT单日交易量创今年第二高
6hA数字认知网 - 区块链数字货币实时行情平台坠入寒冬已久的NFT市场终于回温了?加密货币风投Dragonfly数据总监@hildobby制作的Dune图表显示,11月30日、12月1日连续两日的N...
阅读: 106

无聊猿BAYC跌破10枚ETH、较历史高点蒸发93%!NFT还能重燃吗?
k6v数字认知网 - 区块链数字货币实时行情平台在上一轮牛市中,加密货币产业掀起NFT热潮。2021年4月,Yuga Labs推出Bored Ape Yacht Club(BAYC)成为最受欢迎的PF...
阅读: 67

ApeCoinDAO提案在泰国曼谷开设无聊猿主题饭店!APE支付房费、赋能BAYC
1oB数字认知网 - 区块链数字货币实时行情平台NFT蓝筹项目无聊猿(BAYC)生态代币APE的去中心化自治组织ApeCoinDAO,在19日发起了一项新提案AIP-448,计划在泰国曼谷市中心的黄金...
阅读: 73

Animoca Brands估值骤降75%!NFT、Web3游戏和元宇宙低迷
09y数字认知网 - 区块链数字货币实时行情平台Animoca Brands,这家加密科技巨头与投资狂热者,正面临市场估值的大幅下调。尽管拥有数十亿美元的资产,这家公司的二级市场价值却显示出明显的疲态...
阅读: 66

航天公司SERA合作Coinbase:计划在Base链上发行2种太空主题NFT
aD9数字认知网 - 区块链数字货币实时行情平台美国私人太空探索与研究机构SERA,目前正在与上市加密货币交易所Coinbase展开合作。SERA计划在以太坊Layer2网络Base链上,发行三种太空...
阅读: 67

特朗普开卖第四代NFT美国优先系列!每张售价99美元
BzI数字认知网 - 区块链数字货币实时行情平台美国共和党总统候选人特朗普在7月中旬时接受彭博采访时表示,他计划发布第四个NFT系列,他当时说道,他的前三个NFT系列都非常成功,现在打算再做一次,因为...
阅读: 103

史上最贵CryptoPunks 5822传以1500ETH转手!原持有者血亏2000万美元
9Wx数字认知网 - 区块链数字货币实时行情平台蓝筹NFT项目CryptoPunks中最贵,编号5822的NFT于今(19)日完成场外交易(OTC),创下历史性的销售纪录,该CryptoPunk的前持...
阅读: 79

OpenSea收SEC韦尔斯通知、认为NFT属于证券!代币BLUR、TNSR齐跳水
Omf数字认知网 - 区块链数字货币实时行情平台NFT交易平台OpenSea昨(28)晚传出重大利空消息,共同创办人兼执行长Devin Finzer在X上发文表示该平台已经收到来自美国证券交易委员会S...
阅读: 112

周星驰招募演员参与《大话大话西游》演出!必须持有Nobody NFT
HYD数字认知网 - 区块链数字货币实时行情平台在中国微短剧市场蓬勃发展之际,香港喜剧天王、同时也是亿万票房导演的周星驰,在今年也跨界推出网络微短剧,与抖音平台合作开发「九五二七剧场」。首部微短剧《金...
阅读: 75

什么是非同质化代币(NFT)?NFT常见的分类方式
目录什么是非同质化代币(NFT)?NFT常见的分类方式1.按用例分类2.按代币标准分类3.按平台或区块链分类4.按交互性分类基于用例的NFT类别1.个人资料头像(PFP)2.数字艺术3.音乐4.游戏内...
阅读: 83
猜你喜欢

加密货币市场暴跌——谁在崛起
2025-11-10

神秘鲸鱼活动引发对 Ethena 和主要代币的猜测
2025-11-10

Memecoin 崩盘重创柴犬!SHIB 的回归之路可能就此终结
2025-11-10

PUMP 价格上涨,多头能否维持趋势还是前方有阻力?
2025-11-10

加密货币市场中异常的鲸鱼活动:以太坊和主要代币波动背景下散户投资者的战略切入点
2025-11-10

十月市场震荡后,Tether 发行 10 亿美元 USDT
2025-11-10
加密货币市场暴跌:交易所与传统金融机构如何应对危机
2025-11-10

OpenSea转型新引擎:代币交易崛起与发币预期下的未来
2025-11-10
特朗普家族加密货币计划:权力与金钱交织的新篇章
2025-11-10
Tempo:支付专用区块链能否挑战通用型区块链?
2025-11-10
