QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2931|回复: 8

中标普华LiveCD启动脚本

[复制链接]
发表于 2006-11-6 10:51:30 | 显示全部楼层 |阅读模式
大家可以试一试
LiveCD版本升级,全新利用aufs文件系统制作,稳定性更强。修复上个版本中的许多bug。

用于演示中标普华Linux桌面3.0 及中标普华office
登录:root
密码:为空

下载地址:
http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=4604

1)不带office版本
ftp://ftp.cs2c.com.cn/livecd/livecd3.0/Neoshine_livecd_3.0.iso

2)带office版本
ftp://ftp.cs2c.com.cn/livecd/livecd3.0/Neoshine_livecd_3.0_with_office.iso

或者直接点击下载进入ftp目录。

文件比较大,请注意MD5验证:
b090d31560a3b1a7264a37593e455a75 Neoshine_livecd_3.0.iso
7f387e2f48baa3b104368b7f7eda82b1 Neoshine_livecd_3.0_with_office.iso

Enjoy

发表于 2006-11-7 22:08:52 | 显示全部楼层
为何在本版置顶?毫不相干。。。

“滥用职权”?

玩笑,玩笑而已
回复

使用道具 举报

发表于 2006-11-8 02:15:39 | 显示全部楼层
你做的?
回复

使用道具 举报

 楼主| 发表于 2006-11-8 08:06:11 | 显示全部楼层
[quote:7c62dcadfa="MichaelBibby"]为何在本版置顶?毫不相干。。。

“滥用职权”?

玩笑,玩笑而已[/quote]
嘻嘻 嘻嘻。。先放一会哈


不过  里面的启动脚本 什么的 是可以学习的哦
回复

使用道具 举报

 楼主| 发表于 2006-11-8 08:06:36 | 显示全部楼层
[quote:42ec3655b8="zhy2111314"]你做的? [/quote]
  恩
回复

使用道具 举报

 楼主| 发表于 2006-11-12 14:23:53 | 显示全部楼层
两个主要启动脚本如下

==================================================
boot目录中initrd.gz中的linuxrc


[code:1]#!/bin/bash

if [ "${INITRD_DBG}" = "x" ]; then set -x; fi

echo "Mounted proc filesystem"
mount -t proc /proc /proc

echo "Mounting sysfs filesystem"
mount -t sysfs none /sys
mount -t tmpfs none /tmp

echo "Creating /dev"
mount -o mode=0755 -t tmpfs none /dev

mkdir /dev/pts
mkdir /dev/shm

modprobe loop
modprobe squashfs
echo "udev starting"
udevstart

mount /dev/cdrom /cdrom


# 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
       
mount_file /var
       
chmod a+rwxt /livecd/tmpfs/var/tmp

mount_file /root
mount_file /home
mount_file /opt
mount_file /mnt
mount_file /media
mount_file /etc

mount_file /xkb

echo "Moving /etc/rc.d to /livecd/ramfs"
   mv /etc/rc.d /livecd/ramfs/ >/dev/null 2>&1
ln -s /livecd/ramfs/rc.d /etc/rc.d

[/code:1]
回复

使用道具 举报

 楼主| 发表于 2006-11-12 18:17:53 | 显示全部楼层
两个脚本执行成功以后  控制权就交给rc.sysinit了  
回复

使用道具 举报

 楼主| 发表于 2006-12-18 12:51:15 | 显示全部楼层
现在我把它升级到3。0了 利用的是aufs

重写initrd.ing中的linurc如下

[code:1]#!/bin/bash
#
#=========================================#
# NeoShine Live CD scripts                 #
# Author:BOoRFGOnZ <[email protected]>#
#=========================================#
#

echo "Mounting proc filesystem"
mount -t  proc /proc /proc
echo "Mounting sysfs filesystem"
mount -t sysfs sysfs /sys

echo "Mounting modules"
modprobe loop
modprobe squashfs
modprobe aufs

echo "Starting udev"
udevstart

echo "Mounting cdrom"
mount /dev/cdrom /cdrom

echo "Makeing kernel don't mount root fs"
echo 0x100 > /proc/sys/kernel/real-root-dev

echo "Creating aufs"
mkdir -p /memory
mount -t tmpfs tmpfs /memory
mkdir -p /memory/changes
mkdir -p /memory/images
mkdir -p /union
mount -t squashfs -o loop /cdrom/NeoShine.sqsh /memory/images
mount -t aufs -o dirs=/memory/changes=rw:/memory/images=ro none /union
mkdir -p /union/proc
mkdir -p /union/sys
mkdir -p /union/tmp
mkdir -p /union/dev
chmod 0777 /union/tmp
mkdir -p /union/initrd

echo "Doing the pivot_root"
cd /union
mknod /union/dev/console c 5 1
pivot_root /union /union/initrd
cd /

echo "Starting system"
exec /usr/sbin/chroot . sbin/init<dev/console >dev/console 2>&1
[/code:1]

与1.0机制完全不一样
回复

使用道具 举报

 楼主| 发表于 2007-1-18 16:58:20 | 显示全部楼层
10 things to do with a live Linux CD



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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-20 21:15 , Processed in 0.124009 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表