# Make kernel don't mount root fs
echo 0x100 > /proc/sys/kernel/real-root-dev
echo "Mounting root filesystem"
udevstart
mount -t squashfs -oloop,ro /cdrom/NeoShine.sqsh /sysroot
echo "Doing the pivot_root"
cd /sysroot
pivot_root /sysroot /sysroot/initrd
cd /
# Mount a (writeable) ramfs at dev and populate it with nodes:
mount -n -t ramfs initrd_dev /dev
cd /dev
for node in mem kmem null port zero core full ram ptmx tty pty shm cpu input agpgart dri cdrom console; do
/initrd/sbin/MAKEDEV $node
done
mkdir /dev/shm
mkdir /dev/pts
mount -n -t devpts initrd_devpts /dev/pts
echo "Setting up readonly-root"
/etc/rc.neoshine
[/code:1]
===============================================
NeoShine.sqsh中的/etc/rc.neoshine
[code:1]#!/bin/bash
mount_file() {
if [ -e ${1} ] && [ -e /livecd/tmpfs${1} ]; then
mount -n --bind /livecd/tmpfs${1} ${1}
fi
}
echo "Mounting tmpfs on /livecd/tmpfs"
mount -t tmpfs none /livecd/tmpfs
echo "Mounting ramfs on /livecd/ramfs"
mount -t ramfs none /livecd/ramfs
echo "Extracting files to /livecd/tmpfs"
tar --directory /livecd/tmpfs -zxf /livecd/neoshine.tar.gz >/dev/null 2>&1
echo "Binding files from /livecd/tmpfs to their original locations"
mount_file /tmp
chmod a+rwxt /livecd/tmpfs/tmp
Live Linux CDs are a simple concept with many possible uses. Here are 10 things you can do with a live Linux CD.
1. Try Linux without installing it
Knoppix is the "mother" of all live Linux CD's. It comes with 2 GBs of software making it the perfect distribution to try Linux with.
2. Use as a portable desktop
Slax fits on a small 8cm CD making it literally pocket sized and contains enough software to be useful for everyday use.
3. Maintain hard drive/recover data
SystemRescue CD includes a host of tools for maintaining a hard drive including a partition manager and resizing software and drive imaging software. SystemRescue CD can read a variety of file systems including Windows NTFS.
4. Install Linux
MEPIS Linux can be run from the CD to try it out and then installed from the running distribution in a very friendly environment.
5. Try Linux software
PCLinuxOS is similar to MEPIS in that it can be run and installed from the CD. It also includes some of the best Linux software available for you to try out.
6. Reset forgotten Windows passwords
Austrumi is a good little live CD distribution that includes a tool at boot that allows you to reset forgotten Windows passwords (including Administrator).
7. Build your own distribution
Damn Small Linux is a fantastic 50 MB distribution as is or that you can personalize with your own choice of software using the very easy to use myDSL system.
8. Watch/listen to multimedia
Movix is a live distribution designed just for playing audio and video files from the internet, CD and DVD.
9. Play games
Morphix is a modular distribution that has a version just for playing games.
10. Scan safely for virus's
INSERT is the INside SEcurity Rescue Toolkit and includes an anti-virus package making it a great way to clean an infected computer.
This is a small selection of all the live Linux CDs, Frozentech has a comprehensive list.