몰디브를 꿈꾸며...
live cd에 있는 squashfs.img를 수정하는법 본문
출처 : http://forums.fedoraforum.org/showthread.php?t=174916
# I copy these files to /home and make adjustments there so the originals
don't get hosed.
livecd-fedora-8-base-desktop.ks
livecd-fedora-8-kde.ks
livecd-creator \
--config=/home/livecd-fedora-8-kde.ks \
--fslabel=Fedora-8-LiveCD-KDE
# Mount the livecd iso so we can make some changes
mkdir /home/iso
mount -t iso9660 -o loop /home/Fedora-8-LiveCD-KDE.iso /home/iso
# Check /home/iso for these files and folders
GPL
isolinux
LiveOS
README
# You need to load the squashfs module
(echo '#!/bin/sh'; echo 'modprobe squashfs') \
> /etc/sysconfig/modules/squashfs.modules
chmod +x /etc/sysconfig/modules/squashfs.modules
# You can enable the squashfs module without rebooting with this command:
modprobe squashfs
# Install squashfs-tools
yum install squashfs-tools
# The contents of the iso root filesystem is located in the file squashfs.img
# Unpack squashfs.img to a folder called squashfs-root
unsquashfs /home/iso/LiveOS/squashfs.img
# Mount the /home/squashfs-root/LiveOS/ext3fs.img to a folder with the command:
mkdir /home/livecd-root
mount -o loop,rw /home/squashfs-root/LiveOS/ext3fs.img /home/livecd-root
# Make some changes, For example:
# Adding yum repos to the livecd environment
rpm -ihv http://livna-dl.reloumirrors.net/\
fedora/8/i386/livna-release-8-1.noarch.rpm --root /home/livecd-root/
rpm -ihv http://ayo.freshrpms.net/fedora/linux/8/i386/\
RPMS.freshrpms/freshrpms-release-1.1-1.fc.noarch.rpm --root /home/livecd-root/
# Make a list of installed packages so you have a better idea
# of what needs to be installed or removed
rpm -qa --root /home/livecd-root/ | sort >list.txt
# Add or remove packages with the yum package manager
yum install gimp --installroot=/home/livecd-root
yum remove ktorrent --installroot=/home/livecd-root
yum clean all --installroot=/home/livecd-root
updatedb -U /home/livecd-root
# Copy your desktop settings to the livecd environment
rm -rf /home/livecd-root/etc/skel
mkdir /home/livecd-root/etc/skel
rsync -av --exclude='.thunderbird' /home/fred/ /home/livecd-root/etc/skel
chown -R root:root /home/livecd-root/etc/skel/\.
# Unmount the ext3fs.img and make a new squashfs.img
umount /home/livecd-root
mksquashfs squashfs-root squashfs.img
# Create a folder called build for making the new iso image
mkdir /home/build
rsync -av --exclude='squashfs.img' /home/iso/ /home/build
mv /home/squashfs.img /home/build/LiveOS
umount /home/iso
# When making a new iso image the cd volume label
# needs to match the isolinux.cfg entry
# ( root=CDLABEL=Fedora-8-LiveCD-KDE )
cd /home/build
mkisofs -R -l -L -D -b isolinux/isolinux.bin -c isolinux/boot.catalog -o /home/Modified-Fedora-8-LiveCD-KDE.iso -no-emul-boot -boot-load-size 4 -boot-info-table -V "Fedora-8-LiveCD-KDE" .
'리눅스' 카테고리의 다른 글
fedora 10 재컴파일시 에러 (0) | 2009.08.25 |
---|---|
fedora 10 initrd.img 수정 (0) | 2009.07.10 |
커널 2.6 컴파일 (0) | 2009.07.07 |
OPENBOX를 이용한 GTK 응용프로그램 실행 (0) | 2009.07.07 |
[리눅스]하드디스크 LVM (0) | 2009.06.26 |