已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
windows和linux双系统,设置默认启动项在终端里输入:sudo gedit /boot/grub/grub.cfg先装windows而后装linux系统,默认启动项会非常多,执行上面的命令后,会打开一个文档,里面代码如下:-( 这些小横线是我自己加的)# DO NOT EDIT THIS FILE# It is automatically generated by /usr/sbin/grub-mkconfig using templates# from /etc/grub.d and settings from /etc/default/grub# BEGIN /etc/grub.d/00_header #if -s $prefix/grubenv ; then load_envfiset default=8if $prev_saved_entry ; then set saved_entry=$prev_saved_entry save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=truefifunction savedefault if -z $boot_once ; then saved_entry=$chosen save_env saved_entry fifunction recordfail set recordfail=1 if -n $have_grubenv ; then if -z $boot_once ; then save_env recordfail; fi; fiinsmod ext2set root=(hd0,9)search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0fif loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that dont # understand terminal_output terminal gfxterm fifiinsmod ext2set root=(hd0,9)search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0fset locale_dir=($root)/boot/grub/localeset lang=zhinsmod gettextif $recordfail = 1 ; then set timeout=-1elseset timeout=10fi# END /etc/grub.d/00_header # BEGIN /etc/grub.d/05_debian_theme #set menu_color_normal=white/blackset menu_color_highlight=black/light-gray# END /etc/grub.d/05_debian_theme # BEGIN /etc/grub.d/10_linux #menuentry Ubuntu, with Linux 2.6.32-31-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-31-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-31-genericmenuentry Ubuntu, with Linux 2.6.32-31-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-31-generic . linux /boot/vmlinuz-2.6.32-31-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-31-genericmenuentry Ubuntu, with Linux 2.6.32-30-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-30-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-30-genericmenuentry Ubuntu, with Linux 2.6.32-30-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-30-generic . linux /boot/vmlinuz-2.6.32-30-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-30-generic insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-24-genericmenuentry Ubuntu, with Linux 2.6.32-24-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-24-generic . linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-24-generic# END /etc/grub.d/10_linux # BEGIN /etc/grub.d/20_memtest86+ #menuentry Memory test (memtest86+) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.binmenuentry Memory test (memtest86+, serial console 115200) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.bin console=ttyS0,115200n8# END /etc/grub.d/20_memtest86+ # BEGIN /etc/grub.d/30_os-prober #menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1# END /etc/grub.d/30_os-prober # BEGIN /etc/grub.d/40_custom # This file provides an easy way to add custom menu entries. Simply type the# menu entries you want to add after this comment. Be careful not to change# the exec tail line above.# END /etc/grub.d/40_custom #menuentry Ubuntu, with Linux 2.6.32-24-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-24-genericmenuentry Ubuntu, with Linux 2.6.32-24-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-24-generic . linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-24-generic# END /etc/grub.d/10_linux # BEGIN /etc/grub.d/20_memtest86+ #menuentry Memory test (memtest86+) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.binmenuentry Memory test (memtest86+, serial console 115200) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.bin console=ttyS0,115200n8# END /etc/grub.d/20_memtest86+ # BEGIN /etc/grub.d/30_os-prober #menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1# END /etc/grub.d/30_os-prober # BEGIN /etc/grub.d/40_custom # This file provides an easy way to add custom menu entries. Simply type the# menu entries you want to add after this comment. Be careful not to change# the exec tail line above.# END /etc/grub.d/40_custom #-如上所示,每一个menuentry表示一个启动项,如:menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1表示win7的启动项,处于最后一个(本人计算机共有9个启动项,一般的也可能是7个等等)。若想修改启动项,只需将红色标记的部分中的数字做个修改,如set default=8 表示默认启动项是列表中的第九个,即本人计算机中的win7系统,“0”表示启动项列表中的第一个。蓝色标记的部分set timeout=10表示留10秒的时间供用户选择。当然了,如果嫌启动项太多太麻烦,只需将menuentry及其后面大括号所包含的部分删除,则相应的启动项就不会在启动时出现。还可以采取另外一种办法:将包含win7启动项的部分# BEGIN /etc/grub.d/30_os-prober #menuentry
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年中华护理学会团体标准贯标培训测试题及答案
- 新闻漫画行业分析报告
- 暗黑系背景演讲稿
- 美业人励志的演讲稿
- 2026年秋招:上海地产集团笔试题及答案
- 2026年青海气象局会务接待招聘考试练习试卷(含答案)
- 2026年云南宣威航空人员招聘考试练习试卷(含答案)
- 2026年海南社会工作者综合运营专员招聘考试练习试卷(含答案)
- 2026年广西中国电信安全管理专员招聘考试练习试卷(含答案)
- 2026大庆联考考试题目及答案
- 攀枝花市东区2026年面向社会公开招考社区工作者(104人)考试备考试题及答案解析
- 季度汇报数据可视化
- 2025年全国成人高考(专升本)《政治》真题及答案(完整版)
- 2026秋新教材外研版(三起)小学英语六年级上册(全册)各单元达标测试卷及答案
- 市政工程安全隐患整改闭环管理培训
- 2026年国企党支部书记竞聘试题(附答案)
- 装配式叠合板安装监理实施细则
- 2026年北京市通州区辅警协警招聘考试备考试题及答案详解
- 七上科学经纬度专题
- 老年骨质疏松症患者跌倒预防循证指南(2026版)
- 2026年广西高职单招职业技能测试真题及参考答案
评论
0/150
提交评论