win7 ubuntu 双系统启动选项DIY

时间:2026-05-01

Win7 ubuntu双系统启动选项DIY

本文由本人原创,各位爱好Linu的好友,若要转载,请注明出处,如有不明之处,请用QQ:334245938联系我。

一、问题:分别安装完Win7与ubuntu12.04后,发现启动选项显示太多,如何在启动计算机启动后,只显示win7与ubuntu系统两条选项,使计算机的启动选项更加的简洁呢?

二、改决方法:

1、运行计算机的左上角“DASH主页”启动器,在框中输入终端命令符“terminal”,点终端图标即可自动进入mm@mm-slsj:~$(注:绿色字是你们的计算机的名称),在命令行输sudo -i,些时屏幕显示[sudo] password for mm:在此处输入你的安装ubuntu时密码,些时屏幕显示root@mm-slsj:~#

2、在命令行输入:gedit /boot/grub/grub.cfg,进入 boot/grub/grub.cfg的编辑,把原文按以下内容

改好后,保存,退出。

3、重启计算机。ok!你的计算机已经是双系统的简洁启动界面了,只显示win 7系统与Linux ubuntu 系统两条选项,默认第一选项是win7系统,第二选项是ubuntuu系统,Linux ubuntu 系统选项的下一级菜单下可选ubuntu系统的其他选项。

4、grub多系统管理器的编辑成果。

# DO NOT EDIT THIS FILE

#

# It is automatically generated bny 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

set have_grubenv=true

load_env

fi

set default="0"

if [ "${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=true

fi

function savedefault {

if [ -z "${boot_once}" ]; then

saved_entry="${chosen}"

save_env saved_entry

fi

}

function recordfail {

set recordfail=1

if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi

}

function load_video {

insmod vbe

insmod vga

insmod video_bochs

insmod video_cirrus

}

insmod part_msdos

insmod ext2

set root='(hd0,msdos7)'

search --no-floppy --fs-uuid --set=root 6e52c50f-5b93-4e63-80ec-f8db43af4671 if loadfont /usr/share/grub/unicode.pf2 ; then

set gfxmode=auto

load_video

insmod gfxterm

insmod part_msdos

insmod ext2

set root='(hd0,msdos7)'

search --no-floppy --fs-uuid --set=root 6e52c50f-5b93-4e63-80ec-f8db43af4671 set locale_dir=($root)/boot/grub/locale

set lang=

insmod gettext

fi

terminal_output gfxterm

if [ "${recordfail}" = 1 ]; then

set timeout=-1

else

set timeout=10

fi

### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black

set menu_color_highlight=black/light-gray

if background_color 44,0,30; then

clear

fi

### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/30_os-prober ###

menuentry "Windows 7系统" --class windows --class os {

insmod part_msdos

insmod ntfs

set root='(hd0,msdos1)'

search --no-floppy --fs-uuid --set=root 267A9AA77A9A7373

chainloader +1

}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/10_linux ###

function gfxmode {

set gfxpayload="${1}"

if [ "${1}" = "keep" ]; then

set vt_handoff=vt.handoff=7

else

set vt_handoff=

fi

}

if [ "${recordfail}" != 1 ]; then

if [ -e ${prefix}/gfxblacklist.txt ]; then

if hwmatch ${prefix}/gfxblacklist.txt 3; then

if [ ${match} = 0 ]; then

set linux_gfx_mode=keep

else

set linux_gfx_mode=text

fi

else

set linux_gfx_mode=text

fi

else

set linux_gfx_mode=keep

fi

else

set linux_gfx_mode=text

fi

export linux_gfx_mode

if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi

submenu " Ubuntu Linux 系统" {

menuentry 'Ubuntu, with Linux 3.2.0-31-generic-pae' --class ubuntu --class gnu-

linux --class gnu --class os {

recordfail

gfxmode $linux_gfx_mode

insmod gzio

insmod part_msdos

insmod ext2

set root='(hd0,msdos7)'

search --no-floppy --fs-uuid --set=root 6e52c50f-5b93-4e63-80ec-f8db43af4671 linux /boot/vmlinuz-3.2.0-31-generic-pae root=UUID=6e52c50f-5b93-4e63-80ec-f8db43af4671 ro quiet splash $vt_handoff

initrd /boot/initrd.img-3.2.0-31-generic-pae

}

menuentry 'Ubuntu, with Linux 3.2.0-31-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {

recordfail

insmod gzio

insmod part_msdos

insmod ext2

set root='(hd0,msdos7)'

search --no-floppy --fs-uuid --set=root 6e52c50f-5b93-4e63-80ec-f8db43af4671 echo 'Loading Linux 3.2.0-31-generic-pae ...'

linux /boot/vmlinuz-3.2.0-31-generic-pae root=UUID=6e52c50f-5b93-4e63-80ec-f8db43af4671 ro recovery nomodeset

echo 'Loading initial ramdisk ...'

initrd /boot/initrd.img-3.2.0-31-generic-pae

}

submenu "Previous Linux versions" {

menuentry 'Ubuntu, with Linux 3.2.0-29-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {

recordfail

gfxmode $linux_gfx_mode

insmod gzio

insmod part_msdos

insmod ext2

set root='(hd0,msdos7)'

search --no-floppy --fs-uuid --set=root 6e52c50f- …… 此处隐藏:2870字,全部文档内容请下载后查看。喜欢就下载吧 ……

win7 ubuntu 双系统启动选项DIY.doc 将本文的Word文档下载到电脑

    精彩图片

    热门精选

    大家正在看

    × 游客快捷下载通道(下载后可以自由复制和排版)

    限时特价:4.9 元/份 原价:20元

    支付方式:

    开通VIP包月会员 特价:19元/月

    注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
    微信:fanwen365 QQ:370150219