当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 7 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [问题]从硬盘启动 Desktop CD为什么需要密码?
帖子发表于 : 2006-12-29 23:58 

注册: 2006-12-06 21:10
帖子: 3
送出感谢: 0 次
接收感谢: 0 次
http://forum.ubuntu.org.cn/viewtopic.ph ... highlight=
我按照上文做法成功启动后~需要密码才能进入
用户名密码怎么设?


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2006-12-30 15:57 

注册: 2006-12-06 21:10
帖子: 3
送出感谢: 0 次
接收感谢: 0 次
自己顶
小弟初学~谁给解答个?先谢了


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2007-01-15 19:17 

注册: 2007-01-13 13:24
帖子: 30
送出感谢: 0 次
接收感谢: 0 次
我也遇到过过同样的问题。要输入用户名和密码。
后来重新下了个引导文件就解决了。
引导文件与印像文件要一致啊。


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-01-16 9:56 
头像

注册: 2006-12-01 9:27
帖子: 47
地址: 河北保定
送出感谢: 0 次
接收感谢: 0 次
同上,楼主的问题我第一次装时也遇到了,找到对应的引导包才可以。


页首
 用户资料  
 
5 楼 
 文章标题 : 制做引导包的问题
帖子发表于 : 2007-01-16 10:22 
头像

注册: 2006-12-23 13:46
帖子: 9203
地址: Azores Islands
送出感谢: 0 次
接收感谢: 1
这个问题很奇怪,我没有光驱,想装7.04, 好像也找不到7.04的引导包,就自己做了一个:



发现了一个很有意思的现象


我按gnix_oag的脚本自己做了7.04的引导包,没有任何问题,完全可以引导,并且gnix_oag的脚本做6.10的引导包也不会有任何问题。




但是如果把6.06引导包解开,用6.06的脚本来制做7.04的引导文件再打包,这样启动后就会出现启动后要输入密码的问题。


后来把#初始化用户名、用户全称、主机名
的部分改为下面的,打包后还是要输入密码:
USERNAME=ubuntu

USERFULLNAME="Live session user"

HOST=ubuntu


其它的部分也没看出有什么不对,难道是文件名有问题,6.06的脚本叫做capser


_________________
no security measure is worth anything if an attacker has physical access to the machine


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2007-01-16 10:41 
头像

注册: 2006-12-23 13:46
帖子: 9203
地址: Azores Islands
送出感谢: 0 次
接收感谢: 1
蓝色部份为从6.06引导包解开取出的名为casper的脚本。

#!/bin/sh

# set -e

mountpoint=/cdrom

mkdir -p $mountpoint

overlay_method=unionfs
if [ "${DPKG_ARCH}" = "ia64" ] || [ "${DPKG_ARCH}" = "hppa" ] || [ "${DPKG_ARCH}" = "sparc" ]; then
overlay_method=devmapper
fi

USERNAME=ubuntu
USERFULLNAME="Ubuntu LiveCD user"
HOST=ubuntu

[ -f /etc/casper.conf ] && . /etc/casper.conf

export USERNAME USERFULLNAME HOST

casper_path() {
path=$1
if [ -e "$path/casper/filesystem.cloop" ]; then
echo "$path/casper/filesystem.cloop"
return 0
elif [ -e "$path/casper/filesystem.squashfs" ]; then
echo "$path/casper/filesystem.squashfs"
return 0
fi
return 1
}

