制作FC8 LiveCD并使用squashfs进行改动

来源:互联网 发布:淘宝补差价怎么弄 编辑:程序博客网 时间:2024/05/21 18:33
原文出处:http://forums.fedoraforum.org/showthread.php?t=174916

  1. # I copy these files to /home and make adjustments there so the originals don't get hosed.
  2. livecd-fedora-8-base-desktop.ks
  3. livecd-fedora-8-kde.ks


  4. livecd-creator /
  5. --config=/home/livecd-fedora-8-kde.ks /
  6. --fslabel=Fedora-8-LiveCD-KDE


  7. # Mount the livecd iso so we can make some changes
  8. mkdir /home/iso
  9. mount -t iso9660 -o loop /home/Fedora-8-LiveCD-KDE.iso /home/iso


  10. # Check /home/iso for these files and folders
  11. GPL
  12. isolinux
  13. LiveOS
  14. README

  1. # You need to load the squashfs module

  2. (echo '#!/bin/sh'echo 'modprobe squashfs') /
  3. > /etc/sysconfig/modules/squashfs.modules
  4. chmod +x /etc/sysconfig/modules/squashfs.modules

  1. # You can enable the squashfs module without rebooting with this command:
  2. modprobe squashfs

  1. # Install squashfs-tools
  2. yum install squashfs-tools


  3. # The contents of the iso root filesystem is located in the file squashfs.img
  4. # Unpack squashfs.img to a folder called squashfs-root
  5. unsquashfs /home/iso/LiveOS/squashfs.img


  6. # Mount the /home/squashfs-root/LiveOS/ext3fs.img to a folder with the command:
  7. mkdir /home/livecd-root
  8. mount -o loop,rw /home/squashfs-root/LiveOS/ext3fs.img /home/livecd-root


  9. # Make some changes, For example:
  10. # Adding yum repos to the livecd environment
  11. rpm -ihv http://livna-dl.reloumirrors.net//
  12. fedora/8/i386/livna-release-8-1.noarch.rpm --root /home/livecd-root/


  13. rpm -ihv http://ayo.freshrpms.net/fedora/linux/8/i386//
  14. RPMS.freshrpms/freshrpms-release-1.1-1.fc.noarch.rpm --root /home/livecd-root/


  15. # Make a list of installed packages so you have a better idea
  16. # of what needs to be installed or removed
  17. rpm -qa --root /home/livecd-root/ | sort >list.txt


  18. # Add or remove packages with the yum package manager
  19. yum  install gimp --installroot=/home/livecd-root
  20. yum  remove ktorrent --installroot=/home/livecd-root
  21. yum  clean all --installroot=/home/livecd-root
  22. updatedb -U /home/livecd-root

  1. Copy your desktop settings to the livecd environment
  2. rm -rf /home/livecd-root/etc/skel
  3. mkdir /home/livecd-root/etc/skel
  4. rsync -av --exclude='.thunderbird' /home/fred/ /home/livecd-root/etc/skel
  5. chown -R root:root /home/livecd-root/etc/skel//.

  1. # Unmount the ext3fs.img and make a new squashfs.img
  2. umount /home/livecd-root
  3. mksquashfs squashfs-root squashfs.img

  1. # Create a folder called build for making the new iso image
  2. mkdir /home/build
  3. rsync -av --exclude='squashfs.img' /home/iso/ /home/build
  4. mv /home/squashfs.img /home/build/LiveOS
  5. umount /home/iso

  6. # When making a new iso image the cd volume label
  7. # needs to match the isolinux.cfg entry
  8. # ( root=CDLABEL=Fedora-8-LiveCD-KDE )
  9. cd /home/build

  10. 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" .
0 0
原创粉丝点击