




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 七年级语文上册 重点课文 6 皇帝的新装教学设计 新人教版
- 2024秋八年级英语上册 Module 3 Sports Unit 3 Language in use教学设计(新版)外研版
- 13要下雨了(教学设计)-2024-2025学年语文一年级下册统编版
- 2023六年级语文下册 第二单元 6 骑鹅旅行记(节选)配套教学设计 新人教版
- Unit 5(第1课时 Section A 1a-1d)(教学设计)七年级英语上册同步高效课堂(人教版2024)
- 10 的认识(教学设计)-2024-2025学年一年级上册数学沪教版
- 7《大小多少》教学设计-2024-2025学年统编版(五四制)语文一年级上册
- 个人酒店合作经营协议5篇
- Unit 5 Lesson 25 I Want to Be a Teacher2024-2025学年八年级英语上册同步教学设计(冀教版)河北专版
- 七年级生物下册 第二章 第一节 物质运输的载体第一课时教学设计 (新版)冀教版
- 第四单元《认识20~99》-2024-2025学年一年级数学下册单元检测卷(苏教版·2024新教材)
- 小学生航天知识普及课件
- 2025年河南经贸职业学院单招职业技能测试题库及答案一套
- 2025年中央部委部分京内直属事业单位招聘笔试参考题库含答案解析
- 部编版四年级语文《古诗词大会比赛》精美课件
- 山东潍坊2024年中考语文现代文阅读真题
- 2024年02月天津2024年天津银行总行投资银行部社会招考笔试历年参考题库附带答案详解
- 文化背景与人格差异-深度研究
- 《自动驾驶技术》课件
- 部编版2025春六年级下册语文11《十六年前的回忆》 课件
- DB32∕T 943-2006 道路声屏障质量检验评定
评论
0/150
提交评论