Created
November 18, 2012 05:27
-
-
Save uobikiemukot/4103771 to your computer and use it in GitHub Desktop.
append some files to Archlinux LiveCD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ./mkarchiso.sh ISO_IMAGE | |
YAFT_32=~haru/yaft/yaft_32 | |
YAFT_64=~haru/yaft/yaft_64 | |
TERMINFO=~haru/yaft/info/yaft.src | |
KEYMAP=~haru/tmp/special/us-fix.map.gz | |
ISO=$1 | |
mkdir -p /tmp/iso /tmp/ext | |
bsdtar xf $ISO -C /tmp/iso | |
cd /tmp | |
unsquashfs -d sfs-i686 iso/arch/i686/root-image.fs.sfs | |
unsquashfs -d sfs-x86_64 iso/arch/x86_64/root-image.fs.sfs | |
unsquashfs -d sfs-any iso/arch/any/usr-share.fs.sfs | |
mount sfs-i686/root-image.fs ext | |
cp $YAFT_32 ext/usr/bin/yaft | |
umount ext | |
mount sfs-x86_64/root-image.fs ext | |
cp $YAFT_64 ext/usr/bin/yaft | |
umount ext | |
mount sfs-any/usr-share.fs ext | |
tic -o ext/terminfo/ $TERMINFO | |
cp $KEYMAP ext/kbd/keymaps/i386/qwerty/ | |
umount ext | |
mksquashfs sfs-i686/root-image.fs{,.sfs} -noappend -comp xz -no-progress | |
mksquashfs sfs-x86_64/root-image.fs{,.sfs} -noappend -comp xz -no-progress | |
mksquashfs sfs-any/usr-share.fs{,.sfs} -noappend -comp xz -no-progress | |
cp -f sfs-i686/root-image.fs.sfs iso/arch/i686/ | |
cp -f sfs-x86_64/root-image.fs.sfs iso/arch/x86_64/ | |
cp -f sfs-any/usr-share.fs.sfs iso/arch/any/ | |
cd /tmp/iso/arch | |
(sed -n '/^.*i686\/root-image\.fs\.sfs$/!p' checksum.i686.md5; md5sum i686/root-image.fs.sfs) > tmp | |
mv tmp checksum.i686.md5 | |
(sed -n '/^.*x86_64\/root-image\.fs\.sfs$/!p' checksum.x86_64.md5; md5sum x86_64/root-image.fs.sfs) > tmp | |
mv tmp checksum.x86_64.md5 | |
cd /tmp | |
rm -rf sfs-* | |
xorriso -as mkisofs \ | |
-iso-level 3 \ | |
-full-iso9660-filenames \ | |
-volid "ARCH_201211" \ | |
-appid "Arch Linux Live/Rescue CD" \ | |
-publisher "Arch Linux <http://www.archlinux.org>" \ | |
-preparer "prepared by mkarchiso" \ | |
-eltorito-boot isolinux/isolinux.bin \ | |
-eltorito-catalog isolinux/boot.cat \ | |
-no-emul-boot -boot-load-size 4 -boot-info-table \ | |
--efi-boot EFI/archiso/efiboot.img \ | |
-isohybrid-mbr /tmp/iso/isolinux/isohdpfx.bin \ | |
-output "archlinux-2012.11.01-with-yaft.iso" \ | |
"/tmp/iso/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment