|
Revision 54, 1.1 KB
(checked in by root, 6 years ago)
|
|
The linuxrc for the livekit CD.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | # $Id: linuxrc,v 1.3 2005/03/07 20:38:31 thomasez Exp $ |
|---|
| 4 | |
|---|
| 5 | # |
|---|
| 6 | # Livekit. |
|---|
| 7 | # |
|---|
| 8 | |
|---|
| 9 | VERSION=2.99.6 |
|---|
| 10 | |
|---|
| 11 | # |
|---|
| 12 | /bin/busybox echo "Booting floppyfw" |
|---|
| 13 | |
|---|
| 14 | PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" |
|---|
| 15 | TERM=linux |
|---|
| 16 | export PATH TERM |
|---|
| 17 | umask 022 |
|---|
| 18 | |
|---|
| 19 | # Mounting cdrom. |
|---|
| 20 | # Need to find the cdrom device, that has to be with /proc/cmdline, |
|---|
| 21 | # alas, we have to mount it to our initrd and find it: |
|---|
| 22 | /bin/busybox mount -n -t proc /proc /proc |
|---|
| 23 | |
|---|
| 24 | ROOTDEV=`grep -i "drive name" /proc/sys/dev/cdrom/info | cut -d":" -f2 | sed -e 's/\W//g'` |
|---|
| 25 | echo "Gonna mount /dev/$ROOTDEV" |
|---|
| 26 | |
|---|
| 27 | if mount -t iso9660 /dev/$ROOTDEV /nyroot |
|---|
| 28 | then |
|---|
| 29 | echo "Mounted /dev/$ROOTDEV on /nyroot" |
|---|
| 30 | break |
|---|
| 31 | else |
|---|
| 32 | echo "Mount failed" |
|---|
| 33 | fi |
|---|
| 34 | |
|---|
| 35 | /bin/busybox echo "Unmounting /proc" |
|---|
| 36 | /bin/busybox umount /proc |
|---|
| 37 | |
|---|
| 38 | /bin/busybox echo "cd /nyroot" |
|---|
| 39 | cd /nyroot |
|---|
| 40 | /bin/busybox echo -n "Pivoting.. " |
|---|
| 41 | /bin/busybox pivot_root . mnt |
|---|
| 42 | |
|---|
| 43 | /bin/busybox echo "Got a new root." |
|---|
| 44 | |
|---|
| 45 | /bin/busybox mount -n -t proc /proc /proc |
|---|
| 46 | |
|---|
| 47 | cd / |
|---|
| 48 | |
|---|
| 49 | /bin/busybox echo "Running init," |
|---|
| 50 | exec chroot . /sbin/init <dev/console >dev/console 2>&1 |
|---|
| 51 | |
|---|
| 52 | echo "Pokker, dette skal ingen kunne lese" |
|---|