Wednesday, February 22, 2017
FreeBSD使用移动硬盘的不同方式
FreeBSD使用移动硬盘的不同方式
????FreeBSD??????????????????????????????X?
X????????????????????Xorg+GNOME???????HALD????????
?????????????FreeBSD???????????????
?????????????FreeBSD???????????????
????
?FreeBSD??????????????????????????????
??????
????????????????????????????????????????
????????USB??????????????USB??????
?????????????????????????
???????FreeBSD Handbook?
????????????????????????
????????USB??????????????USB??????
?????????????????????????
device scbus????????????????????????????USB??????
device da
device pass
device uhci
device ohci
device ehci
device usb
device umass
???????FreeBSD Handbook?
????????????????????????
?????????
?????????????????????UFS?????
?????????????????????Partition??????????????/tmp???????????root??????????root????????????????????????
????rc.conf??????????????????/tmp???
??/dev?????
- ??????????root????sysinstall?
- ????sysinstall???????????sysinstall?
?????????????????????Partition??????????????/tmp???????????root??????????root????????????????????????
????rc.conf??????????????????/tmp???
clear_tmp_enable="YES"?????????????????Slice?????Slice???3?Partition?
??/dev?????
da0
da0s1
da0s1d
da0s1e
da0s1f
??????
???????????root??????????????????????????????????
???/etc/devfs.rules???/etc/devfs.conf?????????????????????????????
- ?????????/etc/devfs.rules?
[localrules=5]????operator??????
add path da* mode 0660 group operator
???/etc/devfs.rules???/etc/devfs.conf?????????????????????????????
- ?????????/etc/rc.conf?
devfs_system_ruleset="localrules"??????/etc/devfs.rules???????
- ?????????/etc/sysctl.conf:
vfs.usermount=1?????????????
- ???????????
> ls /mnt/???????root??????????????fender_01,fender_02?fender_03?
fender_01 fender_02 fender_03 fender_04 fender_05
# cd /mnt/???????fender_01,fender_02?fender_03?????????
# mount /dev/da0s1d fender_01
# mount /dev/da0s1e fender_02
# mount /dev/da0s1f fender_03
# cd /mnt/???fender?????operator????
# chown fender:operator *
# pw group mod operator -m fender????????????fender?????????????
??HALD??????
????????????FreeBSD????????????????????????HALD????????
????????/usr/local/share/hal/fdi/preprobe/20thirdparty???
???????X???????????????
????????/usr/local/share/hal/fdi/preprobe/20thirdparty???
- ??da.fdi??????
<?xml version="1.0" encoding="UTF-8"?>????????HALD???????
<deviceinfo version="0.2">
<device>
<match key="freebsd.driver" string="da">
<match key="freebsd.unit" int="0">
<merge key="info.ignore" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>
- ??acd.fdi??????
<?xml version="1.0" encoding="UTF-8"?>????????HALD??????????????????
<deviceinfo version="0.2">
<device>
<match key="freebsd.driver" string="acd">
<match key="freebsd.unit" int="0">
<merge key="info.ignore" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>
???????X???????????????
?????????????
????????????????????????????????????????????????????????????????????????????
???????????????????????cd?????????cd?????????home??
> cd?????????????shell????????????????home???bin????????bin????shell???????????
> cd bin/
> cat mount_rhd.sh
#! /bin/sh
mount /dev/da0s1d /mnt/fender_01;
mount /dev/da0s1e /mnt/fender_02;
mount /dev/da0s1f /mnt/fender_03;
> cat umount_rhd.sh
#! /bin/sh
sync;
umount /mnt/fender_01;
umount /mnt/fender_02;
umount /mnt/fender_03;
???????????????????????cd?????????cd?????????home??
Available link for download
Labels:
freebsd使用移嚨硬盘的不吜方式