我自己编译了一次内核,内核make xconfig里面的配置基本上都是默认的。
最后用mkinitrd 来生成initrd.img文件时,发现竟然有51M
而系统自带的initrd.img,只有6M
这个文件这么大有什么坏处吗?如何让它变小点?
自己编译内核,initrd.img文件过大
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 45
- 注册时间: 2007-07-08 15:24
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星
initrd.img文件其实不需要
按照标准的内核编译方式编译就可以丢掉这个文件
lrwxrwxrwx 1 root root 1 2007-08-14 11:27 boot -> .
lrwxrwxrwx 1 root root 23 2007-08-14 11:27 config -> config-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 31K 2007-07-06 15:47 config-2.6.20-gentoo-r8
drwxr-xr-x 2 root root 1.0K 2007-07-06 14:58 grub
lrwxrwxrwx 1 root root 27 2007-08-14 11:27 System.map -> System.map-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 724K 2007-07-06 15:47 System.map-2.6.20-gentoo-r8
lrwxrwxrwx 1 root root 24 2007-08-14 11:27 vmlinuz -> vmlinuz-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 1.2M 2007-07-06 15:47 vmlinuz-2.6.20-gentoo-r8
内核有2M就足够了
按照标准的内核编译方式编译就可以丢掉这个文件
lrwxrwxrwx 1 root root 1 2007-08-14 11:27 boot -> .
lrwxrwxrwx 1 root root 23 2007-08-14 11:27 config -> config-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 31K 2007-07-06 15:47 config-2.6.20-gentoo-r8
drwxr-xr-x 2 root root 1.0K 2007-07-06 14:58 grub
lrwxrwxrwx 1 root root 27 2007-08-14 11:27 System.map -> System.map-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 724K 2007-07-06 15:47 System.map-2.6.20-gentoo-r8
lrwxrwxrwx 1 root root 24 2007-08-14 11:27 vmlinuz -> vmlinuz-2.6.20-gentoo-r8
-rw-r--r-- 1 root root 1.2M 2007-07-06 15:47 vmlinuz-2.6.20-gentoo-r8
内核有2M就足够了
目前负债150多万
-
- 帖子: 1897
- 注册时间: 2006-09-12 14:09
fideas@zerone /boot $ ls -lh
total 2.4M
lrwxrwxrwx 1 root root 23 2007-08-15 09:40 config -> config-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 48K 2007-08-17 21:02 config-2.6.22-gentoo-r3
drwxr-xr-x 2 root root 1.0K 2007-08-15 20:23 grub
drwx------ 2 root root 12K 2007-08-15 09:34 lost+found
lrwxrwxrwx 1 root root 27 2007-08-15 09:40 System.map -> System.map-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 733K 2007-08-15 09:40 System.map-2.6.22-gentoo-r3
lrwxrwxrwx 1 root root 24 2007-08-15 09:40 vmlinuz -> vmlinuz-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 1.6M 2007-08-17 21:02 vmlinuz-2.6.22-gentoo-r3
total 2.4M
lrwxrwxrwx 1 root root 23 2007-08-15 09:40 config -> config-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 48K 2007-08-17 21:02 config-2.6.22-gentoo-r3
drwxr-xr-x 2 root root 1.0K 2007-08-15 20:23 grub
drwx------ 2 root root 12K 2007-08-15 09:34 lost+found
lrwxrwxrwx 1 root root 27 2007-08-15 09:40 System.map -> System.map-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 733K 2007-08-15 09:40 System.map-2.6.22-gentoo-r3
lrwxrwxrwx 1 root root 24 2007-08-15 09:40 vmlinuz -> vmlinuz-2.6.22-gentoo-r3
-rw-r--r-- 1 root root 1.6M 2007-08-17 21:02 vmlinuz-2.6.22-gentoo-r3
Fair winds and following seas !
- zmcbb30
- 帖子: 2717
- 注册时间: 2006-09-30 0:32
- 来自: 巴拉特星系第四行星──海尼森