subdevices() {
sysblock=$1
r=""
for dev in "${sysblock}" "${sysblock}"/*; do
if [ -e "${dev}/dev" ]; then
r="${r} ${dev}"
fi
done
echo ${r}
}

get_backing_device() {
case "$1" in
*.cloop)
echo $(setup_loop "$1" "cloop" "/sys/block/cloop*")
;;
*.squashfs)
echo $(setup_loop "$1" "loop" "/sys/block/loop*")
;;
*)
panic "Unrecognized casper filesystem: $1"
;;
esac
}

setup_cow() {
case "$1" in
unionfs)
setup_unionfs "$2" "$rootmnt"
;;
devmapper)
setup_devmapper "$2" "$rootmnt"
esac
}

sys2dev() {
sysdev=${1#/sys}
echo "/dev/$(udevinfo -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})"
}

setup_loop() {
local fspath=$1
local module=$2
local pattern=$3

modprobe -Qb "$module"
udevplug -W

for loopdev in $pattern; do
if [ "$(cat $loopdev/size)" -eq 0 ]; then
dev=$(sys2dev "${loopdev}")
losetup "$dev" "$fspath"
echo "$dev"
return 0
fi
done
panic "No loop devices available"
}

get_fstype() {
local FSTYPE
local FSSIZE
eval $(fstype < $1)
if [ "$FSTYPE" != "unknown" ]; then
echo $FSTYPE
return 0
fi
/lib/udev/vol_id -t $1 2>/dev/null
}

setup_devmapper() {
backdev="$1"
rootmnt="$2"

modprobe -Qb dm-mod
COW_DEVICE=/dev/ram1
COW_NAME="casper-cow"

BACKING_FILE_SIZE=$(blockdev --getsize "$backdev")
MAX_COW_SIZE=$(blockdev --getsize "$COW_DEVICE")
CHUNK_SIZE=8 # sectors

if [ -z "$COW_SIZE" -o "$COW_SIZE" -gt "$MAX_COW_SIZE" ]; then
COW_SIZE=$MAX_COW_SIZE
fi

echo "0 $COW_SIZE linear $COW_DEVICE 0" | dmsetup create $COW_NAME

echo "0 $BACKING_FILE_SIZE snapshot $backdev /dev/mapper/$COW_NAME p $CHUNK_SIZE" | \
dmsetup create casper-snapshot
if [ "$(get_fstype $backdev)" = "unknown" ]; then
panic "Unknown file system type on $backdev"
fi
mount -t $(get_fstype "$backdev") /dev/mapper/casper-snapshot $rootmnt || panic "Can not mount /dev/mapper/casper/snapshot on $rootmnt"

mkdir -p "$rootmnt/rofs"
echo "0 $BACKING_FILE_SIZE linear $backdev 0" | dmsetup create casper-backing
mount -t $(get_fstype "$backdev") /dev/mapper/casper-backing "$rootmnt/rofs"
}

where_is_mounted() {
device=$1
if grep -q "^$device " /proc/mounts; then
grep "^$device " /proc/mounts | read d mountpoint rest
echo $mountpoint
return 0
fi
return 1
}

find_cow_device() {
for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do
for dev in $(subdevices "${sysblock}"); do
devname=$(sys2dev "${dev}")
if [ "$(/lib/udev/vol_id -l $devname 2>/dev/null)" = "casper-rw" ]; then
echo "$devname"
return
elif [ "$(get_fstype ${devname})" = "vfat" ]; then
mkdir -p /cow-backing
if where_is_mounted ${devname} > /dev/null; then
mount -o remount,rw ${devname} $(where_is_mounted ${devname}) || panic "Remounting failed"
mount -o bind $(where_is_mounted ${devname}) /cow-backing || panic "Cannot bind-mount"
else
mount -t $(get_fstype "${devname}") -o rw "${devname}" /cow-backing || panic "Cannot mount $devname on /cow-backing"
fi

if [ -e "/cow-backing/casper-rw" ]; then
echo $(setup_loop "/cow-backing/casper-rw" "loop" "/sys/block/loop*")
return 0
else
umount /cow-backing
fi
fi

done
done
return 1
}

setup_unionfs() {
backdev="$1"
rootmnt="$2"
modprobe -Qb unionfs
mkdir -p /cow

if grep -q persistent /proc/cmdline; then
i=0
# We love udev and the kernel!
while [ "$i" -lt 300 ]; do
cowdevice=$(find_cow_device)
if [ -b "$cowdevice" ]; then
mount -t $(get_fstype "$cowdevice") -o rw "$cowdevice" /cow || panic "Can not mount $cowdevice on /cow"
break
fi
sleep 5
# sleep 0.1
i=$(( $i + 1 ))
done
else
mount -t tmpfs tmpfs /cow
fi

mkdir -p /rofs
if [ "$(get_fstype $backdev)" = "unknown" ]; then
panic "Unknown file system type on $backdev"
fi
mount -t $(get_fstype "$backdev") -o ro "$backdev" /rofs || panic "Can not mount $backdev on /rofs"

mount -t unionfs -o dirs=/cow=rw:/rofs=ro unionfs "$rootmnt"
if grep -q show-cow /proc/cmdline; then
mkdir -p "$rootmnt/cow"
mount -o bind /cow "$rootmnt/cow"
fi
mkdir -p "$rootmnt/rofs"
mount -o bind /rofs "$rootmnt/rofs"
}

is_usb_device() {
sysfs_path="${1#/sys}"
if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=usb"; then
return 0
fi
return 1
}

find_cd() {
mounted=
for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do
devname=$(sys2dev "${sysblock}")
for dev in $(subdevices "${sysblock}"); do
devname=$(sys2dev "${dev}")
case $(get_fstype "${devname}") in
vfat|iso9660|ntfs|etx3|udf|reiserfs)
mount -t $(get_fstype "${devname}") -o ro "${devname}" $mountpoint || continue
if casper_path $mountpoint; then
echo $(casper_path $mountpoint)
return
else
umount $mountpoint
fi
;;
esac
done
done
}
set_usplash_timeout() {
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TIMEOUT 120"
fi
}

mountroot() {
exec 6>&1
exec 7>&2
exec > casper.log
exec 2>&1

set_usplash_timeout
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
run_scripts /scripts/casper-premount
[ "$quiet" != "y" ] && log_end_msg

# Needed here too because some things (*cough* udev *cough*)
# changes the timeout

set_usplash_timeout

for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13; do
live_image=$(find_cd)
if [ "${live_image}" ]; then
break
fi
sleep 1
done
if [ "$?" -gt 0 ]; then
panic "Unable to find a CD-ROM containing a live file system"
fi

setup_cow "$overlay_method" "$(get_backing_device $live_image)" "$rootmnt"

log_end_msg

maybe_break casper-bottom
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"

PATH=/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:$PATH run_scripts /scripts/casper-bottom
[ "$quiet" != "y" ] && log_end_msg

exec 1>&6 6>&-
exec 2>&7 7>&-
cp casper.log "${rootmnt}/var/log/"
}






下面红色部份为gnix_oag



#!/bin/sh



# set -e



export PATH=/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin



#iso文件的的挂载点

mountpoint=/iso_cdrom

mkdir -p $mountpoint

mkdir -p /cdrom

find_wyj=edgy #要找的文件夹



#overlay_method=unionfs

#if [ "${DPKG_ARCH}" = "ia64" ] || [ "${DPKG_ARCH}" = "hppa" ] || [ "${DPKG_ARCH}" = "sparc" ]; then

# overlay_method=devmapper

#fi



#初始化用户名、用户全称、主机名

USERNAME=ubuntu

USERFULLNAME="Live session user"

HOST=ubuntu



[ -f /etc/casper.conf ] && . /etc/casper.conf



export USERNAME USERFULLNAME HOST



#验证 live cd 的映象

is_casper_path() {

path=$1

if [ -d "$path/casper" ]; then

if [ "$(echo $path/casper/*.cloop)" != "$path/casper/*.cloop" ] ||

[ "$(echo $path/casper/*.squashfs)" != "$path/casper/*.squashfs" ]; then

return 0

fi

fi

return 1

}



#得到全部磁盘分区的列表

subdevices() {

sysblock=$1

r=""

for dev in "${sysblock}" "${sysblock}"/*; do

if [ -e "${dev}/dev" ]; then

r="${r} ${dev}"

fi

done

echo ${r}

}



#获得环回(loop)设备

get_backing_device() {

case "$1" in

*.cloop)

echo $(setup_loop "$1" "cloop" "/sys/block/cloop*")

;;

*.squashfs)

echo $(setup_loop "$1" "loop" "/sys/block/loop*")

;;

*)

panic "Unrecognized casper filesystem: $1"

;;

esac

}



match_files_in_dir() {

# Does any files match pattern $1 ?



local pattern="$1"

if [ "$(echo $pattern)" != "$pattern" ]; then

return 0

fi

return 1

}



mount_images_in_directory() {

directory="$1"

rootmnt="$2"

if match_files_in_dir "$directory/casper/*.cloop"; then

# Let's hope there's just one matching *.cloop... FIXME

setup_devmapper $(get_backing_device "$directory/casper/*.cloop") "$rootmnt"

elif match_files_in_dir "$directory/casper/*.squashfs"; then

setup_unionfs "$directory/casper" "$rootmnt"

else

:

fi

}



#生成/dev的设备名

sys2dev() {

sysdev=${1#/sys}

echo "/dev/$(udevinfo -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})"

}



#安装文件到环回设备

setup_loop() {

local fspath=$1

local module=$2

local pattern=$3



modprobe -Qb "$module"

udevsettle



for loopdev in $pattern; do

if [ "$(cat $loopdev/size)" -eq 0 ]; then

dev=$(sys2dev "${loopdev}")

losetup "$dev" "$fspath"

echo "$dev"

return 0

fi

done

panic "No loop devices available"

}



#获得文件系统的类别

get_fstype() {

local FSTYPE

local FSSIZE

eval $(fstype < $1)

if [ "$FSTYPE" != "unknown" ]; then

echo $FSTYPE

return 0

fi

/lib/udev/vol_id -t $1 2>/dev/null

}



#安装磁盘映象(可写入的)

setup_devmapper() {

backdev="$1"

rootmnt="$2"



modprobe -Qb dm-mod

COW_DEVICE=/dev/ram1

COW_NAME="casper-cow"



BACKING_FILE_SIZE=$(blockdev --getsize "$backdev")

MAX_COW_SIZE=$(blockdev --getsize "$COW_DEVICE")

CHUNK_SIZE=8 # sectors



if [ -z "$COW_SIZE" -o "$COW_SIZE" -gt "$MAX_COW_SIZE" ]; then

COW_SIZE=$MAX_COW_SIZE

fi



echo "0 $COW_SIZE linear $COW_DEVICE 0" | dmsetup create $COW_NAME



echo "0 $BACKING_FILE_SIZE snapshot $backdev /dev/mapper/$COW_NAME p $CHUNK_SIZE" | \

dmsetup create casper-snapshot

if [ "$(get_fstype $backdev)" = "unknown" ]; then

panic "Unknown file system type on $backdev"

fi

mount -t $(get_fstype "$backdev") /dev/mapper/casper-snapshot $rootmnt || panic "Can not mount /dev/mapper/casper/snapshot on $rootmnt"



mkdir -p "$rootmnt/rofs"

echo "0 $BACKING_FILE_SIZE linear $backdev 0" | dmsetup create casper-backing

mount -t $(get_fstype "$backdev") /dev/mapper/casper-backing "$rootmnt/rofs"

}



#验证及获取挂载点的位置

where_is_mounted() {

device=$1

if grep -q "^$device " /proc/mounts; then

grep "^$device " /proc/mounts | read d mountpoint rest

echo $mountpoint

return 0

fi

return 1

}



#查找可写入的 cow 设备

find_cow_device() {

for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do

for dev in $(subdevices "${sysblock}"); do

devname=$(sys2dev "${dev}")

if [ "$(/lib/udev/vol_id -l $devname 2>/dev/null)" = "casper-rw" ]; then

echo "$devname"

return

elif [ "$(get_fstype ${devname})" = "vfat" ]; then

mkdir -p /cow-backing

if where_is_mounted ${devname} > /dev/null; then

mount -o remount,rw ${devname} $(where_is_mounted ${devname}) || panic "Remounting failed"

mount -o bind $(where_is_mounted ${devname}) /cow-backing || panic "Cannot bind-mount"

else

mount -t $(get_fstype "${devname}") -o rw "${devname}" /cow-backing || panic "Cannot mount $devname on /cow-backing"

fi



if [ -e "/cow-backing/casper-rw" ]; then

echo $(setup_loop "/cow-backing/casper-rw" "loop" "/sys/block/loop*")

return 0

else

umount /cow-backing

fi

fi



done

done

return 1

}



#安装联合文件系统 (可写入的

setup_unionfs() {

image_directory="$1"

rootmnt="$2"

modprobe -Qb unionfs



# run-init can't deal with this, but we're going to move all of these

# away before it runs anyway.

croot="/casper"



# Let's just mount the read-only file systems first

mkdir -p "${croot}"

for image in "${image_directory}"/*.squashfs; do

imagename=$(basename "${image}")

backdev=$(get_backing_device "$image")

fstype=$(get_fstype "${backdev}")

if [ "${fstype}" = "unknown" ]; then

panic "Unknown file system type on ${backdev} (${image})"

fi

mkdir -p "${croot}/${imagename}"

mount -t "${fstype}" -o ro "${backdev}" "${croot}/${imagename}" || panic "Can not mount $backdev ($image) on ${croot}/${imagename}"

done



rofsstring=""

for dir in $(mount -t squashfs | cut -d\ -f 3); do

rofsstring="$dir=ro:$rofsstring"

done

rofsstring=${rofsstring%:}



if [ "$ubuntu_fs" ] ; then

cow=$ubuntu_fs

else

mkdir -p /cow

mount -t tmpfs tmpfs /cow

cow=/cow

fi



mount -t unionfs -o dirs=$cow=rw:$rofsstring unionfs "$rootmnt"



for d in $(mount -t squashfs | cut -d\ -f 3); do

mkdir -p "${rootmnt}/casper/${d##*/}"

