已阅读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年试验检师综合提升测试卷及答案详解(网校专用)
- GB/T 21369-2024火力发电企业能源计量器具配备和管理要求
- 手术室常见体位摆放
- 安全员C1证(专职安全员-机械类)考试题库及答案
- DB11T 527-2021 配电室安全管理规范
- 2024年广东省高考(历史)科目真题(试卷+答案解析版)
- 经典美术作品赏析智慧树知到期末考试答案章节答案2024年四川音乐学院
- 三级医院评审标准(2022 年版)广东省实施细则管理一
- 直肠肛管疾病诊疗规范2023版
- 加氢裂化工艺课件
- ZJ40CZK使用说明书模版
- 特种设备安全总监和安全员任命文件
评论
0/150
提交评论