write down,forget

dd-wrt 实验2

<Category: Wireless, 乱搞> 查看评论

参考:http://blog.sina.com.cn/s/blog_51f1a4130100gpl7.html

1.停用自动挂载磁盘 服务-》usb

umount /opt

mount -o noatime /dev/scsi/host0/bus0/target0/lun0/part1 /opt

挂载脚本
mount -o noatime /dev/scsi/host0/bus0/target0/lun0/part1 /opt
echo “Starting smbd:”
if [ ! -d /tmp/samba ]; then
mkdir /tmp/samba
mkdir /tmp/samba/log
rm -rf /opt/var/log/samba
ln -s /tmp/samba/log /opt/var/log/samba
rm -rf /opt/var/samba
ln -s /tmp/samba /opt/var/samba
fi

umount /jffs
umount /opt
mount –bind /mnt/jffs /jffs
mount –bind /jffs/opt /opt

下载opt相关程序
wget http://oleg-for-mss-base.googlecode.com/files/opt.tar.gz

cd /mnt/jffs
tar zxvf opt.tar.gz

mount -o bind /jffs/opt /opt

怀疑fat文件系统下Linux程序不能执行
果然: FAT分区的默认codepage为cp936,cp936是简体中文的内码序列表;而Linux仅支持utf-8编码;
参考:http://www.oschina.net/bbs/thread/7033

usb 格式化
http://www..com/wiki/index.php/How_to_-_Format_and_Partition_External_Storage_Device
http://www.dd-wrt.com/wiki/index.php/USB_storage

optware
http://www.nslu2-linux.org/wiki/FAQ/Optware-uClibcBuild

dd-wrt
http://www.dd-wrt.com/wiki/index.php/Development

分区格式化u盘
此时优盘处于使用状态,如果想格式化优盘,先得将u盘卸载
fdisk -l
mkfs -V -t ext3 /dev/scsi/host0/bus0/target0/lun0/part1

本文来自: dd-wrt 实验2