mount -o move "${d}" "${rootmnt}/casper/${d##*/}"

done

if [ "$ubuntu_fs" ] ; then

mkdir -p "$rootmnt/ubuntu.fs"

mount -o bind $cow "$rootmnt/ubuntu.fs"

fi

mkdir -p "$rootmnt/iso_cdrom"

mount -o bind $mountpoint "$rootmnt/iso_cdrom"

}



#验证是否为usb磁盘

is_usb_device() {

sysfs_path="${1#/sys}"

if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=(usb|pci-[^-]*-usb)"; then

return 0

fi

return 1

}



#生成/fstab文件

make_fstab() {

#找所的硬盘及分区

cat /proc/partitions | tr -s "[\ ]" | cut -d\ -f5 | tr "[\n]" "[ ]" > /dev_tmp

#开始生成fstab

msfscount=98 #ms文件系统计数值: 98对应B

for dev_name in $(cat /dev_tmp) ; do

fstype=$(get_fstype "/dev/${dev_name}")

case "$fstype" in

reiserfs|minix|xfs|jfs|ext3|ext2|swap|ntfs|vfat)

get_mountpoint

mkdir -p ${getmountpoint}

get_mountoptions

echo "/dev/${dev_name} ${getmountpoint} ${fstype} ${getmountoptions} 0 0 " >> /fstab

