aboutsummaryrefslogtreecommitdiff
path: root/init/examples
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2006-07-16 14:53:20 +0200
committerWilly Tarreau <willy@wtap.(none)>2006-07-26 11:00:38 +0200
commit3462eae1e5f60349b089529769a159c4df4375ed (patch)
treec968456ec80963acfd6e4f13c71c9905dac39d81 /init/examples
parent[RELEASE] flxutils-0.1.11 (diff)
downloadflxutils-3462eae1e5f60349b089529769a159c4df4375ed.tar.xz
[RELEASE] flxutils-0.1.11.1v0.1.11.1
Diffstat (limited to 'init/examples')
-rwxr-xr-xinit/examples/.linuxrc82
-rwxr-xr-xinit/examples/.preinit83
2 files changed, 165 insertions, 0 deletions
diff --git a/init/examples/.linuxrc b/init/examples/.linuxrc
new file mode 100755
index 0000000..24c7300
--- /dev/null
+++ b/init/examples/.linuxrc
@@ -0,0 +1,82 @@
+#!/linuxrc <
+# mem, kmem, null, zero, random, urandom, tty0, tty, console, ptmx, initctl
+# full, fd
+
+md /var 755
+md /proc 755
+md /cdrom 755
+ln var/tmp /tmp
+
+mt /proc /proc proc rw
+mt /var /var tmpfs rw mode=755
+md /var/tmp 1777
+md /var/run 755
+md /dev/pts 755
+
+bl 0600 0 0 3 0 hd[c,ab,64][I,0-16,1]
+bl 0600 0 0 22 0 hd[c,cd,64][I,0-16,1]
+bl 0600 0 0 33 0 hd[c,ef,64][I,0-16,1]
+bl 0600 0 0 8 0 sd[c,a-h,16][I,0-15,1]
+md /dev/rd 755 # DAC960 raid disks (majors 48-55)
+bl 0600 0 0 48 0 rd/c0d[i,0-31,8]
+bl 0600 0 0 48 1 rd/c0d[i,0-31,8]p[i,1-7,1]
+md /dev/ida 755 # Compaq raid disks (majors 72-79)
+bl 0600 0 0 72 0 ida/c0d[i,0-15,16]
+bl 0600 0 0 72 1 ida/c0d[i,0-15,16]p[i,1-15,1]
+md /dev/cciss 755 # Compaq CCISS raid disks (major 104)
+bl 0600 0 0 104 0 cciss/c0d[i,0-15,16]
+bl 0600 0 0 104 1 cciss/c0d[i,0-15,16]p[i,1-15,1]
+bl 0600 0 0 11 0 sr[i,0-16,1]
+ch 0600 0 0 9 0 st[i,0-15,1]
+bl 0600 0 0 9 0 md[i,0-15,1]
+bl 0600 0 0 2 0 fd0
+bl 0600 0 0 2 28 fd0u1440
+ch 0600 0 5 2 0 pty[c,p-za-f,16][h,0-f,1]
+ch 0600 0 5 3 0 tty[c,p-za-f,16][h,0-f,1]
+ch 0600 0 5 4 1 tty[i,1-12,1]
+bl 0600 0 0 7 0 loop[i,0-9,1]
+bl 0600 0 0 1 0 ram[i,0-9,1]
+ch 0600 0 5 4 64 ttyS[i,0-9,1]
+ch 0600 0 3 10 1 psaux
+bl 0400 0 0 1 250 initrd
+md /dev/input 755
+ch 0600 0 0 13 63 input/mice
+
+ln psaux /dev/mouse
+
+ec "Looking for a valid CDROM."
+ex /sbin/findcdrom
+&{
+ ec "Found! Mounting the CDROM..."
+ mt /dev/cdrom /cdrom iso9660 ro
+ &ec "Done."
+ |ec "Failed."
+}
+|{
+ ec "No CDROM found. You can try by yourself : 'ex /sbin/findcdrom'."
+ ec "Then mount it into /cdrom : 'mt /dev/cdrom /cdrom iso9660 ro'."
+ rd
+}
+
+# we don't need all this anymore.
+um /var
+um /proc
+
+# pivot_root only works on mount points, so we'll fake
+# /cdrom by remounting /cdrom/root into it
+bi /cdrom/root /cdrom
+bi /dev /cdrom/dev
+pr /cdrom mnt/initrd
+|rd "<pr /cdrom mnt/initrd> failed !!! Try by hand..."
+
+um /mnt/initrd/dev
+um /mnt/initrd/cdrom /mnt/cdrom
+um /mnt/initrd
+
+te RDSHELL=1
+&rd "You have requested this prompt by appending RDSHELL=1 to the kernel cmd line."
+
+in /sbin/init
+
+# now we're on the root, and /dev will be unmounted on exit
+
diff --git a/init/examples/.preinit b/init/examples/.preinit
new file mode 100755
index 0000000..fead5ba
--- /dev/null
+++ b/init/examples/.preinit
@@ -0,0 +1,83 @@
+#!/sbin/init <
+# mem, kmem, null, zero, random, urandom, tty0, tty, console, ptmx, initctl
+# full, fd
+mt /proc /proc proc rw
+mt /var /var tmpfs rw mode=755
+md /var/tmp 1777
+md /var/run 755
+md /dev/pts 755
+
+bl 0600 0 0 3 0 hd[c,ab,64][I,0-16,1]
+bl 0600 0 0 22 0 hd[c,cd,64][I,0-16,1]
+bl 0600 0 0 33 0 hd[c,ef,64][I,0-16,1]
+bl 0600 0 0 8 0 sd[c,a-h,16][I,0-15,1]
+md /dev/rd 755 # DAC960 raid disks (majors 48-55)
+bl 0600 0 0 48 0 rd/c0d[i,0-31,8]
+bl 0600 0 0 48 1 rd/c0d[i,0-31,8]p[i,1-7,1]
+md /dev/ida 755 # Compaq raid disks (majors 72-79)
+bl 0600 0 0 72 0 ida/c0d[i,0-15,16]
+bl 0600 0 0 72 1 ida/c0d[i,0-15,16]p[i,1-15,1]
+md /dev/cciss 755 # Compaq CCISS raid disks (major 104)
+bl 0600 0 0 104 0 cciss/c0d[i,0-15,16]
+bl 0600 0 0 104 1 cciss/c0d[i,0-15,16]p[i,1-15,1]
+bl 0600 0 0 11 0 sr[i,0-16,1]
+ch 0600 0 0 9 0 st[i,0-15,1]
+bl 0600 0 0 9 0 md[i,0-15,1]
+bl 0600 0 0 2 0 fd0
+bl 0600 0 0 2 28 fd0u1440
+ch 0600 0 5 2 0 pty[c,p-za-f,16][h,0-f,1]
+ch 0600 0 5 3 0 tty[c,p-za-f,16][h,0-f,1]
+ch 0600 0 5 4 1 tty[i,1-12,1]
+bl 0600 0 0 7 0 loop[i,0-9,1]
+bl 0600 0 0 1 0 ram[i,0-9,1]
+ch 0600 0 5 4 64 ttyS[i,0-9,1]
+ch 0600 0 3 10 1 psaux
+ch 0600 0 0 10 144 nvram
+ch 0600 0 0 10 130 watchdog
+bl 0400 0 0 1 250 initrd
+ch 0600 0 0 14 0 mixer
+ch 0600 0 0 14 3 dsp
+md /dev/input 755
+ch 0600 0 0 13 63 input/mice
+md /dev/fs 755
+
+ln psaux /dev/mouse
+
+te RAMCOPY=1
+&{
+ ec "Copying whole RootFS to RAM (can take a while)..."
+ mt / /mnt/initrd tmpfs rw size=33554432
+ &ex /bin/cp -dRfpx / /mnt/initrd
+ &{
+ bi /proc /mnt/initrd/proc
+ bi /var /mnt/initrd/var
+ bi /dev /mnt/initrd/dev
+ pr /mnt/initrd mnt/initrd # move mnt/initrd to /, and / to the new /mnt/initrd
+ um /mnt/initrd/dev
+ um /mnt/initrd/proc
+ um /mnt/initrd/var
+ um /mnt/initrd
+ ec "RootFS now running from RAM."
+ }
+ |{
+ um /mnt/initrd
+ ec "Failed to copy the RootFS into RAM."
+ }
+}
+
+te AUTORUN=1
+&{
+ mt /dev/fd0 /mnt/floppy ext2 ro
+ |mt /dev/fd0 /mnt/floppy vfat ro
+ &{
+ ex /mnt/floppy/autorun
+ um /mnt/floppy
+ }
+ |ec "Could not find an autorun file on the floppy disk."
+}
+
+te INITSHELL=1
+&rd "You have requested this prompt by appending INITSHELL=1 to the kernel cmd line."
+
+in /sbin/init-sysv
+