请问该如何把我制作好的LFS系统做成iso?
时间:2007-09-01
来源:互联网
作者: kk526 发布时间: 2007-09-01
作者: harmony.relax 发布时间: 2007-09-01
作者: brhyh 发布时间: 2007-09-01
从上面知道了在一个root.ext2基础上,修改并重新生成iso的过程。
Chroot to the filesystem:
chroot $WORK/root
In the chroot, change the current directory to /build, and install any
additional packages you want. Modify other files as necessary.
Get the initramfs files as a zip archive from
http://wiki.linuxfromscratch.org/liv...ages/initramfs
Unzip the archive. Remove the "include $(ROOT)/scripts/functions" line from the
Makefile. Generate the initramfs image for your CD:
make compile-stage2 VERSION="x86-6.3-custom"
(you can replace the "x86-6.3-custom" with your own string). This produces the
initramfs_data.cpio.gz file in the current directory. If this directory is not
"/build", copy it to /build:
cp initramfs_data.cpio.gz /build
Exit from the chroot and clean up the mounts:
exit
umount $WORK/root/dev/shm
umount $WORK/root/dev/pts
umount $WORK/root/sys
umount $WORK/root/proc
umount $WORK/root/build
rmdir $WORK/root/build
Clean up bash history:
rm $WORK/root/root/.bash_history
You may also want to remove other history files.
If you, by mistake, created and removed some files, the sectors previously
occupied by those files begin to contain non-zero data. Such sectors are
useless, but they don't compress well. Zero them out:
dd if=/dev/zero of=$WORK/root/zeroes
This command will print a message that the disk is full. This is not an error.
Then, remove the file that fills the filesystem:
rm $WORK/root/zeroes
Now you can unmount the root.ext2 file:
umount $WORK/root
sync
The "sync" command is needed due to a bug in the loop driver in some kernels
that leads to a filesystem with errors otherwise.
Now make the directory structure for your LiveCD:
mkdir $WORK/iso
Copy the directory structure from the original LiveCD:
cp -r /media/cdrom/*/ $WORK/iso
Replace the stock initramfs image with your own:
cp $WORK/build/initramfs_data.cpio.gz \
$WORK/iso/boot/isolinux/iniramfs_data.cpio.gz
Recompress the root.ext2 file:
mkzftree -F $WORK/root.ext2 $WORK/iso/root.ext2
Recreate the CD image:
cd $WORK/iso ; mkisofs -z -R -l --allow-leading-dots -D -o \
../lfslivecd-x86-6.3-custom.iso -b boot/isolinux/isolinux.bin \
-c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
-V "lfslivecd-x86-6.3-custom" ./
Burn and test. Have a fun.
有了一个大比较模糊的思路:
1. 把当前整个系统做成一个类似于root.ext2的包
2. 制作自己的initramfs image
3. 制作iso镜像
现在我的问题是,这个root.ext2的镜像包,应该怎么生成呢?是否有工具?
作者: kk526 发布时间: 2007-09-01
作者: d00m3d 发布时间: 2007-09-01
将通过lfs制作的操作系统,作也安装盘,可方便的安装其它机子上使用。
作者: life_31 发布时间: 2008-12-25
作者: ServerOnly 发布时间: 2008-12-28
http://packages.debian.org/sid/bootcd
作者: 聚焦深空 发布时间: 2008-12-29
作者: life_31 发布时间: 2008-12-29
http://blog.chinaunix.net/u2/81513/showart_1308328.html
作者: figured69 发布时间: 2008-12-31
下载软件并安装zisofs-tools:
cd /usr/local/src wget http://www.kernel.org/pub/linux/util...s-1.0.8.tar.gz tar xvf zisofs-tools-1.0.8.tar.gz cd zisofs-tools-1.0.8 ./configure && make && make install
cd /mnt dd if=/dev/zero of=root.ext2 bs=1M count=100 mkfs.ext2 root.ext2 ls -lh mkdir -pv /mnt/iso mount -o loop -t ext2 root.ext2 /mnt/iso cd /mnt/iso dd if=/dev/zero of=bigfile bs=1M count=50 ls -h bigfile cd .. umount /mnt/iso mkzftree -F root.ext2 /tmp/root.ext2 ls -lh /tmp/root.ext2 rm -rvf root.ext2 mkzftree -F -u /tmp/root.ext2 root.ext2 ls -lh
注:
1、内核要支持透明压缩文件;
2、内核要支持loop设备;
3、不压缩的root.ext2类似与ISO文件,只是文件系统类型为ext2。
作者: lonelycloud 发布时间: 2009-01-05
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28