Advertisement
thefinn93

OS Unpacker

Aug 23rd, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. #! /bin/bash
  2. echo "USE: $0 [AnonOS.iso]"
  3. CURDIR=`pwd`
  4.  
  5. echo "Installing required tools..."
  6. echo "Benötigte Tools auf dem Ubuntu-Arbeitssystem installieren"
  7. sudo -H aptitude -y install squashfs-tools genisoimage
  8.  
  9. echo "Loading the squashfs module..."
  10. echo "Das squashfs Modul laden..."
  11. sudo -H modprobe squashfs
  12.  
  13. echo "Mounting the .iso..."
  14. echo "Das .iso mounten"
  15. mkdir -p mnt
  16. sudo -H mount -o loop $1 mnt
  17.  
  18. echo "Extracting contents of the iso except filesystem.squashfs to 'extract-cd'"
  19. echo "Inhalt des .iso nach 'extract-cd' extrahieren (außer filesystem.squashfs)"
  20. mkdir -p extract-cd
  21. rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
  22.  
  23.  
  24. echo "Extracting the squashfs contents to 'edit'"
  25. echo "Das squashfs nach 'edit' entpacken"
  26. sudo -H unsquashfs -f -d $CURDIR/edit mnt/casper/filesystem.squashfs
  27. sudo -H umount mnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement