Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DISISO="$HOME/Downloads/linuxmint-18.3-xfce-64bit.iso"
- mkdir ~/livecdtmp
- cd ~/livecdtmp
- mkdir extract-cd mnt
- sudo mount -o loop "$DISISO" mnt
- sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
- sudo unsquashfs mnt/casper/filesystem.squashfs
- sudo mv squashfs-root edit
- sudo cp /etc/resolv.conf edit/etc/
- sudo mount --bind /dev/ edit/dev
- sudo mount -t devpts devpts edit/dev/pts
- sudo mount -t proc proc edit/proc
- sudo mount -t sysfs sysfs edit/sys
- cd ~/livecdtmp/edit/etc/skel
- sudo mkdir Desktop Documents Downloads Music Pictures Public Templates Videos
- cd ~/livecdtmp/edit
- sudo chroot ~/livecdtmp/edit bash
- #####Run These Commands in Chroot#####
- export HOME=/root && export LC_ALL=C
- ###When Complete run these Commands###
- apt-get clean
- apt-get autoremove
- rm -rf /tmp/* ~/.bash_history
- exit
- ###After Eixting Chroot###
- sudo umount ~/livecdtmp/edit/proc/sys/fs/binfmt_misc
- sudo umount ~/livecdtmp/edit/proc
- sudo umount ~/livecdtmp/edit/sys
- sudo umount ~/livecdtmp/dev/pts
- sudo umount ~/livecdtmp/edit/dev
- sudo umount ~/livecdtmp/mnt
- echo "Creating ISO"
- sleep 3
- sudo rm ~/livecdtmp/extract-cd/casper/filesystem.squashfs
- cd ~/livecdtmp
- sudo mksquashfs edit extract-cd/casper/filesystem.squashfs
- sudo vim extract-cd/README.diskdefines
- cd ~/livecdtmp/extract-cd
- sudo rm MD5SUMS
- find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee MD5SUMS
- cd ~/livecdtmp
- sudo genisoimage -l -r -J -V "REMASTER" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ~/REMASTER.iso extract-cd
- cd ~
- sudo chmod 777 ~/REMASTER.iso
Add Comment
Please, Sign In to add comment