;;

esac

done

#找所有的光驱

for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram); do

hd_dev=$(echo "$(udevinfo -q name -p ${sysblock#/sys} 2>/dev/null || echo ${sysblock##*/})")

if /lib/udev/cdrom_id /dev/${hd_dev} > /dev/null; then

echo "/dev/${hd_dev} /media/${hd_dev} auto noauto,user 0 0 " >> /fstab

mkdir -p /media/${hd_dev}

fi

done

rm /dev_tmp

}



#生成挂载点

get_mountpoint(){

getmountpoint=

case "$fstype" in

ntfs*|vfat|msdos)

msfscount=$(expr $msfscount + 1)

getmountpoint=/media/`echo -e -n "\\x$(printf %x $msfscount)"`_win ;;

swap) getmountpoint="none" ;;

*) getmountpoint="/media/${dev_name}" ;;

esac

}



#生成挂载选项

get_mountoptions(){

getmountoptions=



case "$fstype" in

vfat) getmountoptions="umask=000,shortname=winnt,user,exec,utf8," ;;

msdos) getmountoptions="umask=000,user,exec,utf8" ;;

swap) getmountoptions="defaults" ;;

ntfs) getmountoptions="umask=000,user,exec,utf8";;

*) getmountoptions="user,exec";;

esac

}



