LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4401|回复: 18

Slackware 10.0 Bootsplash How-to

[复制链接]
发表于 2004-6-28 21:48:10 | 显示全部楼层 |阅读模式
Slackware 也能像SuSE,Mandrake,Gentoo那样有漂亮的bootsplash。

可以参考的网上资源有:
http://www.linuxpackages.net/pkg_details.php?id=3221
在linuxpackages搜索bootsplash可以下载bootsplash for slackware 10.0

http://www.bootsplash.de/
这里可以下载各个版本的bootsplash补丁和Theme

http://forums.gentoo.org/viewtop ... ighlight=bootsplash
gentoo论坛的bootsplash-Howto,都是linux,很多东西都是值得参考的。

http://gentoo.linuxsir.cn/doc/fb.xml.html
这是我们linuxsir的gentoo文档中翻译的Howto。

效果图:
 楼主| 发表于 2004-6-28 22:09:53 | 显示全部楼层
首先,要取得一份linux源码和bootsplash的补丁。
源码就下载个最新的2.6.7,对应的补丁可以在这里下载:
http://www.bootsplash.de/files/bootsplash-3.1.4-sp1-2.6.7.diff
如果你先下载安装了bootsplash-3.1-i486-1.tgz
也可以在/usr/doc/bootsplash/patch-kernel-2.6.7目录找到补丁。
版本有些微小的差别,没有关系。

把内核源码解压到/usr/src目录。

  1.                #cd /usr/src
  2.                #tar xvfj linux-2.6.7.tar.bz2
  3.                 删除旧的linux链接
  4.                #rm linux
  5.                #ln -s linux-2.6.7 linux
复制代码



  1.                #cd linux
  2.                打上补丁:
  3.                #patch -p1 < ../bootsplash-3.1.4-sp1-2.6.7.diff
  4.                
  5.                开始编译新内核
  6.                #make menuconfig                     或者make xconfig随你喜欢
复制代码


要使bootsplash工作,选上这些选项,在Graphics support中不要选其它的
如nVidia支持等选项,我们只需要vesa。

  1.               Code maturity level options  --->
  2.                          [*] Prompt for development and/or incomplete code/drivers
  3.               Processor type and features  --->
  4.                          [*] MTRR (Memory Type Range Register) support
  5.               Device Drivers  --->
  6.                          Block devices  --->
  7.                          <*> Loopback device support
  8.                          <*> RAM disk support
  9.                          (4096) Default RAM disk size
  10.                          [*]   Initial RAM disk (initrd) support
  11.               Graphics support  --->
  12.                          [*] Support for frame buffer devices
  13.                          [*]   VESA VGA graphics support
  14.               Console display driver support  --->
  15.                          [*]   Video mode selection support
  16.                          <*> Framebuffer Console support
  17.               Bootsplash configuration  --->
  18.                          [*] Bootup splash screen
复制代码


