Advertisement
tolikpunkoff

Z.E.S. Linux unpack

Dec 15th, 2017
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. RDMP="/mnt/ramzes"
  4. LDRKRNLPATH="./ldrkrnl/"
  5. LDRKRNLNAME="ldrkrnl.img"
  6.  
  7. echo "Making dirs"
  8. mkdir $RDPATH
  9. mkdir $RDMP
  10. mkdir $LDRKRNLPATH
  11.  
  12. echo "Extracting RAMDISK..."
  13. dd bs=1 if=$IMGPATH of=$RDPATH$RDGZNAME skip=464896
  14.  
  15. echo "Extracting loader and kernel"
  16. dd bs=1 if=$IMGPATH of=$LDRKRNLPATH$LDRKRNLNAME count=464896
  17.  
  18. echo "Unpacking RAMDISK..."
  19. cd $RDPATH
  20. gzip -d $RDGZNAME
  21. cd ..
  22.  
  23. echo "Mount RAMDISK"
  24. mount -o loop $RDPATH$RDNAME $RDMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement