PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free!
Click here to download the new Pastebin App for iOS
.
Public Pastes
Untitled
0 sec ago
Untitled
1 sec ago
Untitled
6 sec ago
Untitled
6 sec ago
Untitled
9 sec ago
Untitled
10 sec ago
===>Sell Cvv + ...
18 sec ago
Untitled
11 sec ago
New Paste
# Local filesystem mounting -*- shell-script -*- # ################################################################ # File: # /scripts/local # # Root, or / in these notes is the initrd's (busybox) root, # not your system's root! # # You need the aufs module for this to work. To do this install # aufs on your base install, add aufs to: /etc/initramfs-tools/modules # Now using your target kernel run: # mkinitramfs -o initrd.img <kernel-name> # # make a directory, copy an initrd to it then cd to it and: # # mv initrd.img initrd.img.gz # gunzip initrd.img.gz # # make sure aufs exists somewhere in /lib/modules/<uname -r>/ # After modifying local script, etc do the following in the initrd's # root folder where /bin and /lib etc is to create a new initrd: # # find ./ -print | cpio -H newc -o > ../newinitrd.img # # Now tell grub to use this initrd for a RO root filesystem # # Note fstab gets hosed, if you need an fstab, make sure this # script reflects that. I use an fstab for the default initrd for RW # and none for RO, but you can make this script use a different one for # RO if you want. ################################################################ # Parameter: device node to check # Echos fstype to stdout # Return value: indicates if an fs could be recognized get_fstype () { local FS FSTYPE FSSIZE RET FS="${1}" # vol_id has a more complete list of file systems, # but fstype is more robust eval $(fstype "${FS}" 2> /dev/null) if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) fi RET=$? if [ -z "${FSTYPE}" ]; then FSTYPE="unknown" fi echo "${FSTYPE}" return ${RET} } # Parameter: Where to mount the filesystem mountroot () { [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top" run_scripts /scripts/local-top [ "$quiet" != "y" ] && log_end_msg wait_for_udev 10 # If the root device hasn't shown up yet, give it a little while # to deal with removable devices if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then log_begin_msg "Waiting for root file system" # Default delay is 180s if [ -z "${ROOTDELAY}" ]; then slumber=180 else slumber=${ROOTDELAY} fi if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "TIMEOUT ${slumber}" || true fi slumber=$(( ${slumber} * 10 )) while [ ! -e "${ROOT}" ] \ || ! $(get_fstype "${ROOT}" >/dev/null); do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) [ ${slumber} -gt 0 ] || break done if [ ${slumber} -gt 0 ]; then log_end_msg 0 else log_end_msg 1 || true fi if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "TIMEOUT 15" || true fi fi # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do # give hint about renamed root case "${ROOT}" in /dev/hd*) suffix="${ROOT#/dev/hd}" major="${suffix%[[:digit:]]}" major="${major%[[:digit:]]}" if [ -d "/sys/block/sd${major}" ]; then echo "WARNING bootdevice may be renamed. Try root=/dev/sd${suffix}" fi ;; /dev/sd*) suffix="${ROOT#/dev/sd}" major="${suffix%[[:digit:]]}" major="${major%[[:digit:]]}" if [ -d "/sys/block/hd${major}" ]; then echo "WARNING bootdevice may be renamed. Try root=/dev/hd${suffix}" fi ;; esac echo "Gave up waiting for root device. Common problems:" echo " - Boot args (cat /proc/cmdline)" echo " - Check rootdelay= (did the system wait long enough?)" echo " - Check root= (did the system wait for the right device?)" echo " - Missing modules (cat /proc/modules; ls /dev)" panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" done # Get the root filesystem type if not set if [ -z "${ROOTFSTYPE}" ]; then FSTYPE=$(get_fstype "${ROOT}") else FSTYPE=${ROOTFSTYPE} fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount [ "$quiet" != "y" ] && log_end_msg if [ "${readonly}" = "y" ]; then roflag=-r else roflag=-w fi # FIXME This has no error checking modprobe ${FSTYPE} ########################################################################## ###### Mod'd by Brian Phelps aka Electronjunkie ########################## mkdir /root/.tmpfs mkdir /root/.rootfs mount -r -t ext2 /dev/sda1 /root/.rootfs modprobe aufs modprobe loop mount -t tmpfs -o size=20M tmpfs /root/.tmpfs mount -t aufs -o br:/root/.tmpfs=rw:/root/.rootfs=ro none /root/ mv /root/etc/fstab /root/etc/fstab.defunct ######################################################################### # FIXME This has no error checking # Mount root [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom" run_scripts /scripts/local-bottom [ "$quiet" != "y" ] && log_end_msg }
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login