如果是编译2.4.x的内核,就选上这些:

  1.            Code maturity level options  --->
  2.                      [*] Prompt for development and/or incomplete code/drivers
  3.            Processor type and features  --->
  4.                      [*] MTRR (Memory Type Range Register) support
  5.            Block Devices ->
  6.                      [*] Loopback device support
  7.                      [*] RAM disk support
  8.                      (4096)   Default RAM disk size
  9.                      [*] Initial RAM disk (iPOST http://www.linuxsir.cn/bbs/editpost.php HTTP/1.s/editpost.php[/url] HTTP/1.] VGA text console
  10.                      [*] Video mode selection support
  11.            Console Drivers -> Frame-buffer support ->
  12.                      [*] Support for frame buffer devices
  13.                      [*] VESA VGA graphics console
  14.                      [*] Use splash screen instead of boot logo
复制代码


然后,对于2.6内核用

  1.              #make
  2.              #make modules_install
  3.              #cp arch/i386/boot/bzImage /boot/kernel-2.6.7
  4.              #cp System.map /boot/System.map-2.6.7
  5.              #cp .config /boot/config-2.6.7
  6.           除非你改过Makefile,去掉#export INSTALL_PATH=/boot这行的#
  7.           否则在slackware中不要用#make install来安装内核。
复制代码


对于2.4.x内核

  1.              #make dep
  2.              #make clean
  3.              #make bzImage
  4.              #make modules
  5.              #make modules_install
  6.              #cp arch/i386/boot/bzImage /boot/kernel-2.4.26
  7.              #cp System.map /boot/System.map-2.4.26
  8.              #cp .config /boot/config-2.4.26
复制代码
 楼主| 发表于 2004-6-28 22:15:07 | 显示全部楼层
修改/etc/lilo.conf

只是先修改,不要执行lilo,也不要重启

参考我的这段:

  1. # LILO configuration file
  2. # generated by 'liloconfig'
  3. #
  4. # Start LILO global section
  5. boot = /dev/hda
  6. #compact        # faster, but won't work on all systems.
  7. prompt
  8. timeout = 300
  9. # VESA framebuffer console @ 1024x768x64k
  10. vga = 791
  11. # Normal VGA console
  12. # vga = normal
  13. # VESA framebuffer console @ 1024x768x64k
  14. # vga=791
  15. # VESA framebuffer console @ 1024x768x32k
  16. # vga=790
  17. # VESA framebuffer console @ 1024x768x256
  18. # vga=773
  19. # VESA framebuffer console @ 800x600x64k
  20. # vga=788
  21. # VESA framebuffer console @ 800x600x32k
  22. # vga=787
  23. # VESA framebuffer console @ 800x600x256
  24. # vga=771
  25. # VESA framebuffer console @ 640x480x64k
  26. # vga=785
  27. # VESA framebuffer console @ 640x480x32k
  28. # vga=784
  29. # VESA framebuffer console @ 640x480x256
  30. # vga=769
  31. # ramdisk = 0     # paranoia setting
  32. # End LILO global section
  33. # Linux bootable partition config begins

  34. image = /boot/kernel-2.6.7                     <---在这里添加新内核选项
  35. root = /dev/hda11
  36. label = Slackware-2.6
  37. read-only
  38. append="video=vesafb:ywrap,mtrr"     <---vesa
  39. initrd=/boot/initrd-1024x768                 <----initrd-1024x768稍后会提到如何制作。

  40. image = /boot/vmlinuz
  41.   root = /dev/hda11
  42.   label = Slackware
  43.   read-only # Non-UMSDOS filesystems should be mounted read-only for checking
  44. # Linux bootable partition config ends
  45. # Windows bootable partition config begins
  46. other = /dev/hda1
  47.   label = Windows
  48.   table = /dev/hda
  49. # Windows bootable partition config ends
复制代码
 楼主| 发表于 2004-6-28 22:25:14 | 显示全部楼层
现在用pkgtool安装下载的bootsplash-3.1-i486-1.tgz
如果在编译内核之前安装也没关系。

安装后你的/etc/rc.d/目录里就有rc.bootsplash,rc.splash
两个启动脚本。
修改rc.splash
改成我这样的:让6个tty都有漂亮的背景。

  1. # start_console : first fb console to display bootsplash
  2. # console numeber is zero based!
  3. # start_console = 1 Ctrl+Alt+F2
  4. start_console=0
  5. # end_console : last fb console to display bootsplash
  6. # end_console = 5 Ctrl+Alt+F6
  7. end_console=5
复制代码


按照rc.splash注释中的提示修改/etc/rc.d/rc.local
添加这段,如果不加只有一个终端有背景。

  1. if [ -x /etc/rc.d/rc.splash ]; then
  2.        . /etc/rc.d/rc.splash
  3. fi
复制代码


看看你的/etc/bootsplash/themes/目录。
顾名思议就是不同的主题。
选个你喜欢的,把它的目录链接为current

用splash命令制作initrd-1024x768
[PHP]
#/sbin/splash -s -f /etc/bootsplash/themes/current/config/bootsplash-1024x768.cfg > /boot/initrd-1024x768
[/PHP]

执行lilo,生成新的开机选单,然后重启就可以看到漂亮的背景了。
 楼主| 发表于 2004-6-28 22:28:25 | 显示全部楼层
如果不需要bootsplash了。
那么进/etc/rc.d/
[PHP]
#chmod -x rc.bootsplash
#chmod -x rc.splash
[/PHP]
编辑lilo.conf
把最后两行前加#注销掉。
[PHP]
#append="video=vesafb:ywrap,mtrr"
#initrd=/boot/initrd-1024x768   
[/PHP]
或者,就把bootsplash-3.1-i486-1.tgz删掉吧。
发表于 2004-6-28 22:55:39 | 显示全部楼层
请问怎样打补丁?
发表于 2004-6-28 23:01:32 | 显示全部楼层
请问这一项在哪?
              Bootsplash configuration  --->
                        
  • Bootup splash screen
  •  楼主| 发表于 2004-6-28 23:10:33 | 显示全部楼层
    最初由 dyte100 发表
    请问这一项在哪?
                  Bootsplash configuration  --->
                            
  • Bootup splash screen

  • 已经加上了,打上补丁才有这选现。
    发表于 2004-6-28 23:22:31 | 显示全部楼层
    patch -Np1 -i  ../bootsplash-3.1.4-sp1-2.6.7.diff
    后在make menuconfig中可以看到Bootsplash configuration --->
    了,但就是打不开下拉项
     楼主| 发表于 2004-6-28 23:30:20 | 显示全部楼层
    最初由 dyte100 发表
    patch -Np1 -i  ../bootsplash-3.1.4-sp1-2.6.7.diff
    后在make menuconfig中可以看到Bootsplash configuration --->
    了,但就是打不开下拉项

    你必须选上前面提到的那些。
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

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