无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 3702|回复: 4
打印 上一主题 下一主题

[讨论] 请问,有没有人会用grub2呢

[复制链接]
1#
发表于 2012-3-15 18:39:00 | 显示全部楼层
相关路径修改下

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 part_msdos
insmod ntfs
set root=(hd0,msdos1)
if loadfont /boot/grub2/unicode.pf2 ; then
  set gfxmode=800x600
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
set theme=/boot/grub2/themes/grub2/theme.txt
insmod gfxmenu
insmod png
#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
set locale_dir=($root)/boot/grub2/locale
set lang=zh
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi

#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
insmod tga
if background_image /usr/share/images/grub/Fly-Angel.tga ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
fi
# 以下是每个菜单的写法,可以自行参考资料增减或编辑******************************
menuentry "启动Ubuntu LiveCD模式"  --class ubuntu {
        insmod ntfs
        search --no-floppy --fs-uuid --set=root 0858A5AC58A59948
        loopback loop /system/linux/ubuntu-11.10-desktop-i386.iso
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/system/linux/ubuntu-11.10-desktop-i386.iso locale=zh_CN.UTF-8 splash
        initrd (loop)/casper/initrd.lz
}
menuentry "进入grub4dos菜单(示例)" --class windows  {
        linux16 /Boot/grub/grub.exe --config-file=/menu.lst   
}


# 菜单结尾     ********************************************************
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###


### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-6-4 10:17

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表