扫一扫
关注微信公众号

Linux内核升级&补丁安装手册6
2007-07-28   网络

可以看到


跟升级时一样修改[根目录对应的分区和默认的启动项].
检查无误重启reboot
启动OK,进行检查
内核版本

CODE:
[root@localhost root]# uname -a
Linux localhost.localdomain 2.4.31-cucme #1 SMP Tue Jul 10 10:49:29 CST 2007 i686 i686 i386 GNU/Linux


文件系统(看squashfs是否编译进内核)

CODE:
[root@localhost root]# cat /proc/filesystems
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev tmpfs
nodev shm
nodev pipefs
ext2
nodev ramfs
iso9660
nodev devpts
squashfs
ext3
nodev usbdevfs
nodev usbfs
nodev autofs


我们看到了squashfs文件系统。
测试squashfs

CODE:
[root@localhost root]# cd /usr/src/squashfs3.1-r2/squashfs-tools/
[root@localhost squashfs-tools]# make
[root@localhost squashfs-tools]# cp mksquashfs unsquashfs /usr/sbin/
[root@localhost root]# mksquashfs /home/307.rm /mnt/test.img
Parallel mksquashfs: Using 1 processor
Creating little endian 3.0 filesystem on /mnt/test.img, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 1583.37 Kbytes (1.55 Mbytes)
97.93% of uncompressed filesystem size (1616.90 Kbytes)
Inode table size 132 bytes (0.13 Kbytes)
79.52% of uncompressed inode table size (166 bytes)
Directory table size 22 bytes (0.02 Kbytes)
100.00% of uncompressed directory table size (22 bytes)
Number of duplicate files found 0
Number of inodes 2
Number of files 1
Number of fragments 0
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of uids 1
root (0)
Number of gids 0


进入mnt下查看下。

CODE:
[root@localhost root]# ll -a /mnt/
total 1596
drwxr-xr-x 2 root root 4096 Jul 10 11:30 .
drwxr-xr-x 21 root root 4096 Jul 10 11:23 ..
-rwx------ 1 root root 1622016 Jul 10 11:30 test.img

我们看到了生成的test.img镜像文件。
关于内核的升级和补丁过程我这两周来就总结这点经验,对于一个老手来说或许是很简单的一件事情,但是对于初学者应该会提供一些帮助吧,当然这里的补丁不一定是squashfs了,也可以是iptables等等。

热词搜索:

上一篇:Linux内核升级&补丁安装手册5
下一篇:概述Linux系统的驱动框架及驱动加载1

分享到: 收藏