pastebin - collaborative debugging tool
kpaste.kpaste.net RSS


Untitled
Posted by Anonymous on Fri 25th Dec 2020 02:11
raw | new post

  1. #!/bin/sh
  2. PREREQ=''
  3. prereqs() {
  4.   echo "$PREREQ"
  5. }
  6. case $1 in
  7. prereqs)
  8.   prereqs
  9.   exit 0
  10.   ;;
  11. esac
  12. . /usr/share/initramfs-tools/hook-functions
  13. manual_add_modules aufs
  14. manual_add_modules tmpfs
  15. copy_exec /bin/chmod /bin
  16.  
  17. -----------------------------------
  18.  
  19. #!/bin/sh
  20. PREREQ=''
  21. prereqs() {
  22.   echo "$PREREQ"
  23. }
  24. case $1 in
  25. prereqs)
  26.   prereqs
  27.   exit 0
  28.   ;;
  29. esac
  30. if grep single /proc/cmdline >/dev/null; then
  31.   exit 0
  32. fi
  33. ro_mount_point="${rootmnt%/}.ro"
  34. rw_mount_point="${rootmnt%/}.rw"
  35. mkdir "${ro_mount_point}" "${rw_mount_point}"
  36. mount --move "${rootmnt}" "${ro_mount_point}"
  37. mount -t tmpfs -o "noatime,nodiratime" root.rw "${rw_mount_point}"
  38. mount -t aufs -o "dirs=${rw_mount_point}=rw:${ro_mount_point}=ro,noatime,nodiratime" root.union "${rootmnt}"
  39. chmod 755 "${rootmnt}"
  40. mkdir "${rootmnt}/ro" "${rootmnt}/rw"
  41. mount --move "${ro_mount_point}" "${rootmnt}/ro"
  42. mount --move "${rw_mount_point}" "${rootmnt}/rw"
  43. rm -f "${rootmnt}/etc/rcS.d"/S[0-9][0-9]checkroot.sh
  44.  
  45. -----------------------------------
  46.  
  47. mega.nz/file/xE82mZ4B#V9kbyO82-VFm834gC62-M9w1_R_WdxZR3_EHIMCCd3Y

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at