Part 3
- Part 3 -
Files to set up:
- /boot/loader.conf (new)
- /etc/rc.conf (new)
- /etc/sysct.conf (append)
- /etc/fstab (append)
- /etc/devfs.rules (new)
- /etc/hosts (diff)
- /etc/wpa_supplicant.conf
- /etc/devfs.conf (append)
- /etc/exports (new)
Key:
- new == create if it doesn't exist or replace all its contents with the one indicated.
- append == add to the end of the file.
- diff == locate lines starting with (-), remove them and add in their place lines starting with (+).
Content of files to configure:
New /boot/loader.conf :
Code:
#Linux Emulation
linprocfs_load="YES"
linsysfs_load="YES"
#CPU power saving and temperature
coretemp_load="YES"
kern.hz=100
#Sound Card
snd_hda_load="YES"
#Wireless Card
if_ath_load="YES"
wlan_scam_ap_load="YES"
wlan_scan_ap_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
New
/etc/rc.conf :
Code:
# Please make all changes to this file, not to /etc/defaults/rc.conf. #
# This file now contains just the overrides from /etc/defaults/rc.conf. #
#Linux options
linux_enable="YES"
#Power options
powerd_enable="YES"
powerd_flags="-a maximum -i 85 -r 60 -p 100"
#Input devices
keymap="spanish.iso"
moused_enable="NO"
#File systems (external and ntfs-3g)
devfs_system_ruleset="localrules"
fusefs_enable="YES"
fusefs_safe="YES"
fusefs_safe_evil="YES"
#Network
hostname="aspireone"
inetd_enable="NO"
sshd_enable="YES"
background_dhclient="YES"
ifconfig_re0="DHCP"
ifconfig_ath0="WPA DHCP"
#Enable NFS client
nfs_cilent_enable="YES"
nfs_client_flags="-n 4"
#Enable NFS server
rcpbind_enable="YES"
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
mountd_flags="-r"
#Sound mixer
mixer_enable="YES"
#HAL (X.org/KDE4)
hald_enable="YES"
dbus_enable="YES"
Append to
/etc/sysctl.conf :
Code:
#Update linux compatibility
compat.linux.osrelease=2.6.16
#Allow non-root mounting
vfs.usermount=1
#Disable system beep
hw.syscons.bell=0
#Enable wireless LEDs
dev.ath.0.ledpin=3
dev.ath.0.softled=1
Append to
/etc/fstab :
Code:
linproc /usr/compat/linux/proc linprocfs rw 0 0
New
/etc/devfs.rules :
Code:
# Allow mounting of USB devices as non-root
[localrules=5]
add path 'da*' mode 0660 group operator
Diff
/etc/hosts with:
Code:
- ::1 localhost localhost.my.domain
+ ::1 localhost localhost.my.domain aspireone.localhost aspireone
- 127.0.0.1 localhost localhost.my.domain
+ 127.0.0.1 localhost localhost.my.domain aspireone.localhost aspireone
New
/etc/wpa_supplicant.conf :
Quick WEP setup. Check the wpa_supplicant manual page for other examples
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="MYSSID"
scan_ssid=1
key_mgmt=NONE
wep_tx_keyidx=0
wep_key0=0123456789
}
Append to
/etc/devfs.conf :
Code:
#Access to Intel integrated graphics DRI/drm in X.org
perm card0 0666
New
/etc/exports :
Code:
#The following examples export /usr to 3 machines named after ducks,
#/usr/src and /usr/obj read-only to machines named after trouble makers,
#/home and all directories under it to machines named after dead rock stars
#and, /a to a network of privileged machines allowed to write on it as root.
#/usr huey louie dewie
#/usr/src /usr/obj -ro calvin hobbes
#/home -alldirs janice jimmy frank
#/a -maproot=0 -network 10.0.1.0 -mask 255.255.248.0
#
# You should replace these lines with your actual exported filesystems.
# Note that BSD's export syntax is 'host-centric' vs. Sun's 'FS-centric' one.
/home -alldirs -maproot=root otherfreebsd
7. Ports management
Fetch ports with the following command:
Then install ports-mgmt/portupgrade the tradional way:
Code:
cd /usr/ports/portupgrade/ports-mgmt/portupgrade && make install clean
Alternatively, remotely add the binary package:
Code:
pkg_add -r ports-mgmt/portupgrade
If a compatible FreeBSD installation is available (from the same major release and architecture), I strongly suggest to pkg_create it and then pkg_add locally (you can get the version installed with pkg_info). Working example:
At the compatible FreeBSD installation:
Code:
pkg_info | grep portupgrade
mkdir /root/portupgrade
cd /root/portupgrade
pkg_create -Rb portupgrade-2.4.6_3,2
At the installation in course:
Code:
cp -R /path/to/portupgrade /root/portupgrade
cd /root/portupgrade
pkg_add portupgrade-2.4.6_3,2.tbz
Abstract to the the procedure suggested to install ports from binary packages, skipping building dependencies as possible, and compiling only when absolutely necessary:
The Acer Aspire One has not enough muscle to leave it dedicated to compile just everything.
First, attempt to fetch the latest binary packages. If some dependency fails to be fetched, then force to fetch the available binary packages in the whole dependency chain (even if not the latest). If still some depencencies couldn't be fetched as binary packages, compile those as needed. Or in code:
Let's use as an example,
sysutils/fusefs-ntfs, which is going to be installed shortly. The package fusefs-ntfs-2009.4.4.tbz example should be replaced as well with the actual version of the port being installed.
A. Attempt to fetch the latest binary packages:
Code:
pkg_fetch -R sysutils/fusefs-ntfs
B. If successful, pkg_add the downloaded tarball (the name of the tarball appears in the pkg_fetch output):
Code:
pkg_add /usr/ports/packages/All/fusefs-ntfs-2009.4.4.tbz
rehash
pkgdb -u
C. If dependency fetching was skipped or failed, force downloading available binary packages:
Code:
portinstall -fFPPk sysutils/fusefs-ntfs
D. If successful pkg_add the downloaded tarball:
Code:
pkg_add /usr/ports/packages/All/fusefs-ntfs-2009.4.4.tbz
rehash
pkgdb -u
E. If forced-fetching failed, then do a direct portinstall, compiling as needed:
Code:
portinstall -P sysutils/fusefs-ntfs
rehash
References:
10. Mounting NTFS slices in read/write mode
Install the NTFS-3G driver: sysutils/fusefs-ntfs
Skip the following quoted segment. The instructions in the fuse-ntfs and hal documentation were followed as indicated, but the functionality isn't there. It's included here just as reference.
Procedure for executing fusefs-ntfs in unprivileged mode:
- First setuid-root the ntfs-3g binary:
Code:
chgrp operator /usr/local/bin/ntfs-3g
chmod 4750 /usr/local/bin/ntfs-3g
- FreeBSD has a hard coded list of mount programs that can be called, so to make this work:
Code:
mv /sbin/mount_ntfs /sbin/mount_ntfs-kern
cp /usr/local/share/hal/mount-fuse /sbin/mount_ntfs
chown root:wheel /sbin/mount_ntfs
chmod 555 /sbin/mount_ntfs
Work-around
To make this (sort-of) work with an internal NTFS slice, I skipped the renaming the mount_ntfs part, and added this entry to /etc/fstab :
Append to
/etc/fstab :
Code:
/dev/ad0s2 /mnt/ad0s1-rw ntfs rw,mountprog=/usr/local/bin/ntfs-3g,late,noauto 0 0
/dev/ad0s2 /mnt/ad0s1 ntfs ro,noauto 0 0
This assumes the Acer Recovery FAT-32 slice was left intact, and the Windows XP slice is the second in line (default). If you removed altogether the recovery slice and now the Windows XP slice is the first one, replace ad0s2 with ad0s1.
Of course, both mount points have to be created:
Code:
mkdir -p /mnt/ad0s1-rw
mkdir -p /mnt/ad9s1
So, as root, the NTFS slice can be mounted either in read-write-fuse or read-only-non-fuse mode by issuing, respectively:
- or -
Next is a mount_ntfs-3g shell script to invoke the ntfs-3g binary (no -t ntfs-3g as it was already noticed, the mount types are hardcoded), to mount other devices (such as external USB):
New
/sbin/mount_ntfs-3g :
Code:
#!/bin/sh
/usr/local/bin/ntfs-3g $*
In theory, to give unprivileged functionality, mount_ntfs-3g could added to sudo. This is out of the scope of this guide, and in particular, not recommended.
References:
- Continues on this thread -