定制rhel的stage2.img/minstg2.img文件

简介: 一个普通的redhat安装过程,是从vmlinuz开始引导,内核将Initrd.img文件调入内存并解开,然后执行Initrd.img中的loader/linuxrc/init程序,将stage2.img或者是minstg2.img挂载到内存里。

一个普通的redhat安装过程,是从vmlinuz开始引导,内核将Initrd.img文件调入内存并解开,然后执行Initrd.img中的loader/linuxrc/init程序,将stage2.img或者是minstg2.img挂载到内存里。

stage2.img,是通过isolinux安装系统使用的stage文件。如果是通过pxelinux来引导,那么就是用minstg2.img文件。

minstg2.img的size是39M,是stage2.img的一半。

minstg2.img/stage2.img,使用的是squashfs。如果需要定制这两个文件的内容,首先需要安装squashfs-tools。

解开stage2.img/minstg2.img的方法:

unsquashfs -v ***/minstg2.img
           -> squashfs-root/
mount -t squashfs -o loop ***/images/stage2.img stage2
cp /mnt/stage2/usr/sbin/lspci squashfs-root/usr/sbin/

生成新的stage2.img/minstg2.img的方法:

mksquashfs squashfs-root/ minstg2.img -noappend
cp minstg2.img ****/images/
目录
相关文章
|
4月前
|
Linux Windows
qemu-img 转换镜像格式
【1月更文挑战第2天】
111 1
|
缓存 前端开发 JavaScript
浅析data:image/png;base64的应用
浅析data:image/png;base64的应用
457 0
浅析data:image/png;base64的应用
|
Ubuntu Linux 应用服务中间件
|
数据挖掘 TensorFlow 算法框架/工具
Load and preprocess images
This tutorial shows how to load and preprocess an image dataset in three ways. First, you will use high-level Keras preprocessing utilities and layers to read a directory of images on disk. Next, you will write your own input pipeline from scratch using tf.data. Finally, you will download a dataset
171 0
|
计算机视觉
img = img1*mask + img2*(1-mask) How do that ?
原文地址:http://answers.opencv.org/question/160599/img-img1mask-img21-mask-how-do-that/ 如何提高一个简单操作的速度?最后的multiply方法很有启示。
1140 0