Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DISISO="$HOME/Downloads/grml64-small_2017.05.iso"
- squashfs="/live/grml64-full/grml64-full.squashfs"
- mkdir ~/livecdtmp
- cd ~/livecdtmp
- mkdir extract-cd mnt
- sudo mount -o loop "$DISISO" mnt
- sudo rsync --exclude=$squashfs -a mnt/ extract-cd
- sudo unsquashfs mnt$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
- sudo mount -o bind /run ~/livecdtmp/edit/run
- cd ~/livecdtmp/edit
- sudo chroot ~/livecdtmp/edit zsh
- #####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/edit/dev/pts
- sudo umount ~/livecdtmp/edit/dev
- sudo umount ~/livecdtmp/mnt
- sudo umount ~/livecdtmp/edit/run
- echo "Creating ISO"
- sleep 3
- cd ~/livecdtmp
- sudo mksquashfs edit extract-cd$squashfs
- sudo genisoimage -l -r -J -V "REMASTER" -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c boot/isolinux/boot.cat -o ~/REMASTER.iso ~/livecdtmp/extract-cd
- cd ~
- sudo chmod 777 ~/REMASTER.iso
Add Comment
Please, Sign In to add comment