-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpack-disk
executable file
·24 lines (19 loc) · 1.32 KB
/
pack-disk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
echo "Generating a new manifest file"
sudo chmod +w cache/extract-cd/casper/filesystem.manifest
sudo chroot disk dpkg-query -W --showformat='${Package} ${Version}\n' | sudo tee cache/extract-cd/casper/filesystem.manifest >/dev/null 2>&1
sudo cp cache/extract-cd/casper/filesystem.manifest cache/extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' cache/extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/casper/d' cache/extract-cd/casper/filesystem.manifest-desktop
echo "Compressing the manifest files"
sudo mksquashfs disk cache/extract-cd/casper/filesystem.squashfs -b 1048576
echo "Refreshing the filesystem.size file used in installer"
printf $(sudo du -sx --block-size=1 disk | cut -f1) | sudo tee cache/extract-cd/casper/filesystem.size
echo "Removing the old md5sum.txt and calculating a new"
cd cache/extract-cd/
sudo rm md5sum.txt
find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt
ISO_NAME="winunix-"`date +"%m.%d.%H.%M"`
sudo xorriso -file_size_limit off
# -compliance iso_9660_level=3
sudo xorriso -as mkisofs -iso-level 3 -isohybrid-mbr isolinux/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat -o ../$ISO_NAME.iso .