linux root fs生成

 1 zcat ../initramfs-4.18.0-240.el8.x86_64.img | cpio -idmv
 2 rpm -ivh ./KMOD_MEGARAID_SAS_07_714_04.rpm
 3 depmode -b root 
 4 dracut --force
 5 cat /lib/modules/`uname -r`/modules.alias | grep megaraid_sas | grep 73
 6 lsinitrd | grep megaraid_sas
 7 /usr/lib/dracut/skipcpio <initramfs-file> | zcat | cpio -id --no-absolute-filenames
 8 find . | cpio -o -H newc | gzip > ../rootfs_cpio.img
 9 https://ahelpme.com/linux/tips/unpack-centos-7-initramfs-file-with-and-without-dracut-skipcpio/
10 https://www.jianshu.com/p/218544a3531b
11 解压新版cpio:
12 https://www.jianshu.com/p/218544a3531b

 

posted @ 2023-03-06 14:44  maojun1998  阅读(42)  评论(0编辑  收藏  举报