⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 create_bootdisk.sh

📁 SLAX/FanX制作livecd的完全脚本
💻 SH
字号:
#!/bin/bash# Author: Tomas Matejicek <http://www.linux-live.org>if [ "$1" = "" -o ! -b "$2"  -o ! -b "$3" ]; then  echo  echo "Copies all files from LiveCD to your disk and setup lilo"  echo "usage:   $0 [ data_dir | livecd.iso ] [ partition ] [ mbr ] [[ subdir ]]"  echo "example: $0 . /dev/sda1 /dev/sda slax"  exitfiDATADIR="$1"MOUNTPOINT=/tmp/slax_to_disk_$$TMPLILOCONF=/tmp/lilo$$.confSUBDIR="$4"if [ "$SUBDIR" = "" ]; then SUBDIR="SLAX"; fi# mount iso if not already mountedif [ ! -d "$DATADIR" ]; then   DATADIR=/tmp/livecd_data$$   mkdir -p "$DATADIR"   mount -o loop "$1" "$DATADIR"   if [ ! "$?" = "0" ]; then echo "error mounting $1 to $DATADIR"; exit; fifi# mount partition we wish to copy slax ontomkdir -p $MOUNTPOINTmount $2 $MOUNTPOINTif [ ! "$?" = "0" ]; then echo "error mounting $2"; exit; fi# copy all files theremkdir -p $MOUNTPOINT/$SUBDIRcp -R "$DATADIR"/* "$MOUNTPOINT/$SUBDIR"gunzip "$MOUNTPOINT/$SUBDIR/splash.bmp.gz"APPEND="`cat $DATADIR/isolinux.cfg | grep append | head -n 1 | cut -b 7-`"echo "boot = $3prompttimeout = 50#install = text#message = $MOUNTPOINT/$SUBDIR/splashbitmap = $MOUNTPOINT/$SUBDIR/splash.bmpmap = $MOUNTPOINT/$SUBDIR/lilo.map# Linux bootable partition config beginsimage = $MOUNTPOINT/$SUBDIR/vmlinuzroot = /dev/ram0label = slaxinitrd = $MOUNTPOINT/$SUBDIR/initrd.gzread-writeappend=\" probeusb $APPEND livecd_subdir=$SUBDIR \" " >$TMPLILOCONFlilo -v -C $TMPLILOCONF -S /dev/nullumount $DATADIR 2>/dev/null >/dev/nullif [ "$?" = "0" ]; then rmdir $DATADIR; fiumount $MOUNTPOINTrmdir $MOUNTPOINTecho "LiveCD is installed in $3"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -