首页 > 系统服务 > 详细

从无到有构建一个Mini Linux(2)

时间:2016-12-10 23:09:11      阅读:268      评论:0      收藏:0      [点我收藏+]


6.重新编译内核使其识别ext4文件系统

7.第二次测试启动

8.使用bash程序模拟init

9.第三次测试启动



6.重新编译内核使其识别ext4文件系统

[root@centos6 ~]# cd /usr/src/linux
[root@centos6 linux]# make menuconfig

//选择ext4文件驱动
File systems  --->
	<*> The Extended 4 (ext4) filesystem
	[*]   Ext4 POSIX Access Control Lists 
Executable file formats / Emulations  --->
	[*] Kernel support for ELF binaries 支持的可执行文件的格式
	<*> Kernel support for scripts starting with #!
	

[root@centos6 linux]# make bzImage

//覆盖原来的内核文件
[root@centos6 linux]# cp arch/x86/boot/bzImage /mnt/boot/vmlinuz 
cp: overwrite ‘/mnt/boot/vmlinuz‘? y



7.第二次测试启动


技术分享


 

8.用bash程序模拟init

[root@centos6 ~]# ./copycmd.sh   
//命令复制程序(复制命令和对应的库文件 我们这里复制/bin/bash测试)
[root@centos6 ~]# vim /mnt/boot/grub/grub.conf
default=0
timeout=5
hiddenmenu
title sxj Minu
        root (hd0,0)
        kernel /vmlinuz root=/dev/sda2 init=/bin/bash


9.第三次测试启动


技术分享




本文出自 “似水流年” 博客,请务必保留此出处http://sixijie123.blog.51cto.com/11880770/1881531

从无到有构建一个Mini Linux(2)

原文:http://sixijie123.blog.51cto.com/11880770/1881531

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!