21:47
暑假没网,无聊的为grub2加了背景图,现在才 发现自己一直都很蛋疼的痴迷美化...
先上图,最后一张是原壁纸
暑假没网,在家闲着没事扒拉F盘的时候发现旮旯里躺着一本《Grub2基础教程》,额应该快一年了吧,上面举例是ubuntu9.10 ,当时看了一下感觉挺麻烦的,而且那张截图也不咋地...
从grub里面用ls 看见/boot 里面竟然木有我建的那个文件夹,难道是只显示系统属性的吗,ubuntu下用那个磁盘管理工具看见里面/boot→(hd0,10) ,/→(hd0,11),
发现从/boot就是/下的那个 (当时自己为boot分了100m) ,到这儿才真的有点理解目录两个字了
, 懒人可以直接照我的修改一下,
需要改的地方已用浅蓝色标出,#号后为个人注释
[/size]
# 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_env
fi
set default="4"
#改默认为win7
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
insmod jpeg
#安装jpeg支持模块
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
}
insmod ext2
#insmod ext4 失败
set root='(hd0,11)'
search --no-floppy --fs-uuid --set b25bd8ec-718d-476b-8c52-d7f4af2a1077
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=800x600
#设置分辨率,我把图片按屏幕比例做了处理, ⊙﹏⊙b 我发现中间的×是 字母x
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 6fdd5478-5474-42b5-8fb9-6fd6d0ec97eb
set locale_dir=($root)/grub/locale
set lang=zh
#改成英/美应该都可以吧,或者来个jp?
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
background_image (hd0,10)/grub/start.jpg
#image后面加空格,图片被我按比例缩减到1280x800,不知如果比屏幕大的分辨率会怎么样
#图片 放在boot文件夹需要用root用户权限
#可以使用 sudo su 用户名 密码,取得root权限
#mkdir 新建目录
#用mv命令移动图片,mv 源目录/文件 目标文件夹
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=black/black
#想吧第一个black换成灰色的,蛋木有成功
set menu_color_highlight=green/black
#颜色只发现:red,bule,green,yellow,white,black这几种
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu,Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 6fdd5478-5474-42b5-8fb9-6fd6d0ec97eb
linux /vmlinuz-2.6.32-21-generic root=UUID=b25bd8ec-718d-476b-8c52-d7f4af2a1077 ro quiet splash
initrd /initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu,Linux 2.6.32-21-generic (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 6fdd5478-5474-42b5-8fb9-6fd6d0ec97eb
echo '载入 Linux ...'
linux /vmlinuz-2.6.32-21-generic root=UUID=b25bd8ec-718d-476b-8c52-d7f4af2a1077 ro single
echo '载入引导虚拟磁盘 ...'
initrd /initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 6fdd5478-5474-42b5-8fb9-6fd6d0ec97eb
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 6fdd5478-5474-42b5-8fb9-6fd6d0ec97eb
linux16 /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 fc8a19c68a197df8
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 ###