#搜索磁盘,找相关文件

find_file() {

modprobe -Qb loop

while read hd_dev hd_mount_point hd_fstype hd_mount_options dump fcsk ; do

case "$hd_fstype" in

reiserfs|minix|xfs|jfs|ext3|ext2|ntfs|vfat)

modprobe -Qb "$hd_fstype"

mkdir -p /"${hd_mount_point##*/}"

mount -t ${hd_fstype} -o "${hd_mount_options##*user,}" ${hd_dev} /"${hd_mount_point##*/}" || continue

find_swap_fs

if [ ! -d /"${hd_mount_point##*/}/$find_wyj" ];then

umount /"${hd_mount_point##*/}"

fi

find_iso

find_ubuntu_fs

if [ "$findiso" -a "$findubuntufs" -a "$findswapfs" ];then #三个文件都没有在这个分区上,就卸载它

umount /"${hd_mount_point##*/}"

continue

fi

if [ "$iso_cdrom" -a "$ubuntu_fs" -a "$swap_fs" ];then #三个文件都找到,就返回

return

fi

;;

esac

done

}



#找live cd iso 映象

find_iso() {

if [ -z "$iso_cdrom" ];then

for iso in $(echo /"${hd_mount_point##*/}"/$find_wyj/*.[iI][sS][oO] ) ; do

mount -t iso9660 -o loop $iso $mountpoint || continue

if is_casper_path $mountpoint; then

iso_cdrom=$mountpoint

findiso=

return

else

umount $mountpoint

fi

done

fi

findiso=no

}



#找可写入的ubuntu.fs文件系统

find_ubuntu_fs() {

if [ -z "$ubuntu_fs" ];then

if [ -f /"${hd_mount_point##*/}"/$find_wyj/ubuntu.fs ]; then

ubuntufstype=$(get_fstype /"${hd_mount_point##*/}"/$find_wyj/ubuntu.fs )

mkdir -p /ubuntu_fs

if mount -t $ubuntufstype -o rw,loop /"${hd_mount_point##*/}"/$find_wyj/ubuntu.fs /ubuntu_fs ; then

ubuntu_fs=/ubuntu_fs

findubuntufs=

return

fi

fi

case $hd_fstype in

reiserfs|minix|xfs|jfs|ext3|ext2)

