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.第二次测试启动


wKioL1hL3tvjsHkjAABS1c9mW3Y238.png-wh_50


 

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.第三次测试启动


wKiom1hL3yKwvmptAAArz8y9wZQ299.png-wh_50