daily pastebin goal
75%
SHARE
TWEET

Z.E.S. Linux unpack

tolikpunkoff Dec 15th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top