if [ -d /"${hd_mount_point##*/}"/$find_wyj/ubuntu.fs ]; then

ubuntu_fs=/"${hd_mount_point##*/}"/$find_wyj/ubuntu.fs

findubuntufs=

return

fi

;;

esac

fi

findubuntufs=no

}



#找 swap 文件

find_swap_fs() {

if [ -z "$swap_fs" ];then

if [ -f /"${hd_mount_point##*/}"/swap.fs ]; then

swap_fs=$hd_mount_point

findswapfs=

return

fi

fi

findswapfs=no

}



#设定usplash 延时

set_usplash_timeout() {

if [ -x /sbin/usplash_write ]; then

/sbin/usplash_write "TIMEOUT 120"

fi

}



#挂载 root 文件系统

mountroot() {

exec 6>&1

exec 7>&2

exec > casper.log

exec 2>&1



set_usplash_timeout

[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"

run_scripts /scripts/casper-premount

[ "$quiet" != "y" ] && log_end_msg



# Needed here too because some things (*cough* udev *cough*)

# changes the timeout



set_usplash_timeout



for i in 0 1 2 3 4 5 6 ; do

rm /fstab

make_fstab



find_file < /fstab

if [ "${iso_cdrom}" ]; then

break

fi

sleep 2

done

if [ "$?" -gt 0 ]; then

panic "Unable to find a medium containing a live file system"

fi



mount_images_in_directory "$iso_cdrom" "$rootmnt"

log_end_msg



#配置系统

if [ ! -e $rootmnt/etc/gnix.oag@gmail.com ];then

touch $rootmnt/etc/gnix.oag@gmail.com



maybe_break casper-bottom

[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"



run_scripts /scripts/casper-bottom



mv /media/* $rootmnt/media/

#配置 swap 文件

if [ "$swap_fs" ]; then

mount -o bind "${swap_fs##*/}" $rootmnt$swap_fs

cat >> /fstab <<EOF

$swap_fs/swap.fs swap swap defaults 0 0

EOF

fi



cat /fstab >> $rootmnt/etc/fstab



#修正时间相差8小时

chroot /root sed -i -e "s/^UTC=.*\$/UTC=no/" /etc/default/rcS



#不显示桌面上的分区图标

chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/nautilus/desktop/volumes_visible false

[ "$quiet" != "y" ] && log_end_msg

fi

exec 1>&6 6>&-

exec 2>&7 7>&-

cp casper.log "${rootmnt}/var/log/"

}





_________________
no security measure is worth anything if an attacker has physical access to the machine


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2007-01-16 17:16 

注册: 2007-01-16 16:08
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
3q


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 7 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译