Re: 正确修改Ubuntu12.04的grub2启动背景图片和菜单颜色的方法,这次是真的!
发表于 : 2012-08-03 22:49
头像真给力,有大图吗?
有啊,很大的图,自己gimp了下SmallV 写了:头像真给力,有大图吗?
字体颜色还是老样子,改不过来youzhiyili 写了:我是回头客qileilu 写了:htbadboy 写了:顶了先试试
试完了也不回来报告一下
![]()
跟图片的分辨率有关系,试着多改几次,总有能全屏的baijm 写了:图片全屏不了,倒是把启动项里面的那些东西给处理了
哦……去试试。qy117121 写了:添加背景图片的话不用修改/etc/grub.d/05_debian_theme 的其实
图片放到/boot/grub/下运行update-grub就好了
我update之后显示qileilu 写了:正确修改Ubuntu12.04的grub2启动背景图片和菜单颜色的方法,这次是真的!
这个命题最近很火啊,本板块几乎一半帖子都是关于这个的,以前的方法,新研究的方法出了很多啊,可是很多都不行。![]()
实在是受不了了,于是刚刚自己研究了一下/etc/grub.d/05_debian_theme,成功修改,不用再安装任何附加组件,只要修改/etc/grub.d/05_debian_theme就可以。
具体如下:说明:1.复制图片文件到/boot/grub/,文件名是啥无所谓,只要格式是*.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA都行,都能自动找到,如果有多个,那么显示第一个找到的图片。
2.修改/etc/grub.d/05_debian_theme
把改为:代码: 全选
# Next search for pictures the user put into /boot/grub/ and use the first one. for background in *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA; do if set_background_image "${background}"; then exit 0 fi done
此处命令格式为:set_background_image "${WALLPAPER}" "${COLOR_NORMAL}" "${COLOR_HIGHLIGHT}"代码: 全选
# Next search for pictures the user put into /boot/grub/ and use the first one. for background in *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.tga *.TGA; do if set_background_image "${background}" "white/black" "light-red/blue"; then exit 0 fi done
3.更新grub代码: 全选
sudo update-grub
1.菜单的颜色根据个人喜好来改啊,支持这些:
2.顺便给出改图片分辨率,启动默认项等:
修改/etc/default/grub效果:代码: 全选
GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda1)" GRUB_TIMEOUT=5 GRUB_GFXMODE=800x600 GRUB_DISABLE_LINUX_RECOVERY="true"
代码: 全选
~$ sudo update-grub Generating grub.cfg ... Found background image: lc_wallpaper.png Found linux image: /boot/vmlinuz-3.2.0-25-generic-pae Found initrd image: /boot/initrd.img-3.2.0-25-generic-pae Found linux image: /boot/vmlinuz-3.2.0-24-generic-pae Found initrd image: /boot/initrd.img-3.2.0-24-generic-pae Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae Found Windows 7 (loader) on /dev/sda1 Found Mac OS X on /dev/sda2 done