#!/bin/sh # # /linuxrc for initrd.gz # # # Original Files # -------------- # http://Linux-Boot.net/Boot/Network/PXE/Examples/linuxquestions.org/linuxrc # http://www.linuxquestions.org/questions/archive/23/2004/11/4/259952 # # # 14-Mar-05 amo Date-of-Birth # # # # Create new root mount point # mkdir /mnt/ram # # # mount the initrd image file system mount /dev/ram /mnt/ram # # Prepare to load the RootFS # cd /mnt/ram # mkdir initrd bin boot dev etc lib proc usr var tmp # # # Make directory for initrd file system to go to # # I believe this moves the current root file system to the local directory # and puts the old one under the newly created initrd directory. # pivot_root . initrd # # Start init (process 1) under the new root mount point # exec chroot . /sbin/init dev/console 2>&1 # # Umount of the old root, since it is no longer needed and free of the memory # umount initrd blockdev --flushbufs /dev/ram # # # End of file