2 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4 # xfscrash - control the XFS crash tests
7 # this is an example of what to add to rc.sysinit on a redhat linux
8 # system to get the ro-root/ramdisk system up and running
10 if [ -f /initrd.active ]
12 echo "*** MAKE RAMDISK ***"
13 dd if=/dev/zero of=/dev/ram0 bs=1024k count=4
14 mkfs -i 1024 /dev/ram0 4096
15 echo "*** MOUNT RAMDISK ***"
16 mount -n -w /dev/ram0 /mnt
17 echo "*** INIT RAMDISK ***"
18 cp -a /initrd_init/* /mnt
19 rm -f /mnt/00_INITRD_REAL
20 touch /mnt/00_INITRD_RAMDISK
22 echo "*** REMOUNT RAMDISK ***"
23 mount -n /dev/ram0 /initrd
25 echo "*** FIX MTAB ***"
27 rm -f /etc/mtab~ /etc/mtab~~
29 mount -f -o rw /dev/ram0 /initrd
33 # Remount the root filesystem read-write.
34 action "Remounting root filesystem in read-write mode" mount -n -o remount,rw /
39 # Remove stale backups
40 rm -f /etc/mtab~ /etc/mtab~~
42 # Enter root and /proc into mtab.