Advertisement
Guest User

Untitled

a guest
Jun 25th, 2013
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. #!/bin/sh
  2. export PATH=/bin:/sbin:/usr/bin:/usr/sbin
  3. echo "PLD PXE"
  4.  
  5. /bin/mount -v -n -t tmpfs -o mode=0755,size=1m none /initrd
  6.  
  7. #/bin/mount -v -n -t proc none /proc
  8.  
  9. mkdir /initrd/ro
  10. mkdir /initrd/rw
  11. mkdir /initrd/pld
  12.  
  13. /bin/mount -v -n -t tmpfs -o mode=0755,size=8m none /initrd/rw
  14.  
  15. # /bin/mount -n -t squashfs /dev/root /initrd/ro
  16. /bin/mount -v -n -o bind / /initrd/ro
  17.  
  18. #/bin/mount -v -n -t unionfs none /initrd/pld -o dirs=/initrd/rw=rw:/initrd/ro=ro
  19. /bin/mount -v -n -t aufs none -o br=/initrd/rw=rw:/initrd/ro=ro /initrd/pld
  20.  
  21. # wywalenie tego linuxrc
  22. /bin/rm -v /initrd/pld/linuxrc*
  23.  
  24. #/bin/mount -v -n -t tmpfs -o mode=0755,size=1m none /initrd/pld/initrd
  25.  
  26. cd /initrd/pld
  27. #/bin/mount -v -n -t tmpfs -o mode=0755,size=1m none initrd
  28. #/bin/umount -v -n /proc
  29.  
  30. pivot_root . initrd
  31.  
  32. # /sbin/pivot_root /initrd/pld /initrd/pld/initrd
  33.  
  34. echo "Uruchamiamy init"
  35. exec /usr/sbin/chroot . /sbin/init $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement