Acer Aspire One 150 - Setting up 7-STABLE with KDE4 and Flash 10 from scratch.

I hereby release this guide to the public domain.

The objective of this guide is to get a full working FreeBSD-STABLE installation, with a complete desktop environment (KDE4), Linux f10 compatibility, and a full set of web ammenities (Firefox, Opera, Java and Flash 10) on the Acer Aspire One 150.

- Continues in this thread -
 
Part 1

- Part 1 -

AOA 150-1063 | P/N LU.S410B.014 | Model # ZG5

Specifications:
  • Intel Atom Processor N270 (512KB L2 CACHE, 1.60GHz, 533MHz FSB)
  • 1GB (512MB onboard/512MB SODIMM slot) DDR2 533 SDRAM
  • 160GB HDD
  • Multi-card reader, SD Card reader
  • 8.9" WSVGA (1024 x 600) TFT display, Acer CrystalBrite Technology
  • Intel Graphics Media Accelerator 950
  • 802.11b/g WLAN, 10/100 LAN
  • Webcam
  • Spanish Keyboard
  • 3-cell battery

Link to the DMESG output

This guide assumes you're a bit acquainted with the *NIX shell and *NIX-like systems in general. It provides instructions to start up from the default Windows XP installation from factory state.

This guide also assumes having available a local network with a DHCP enabled 10/100 switch, and high speed internet access,

This procedure doesn't require a CD or DVD drive, just a couple of bootable USB sticks. Having a second computer enabled as a FTP server is desirable, though other accommodations may be necessary.



A. Preparations from scratch from the default Windows XP installation.

0. Create a bootable linux "System Rescue CD" on a 1 GB USB-stick with Gparted.
Follow the instructions at the end of this guide to do so.​

1. Download the GAG boot manager from this link.
Extract the contents of the zip file, browse the directory (folder), and copy the "linux" directory to the top level directory of the USB-stick, renaming it as "gag". Edit copy-files.sh in the linux directory with the Notepad, and replace its contents with this:

Code:
#!/bin/bash
mkdir /boot/gag
#cp *.COM /boot/gag/
cp bable.com /boot/gag/BABLE.COM
cp boot.com /boot/gag/BOOT.COM
cp brazilia.com /boot/gag/BRAZILIA.COM
cp catalan.com /boot/gag/CATALAN.COM
cp czech.com /boot/gag/CZECH.COM
cp danish.com /boot/gag/DANISH.COM
cp dutch.com /boot/gag/DUTCH.COM
cp english.com /boot/gag/ENGLISH.COM
cp espanol.com /boot/gag/ESPANOL.COM
cp euskera.com /boot/gag/EUSKERA.COM
cp french.com /boot/gag/FRENCH.COM
cp galego.com /boot/gag/GALEGO.COM
cp german.com /boot/gag/GERMAN.COM
cp hdboot.com /boot/gag/HDBOOT.COM
cp hungar.com /boot/gag/HUNGAR.COM
cp install.com /boot/gag/INSTALL.COM
cp italian.com /boot/gag/ITALIAN.COM
cp japan.com /boot/gag/JAPAN.COM
cp norwe.com /boot/gag/NORWE.COM
cp polish.com /boot/gag/POLISH.COM
cp portugal.com /boot/gag/PORTUGAL.COM
cp rusian.com /boot/gag/RUSIAN.COM
cp swedish.com /boot/gag/SWEDISH.COM
cp turkish.com /boot/gag/TURKISH.COM
cp gag-install /sbin
chmod 755 /sbin/gag-install
echo GAG files copied to the hard disk. Now  can install it
echo using "gag-install" as root
# End of file
The script copies each file one by one because uppercase filenames at the FAT filesystem will be recognized as lowercase by the linux live-USB.

2. Prepare the hard disk drive for the FreeBSD installation.
  • Boot with the SystemRescueCD USB-Stick, select the keyboard layout (in this case is 13-spanish) and once it finish booting up, issue the following command:
Code:
wizard
  • Then press enter to select the default option. X will launch.
  • Press the bottom left icon to see the menu and launch gparted.
  • Read the GPARTED documentation for instructions on how to use it: http://gparted.sourceforge.net/larry/generalities/gparted.htm
  • Make space for the FreeBSD installation at the end of the disk layout (I recommend at least 24 GB: 20 GB for /, 1 GB for swap and a minimum of 3 GB for /home. 30GiB is enough for a test drive).
  • After resizing the current partitions, create a dummy ext2 partition on the space to install FreeBSD.

3. Installing GAG.
This is the way I've found to do so without a cdrom drive or an in-disk linux installation.
  • Fire up a terminal and issue the following commands:
Code:
cd /mnt/cdrom/gag
sh copy-files.sh
cd /sbin
./gag-install /dev/sda
  • This installs the default english qwerty configuration. In order to install other keyboard layout or language, use the following syntax (all in small caps):
Code:
gag-install -k keyboardlayout -l language /dev/sda
Where language is any name (in smallcaps) of the list contained in the copy-files.sh script that was replaced previously, and the keyboard layouts are the following: qwerty, azerty, qwertz, dvorak, or cyrillic.
  • Check the "Configuring and using" section of the documentation (instruc2.html) included with gag in the "docs" directory (folder), in order to learn how to set it up once it boots.


B. Installation Procedure

0. Download the latest stable dvd1 and bootonly .iso files for 7.2-STABLE i386 (at the time of writing this guide, the latest snapshot was 2009-06) from one of the FTP mirrors.
The stable snapshots are located at this general path:​
HTML:
ftp*.freebsd.org/pub/FreeBSD/snapshots/


1. Prepare sysinstall bootable usb-stick with bootonly ISO file.
I've reached dead end on finding a way to convert a FreeBSD .iso file into an .img file on a windows system. Supposedly, Unetbootin works with 7.0-RELEASE, but this procedure requires the latest 7-STABLE snapshot. So I decided to make a 7.2-STABLE-200906-i386-bootonly.img and upload it to mediafire. Making available the dvd1.iso converted to img file for download is unfeasable this time.

Download the bootonly.img here.

And copy the img file to a USB-stick from a windows system using Image Writer. Other dd clones haven't made the cut.

Alternatively, you can do this same procedure from a FreeBSD installation (if available).

Use the following script to convert from iso to img:​
Code:
#!/bin/sh
# This script is released to the Public Domain. It is a minor modification
# of the script submitted to the freebsd-questions mailing list on
# Sat Aug 4 12:42:38 UTC 2007 by fbsd2 at a1poweruser.com . Hyperlink:
# http://lists.freebsd.org/pipermail/freebsd-questions/2007-August/154956.html
#
#Purpose = Use to convert the FreeBSD install cd1, dvd1, or bootonly iso to 
#          a bootable, flashable img file so it can be used to install from. 
#          First fetch the desired iso file to your hard drive, then
#          execute this script from the command line:
#
# sh img2iso /path/to/file.iso /path/to/file.img
#
# You can later transfer the img file to a usb drive by issuing dd. In the 
# following example, /dev/da0 is the location of the usb drive. It must not
# be mounted.
#
# dd if=/path/to/file.img of=/dev/da0 bs=1m
#
# Change system bios to boot from USB-dd and away you go. 
#
# You can set some variables here. Edit them to fit your needs.
#
# Set serial variable to 0 if you don't want serial console at all,
# 1 if you want comconsole and 2 if you want comconsole and vidconsole
serial=0

set -u

if [ $# -lt 2 ]; then
    echo "Usage: $0 source-iso-path output-img-path"
    exit 1
fi

isoimage=$1; shift
imgoutfile=$1; shift

# Temp  directory to be used later
#export tmpdir=$(mktemp -d -t fbsdmount)
export tmpdir=$(mktemp -d /usr/fbsdmount)

export isodev=$(mdconfig -a -t vnode -f ${isoimage})

ISOSIZE=$(du -k ${isoimage} | awk '{print $1}')
SECTS=$((($ISOSIZE + ($ISOSIZE/5))*4))
#SECTS=$((($ISOSIZE + ($ISOSIZE/5))*2))


echo " "
echo "### Initializing image File started ###"
echo "### This will take about 4 minutes ###"
date
dd if=/dev/zero of=${imgoutfile} count=${SECTS}
echo "### Initializing image File completed ###"
date

echo " "
ls -l ${imgoutfile}
export imgdev=$(mdconfig -a -t vnode -f ${imgoutfile})

bsdlabel -w -B ${imgdev}
newfs -O1 /dev/${imgdev}a

mkdir -p ${tmpdir}/iso ${tmpdir}/img

mount -t cd9660 /dev/${isodev} ${tmpdir}/iso
mount /dev/${imgdev}a ${tmpdir}/img

echo " "
echo "### Started Copying files to the image now ###"
echo "### This will take from 2 to 30 minutes ###"
date

( cd ${tmpdir}/iso && find . -print -depth | cpio -dump ${tmpdir}/img )

echo "### Completed Copying files to the image file ###"
date


if [ ${serial} -eq 2 ]; then
        echo "-D" > ${tmpdir}/img/boot.config
        echo 'console="comconsole, vidconsole"' >> ${tmpdir}/img/boot/loader.conf
elif [ ${serial} -eq 1 ]; then
        echo "-h" > ${tmpdir}/img/boot.config
        echo 'console="comconsole"' >> ${tmpdir}/img/boot/loader.conf
fi

echo " "
# Uncomment the next few lines if you wish this script to write
# the img file to a usb drive located at /dev/da0
#
#echo "### Started Copying files to the image now ###"
#echo "### This will take about 15 minutes ###"
#date
#
#( cd ${tmpdir}/iso && find . -print -depth | cpio -dump ${tmpdir}/img )
#
#echo "### Completed Copying files to the image ###"
#date

cleanup() {
    umount ${tmpdir}/iso
    mdconfig -d -u ${isodev}
    umount ${tmpdir}/img
    mdconfig -d -u ${imgdev}
    rm -rf ${tmpdir} 
}

cleanup

ls -lh ${imgoutfile}

echo "### Script finished ###"

- Continues in this thread -
 
Part 2

- Part 2 -


2. Prepare FTP server for local network install

In Windows
Mount dvd1-iso image:

Setting up a FTP server:
http://lifehacker.com/130806/how-to-set-up-a-home-ftp-server

Make sure the location where the iso file is mounted is available within the FTP server!



Alternate procedure using a working FreeBSD FTP server:

FreeBSD Handbook section on setting up FTP (Network Servers)

Mount the dvd1 iso image:​
Code:
mdconfig -a -t vnode -f /path/to/7.2-STABLE-200906-i386-dvd1.iso -u 1
mount -t cd9660 /dev/md1 /mnt/iso0

Make sure the mountpoint is accessible to (or inside) the FTP anonymous account. This can be accomplished by symlinking. For example, if the ftp directory is /home/ftp :​
Code:
ln -s /mnt/iso /home/ftp/freebsd-distribution



Alternate procedure in Linux:


Finally, a remote-ftp installation can be executed as well. Check the next section for details.


References:



3. Boot up from the USB-stick and perform a sysinstall.
Read throughly and follow the sysinstall section of the FreeBSD Handbook.

And follow the next installation suggestions:​
  • Upon start, select your location and enter the keymap layout. Select the "spanish" keymap (the particular layout of your system can differ, the most common is "us").
  • Select Standard installation. Pick the ad0 drive. The FDISK screen will appear.
  • With the arrow keys highlight the last slice (the ext2 dummy slice created at the preparations section) and press D to delete. Then C to create slice, select the default type ( 165 ), and press enter. Press Q to continue.
  • Press enter on the next screen to enter the disclabel editor. For the layout used for this guide, create an UFS / partition of 20G, a swap space of 1G, and use the rest for a UFS /home partition. Other layouts are possible, but out of the scope of this guide. Press Q to continue.
  • On the "Choose Distributions" section, select "4 Developer" and select OK. A dialogue asking to install the ports collection appears. Select NO at this point.
  • On the "Choose Installation Media" section, select "2 FTP". If installing locally, select the URL option, provide the local address of the ftp server and the directory containing the installation iso (/freebsd-distribution was defined at the setting up the FTP section). If installing remotely, select a server from a nearby location.
  • In both cases, the network controlled must be configured. The network consist of a IPv4 DHCP enabled router/switch, connected via ethernet with RJ-45 cables. Your network setup may differ. Select the re0 "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" adapter. Chooset NO at the IPv6 configuration dialogue, and YES at DHCP configuration dialogue. Enter any name at the "Host" field, and select OK.
  • At the post installation section, enable ssh, and refuse to enable the gateway, internet services, anonymous ftp, nfs, linux compatibility, mouse, and system console settings at this time.
  • Set the root password. Its a good idea to add one user besides root at this point.
  • Finish the installation and reboot.

References:
[/INDENT]



5. Run csup to sync with -STABLE.
  • Tweak the stable-supfile in the examples directory:
Code:
cp /usr/share/examples/cvsup/stable-supfile /root/
  • Select a cvsup mirror in a nearby location at this address:
  • Modify the supfile ( /root/supfile ):
Code:
-	*default host=CHANGE_THIS.FreeBSD.org
+	*default host=cvsup18.us.FreeBSD.org
  • Issue the following command to invoke the csup update:
Code:
csup -L 2 /root/stable-supfile



5. Compile from source and update (this can take at least 4 hours!)
  • Issue the following commands:
Code:
cd /usr/src
make -j4 buildworld
make -j4 buildkernel
make installkernel
shutdown -r now
  • Boot once again in single user mode, and issue:
Code:
adjkerntz -i
mount -a -t ufs
mergemaster -p
cd /usr/src
make installworld
mergemaster -Ui ***CHECK***
reboot
  • Free up some space (This can take at least 20 minutes!):
Code:
chflags -R noschg /usr/obj/usr
rm -rf /usr/obj/usr
cd /usr/src
make cleandir
make cleandir

Reference:


6. Configuring system files.
These modifications allow to:​
  • Enable linux emulation (further configuration proceeds afterwards).
  • Enable to get information of the core temperature of the processor.
  • Enable power saving flags.
  • Enable sound / sound mixer.
  • Set up the network:
    [*]enable wired ethernet,
    [*]enable wireless network (with encryption) and LED indicators,
    [*]enable background DHCP,
    [*]enable SSH,
    [*]enable NFS client/server mode,
    [*]and set up hosts, exports and wpa_supplicant.​
  • Set up the defaul keyboard layout.
  • Disable mouse daemon (necessary for HAL in X.org)
  • Enable fusefs-ntfs (NTFS r/w driver) (further configuration proceeds afterwards).
  • Allow unprivileged (non-root) users to mount media.

References:

Power options:​

Wireless LED's and system beep:​

Network and wireless configuration:​

Mounting (USB) devices as non-root:​

Fuse extra cautions:​
[/list]

- Continues in this thread -
 
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:​
Code:
portsnap fetch extract
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:
Code:
mount /mnt/ad0s1-rw
- or -
Code:
mount /mnt/ad0s1

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 -
 
Part 4

- Part 4 -

11. Installing X.org
Install the X.org meta-port: x11/xorg
Wait until the port is fetched and installed!

Test X.org launches (it should without no xorg.conf), issue:
Code:
startx

Then switch back to the vTTY from where X was started (ctrl+alt+F*) and stop X.org it by pressing ctrl-c.

At this point, the dri/drm/card access parameters in the devfs.rules and devfs.conf files were already passed and enabled.

References:

12. Installing KDE-4
Install the kdebase4 meta-port (later the full meta-port will be installed): x11/kde4base
Wait until the port is fetched and installed!

Once installed, test it. Create on each user's home dirirectory an .xinitrc file with the following:

New ~/.xinitrc:
Code:
~/.xinitrc
exec /usr/local/kde4/bin/startkde

Then start up kde4 by issuing:
Code:
startx

Now, switch to the desktop environment. Start konsole (alt+F2, konsole, enter) and proceed with the installation.


Setting up kdm as the default desktop manager
Modify the # Virtual terminals section in /etc/ttys :

Diff /etc/ttys :
Code:
-	ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
+	#ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
+	ttyv8   "/usr/local/kde4/bin/kdm -nodaemon"     xterm   on secure

Leaving the default xdm-off line is a good idea in case something goes bad.​


13. Setting up HALd's PolicyKit
Reminder: hald and dbus are already enabled from initial configuration.

PolicyKit configuration for removable and fixed drives
Note: Include in the <match user= fields all users (as for now users belonging to the operator group, separated by pipes "|") allowed to mount media.

New /usr/local/etc/PolicyKit/PolicyKit.conf :
Code:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="operator"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <match user="dad|mom|kid">
                <return result="yes"/>
        </match>
    </match>
    <match action="org.freedesktop.hal.storage.mount-fixed">
        <match user="dad|mom|kid">
                <return result="yes"/>
        </match>
    </match>
</config>


Allowing ctrl-alt-bksp termination:
New /usr/local/etc/hal/fdi/policy/x11-input.fdi :
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>
    </match>
  </device>
</deviceinfo>


Reminder: FUSE-HAL interaction is already addressed in the NTFS-3g driver installation section.


References:


14. Setting up xorg.conf and proper 3D-acceleration

  • Install graphics/driconf
  • Execute driconf (alt+F2, driconf, enter). Where it says "Synchronization with vertical refresh", select the option "Inital swap interval 0, obey application's choice".
  • This is the working xorg.conf, includes 3d-acceleration:

New /etc/X11/xorg.conf :
Code:
Section "ServerLayout"
	Identifier     "XFree86 Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option         "Clone" "Off"
	Option         "AIGLX" "True"
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TrueType"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
	FontPath     "/usr/local/lib/X11/fonts/bitstream-vera/"
	FontPath     "/usr/local/lib/X11/fonts/cyrilliac/"
        FontPath     "/usr/local/lib/X11/fonts/dejavu/"
EndSection

Section "Module"
	Load         "dbe"
	Load	     "dri"
	Load         "dri2"
	Load         "extmod"
	Load         "glx"
	Load         "record"
	Load         "freetype"
EndSection

Section "InputDevice"
	Identifier    "Keyboard0"
	Driver        "kbd"
	Option        "Protocol" "standard"
	Option        "AutoRepeat" "500 30"
	Option        "XkbRules" "xorg"
	Option        "XkbModel" "pc105"
	Option        "XkbLayout" "es"
	Option        "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "InputDevice"
	Identifier    "Mouse0"
	Driver        "mouse"
	Option        "Protocol" "Auto"
	Option        "Device" "/dev/psm0"
	Option        "Buttons" "9"
	Option        "Sensitivity" "1"
	Option        "ZAxisMapping" "4 5"
	Option        "Emulate3Buttons"
EndSection

Section "DRI"
	Mode 0666
EndSection

Section "Extensions" 
	Option        "Composite" "Enable"
	Option        "Solid" "Enable"
	Option        "Copy" "Enable"
EndSection

Section "Monitor"
	Identifier    "Monitor0"
	VendorName    "Monitor Vendor"
	ModelName     "Monitor Model"
#	Modeline      "1024x600"  54.96  1024 1048 1184 1454  600 603 604 630 -hsync -vsync
EndSection

Section "Device"
	Identifier    "Card0"
	Driver        "intel"
	VendorName    "Intel Corporation"
	BoardName     "Mobile 945GME Express Integrated Graphics Controller"
	BusID         "PCI:0:2:0"
	Option        "Clone" "True"
	Option        "DRI" "True"
	Option        "MonitorLayout" "LVDS,VGA"
	Option        "MigrationHeuristic" "greedy"
	Option        "AccelMethod" "EXA"
EndSection

Section "Screen"
	Identifier     "Screen0"
	Device         "Card0"
	Monitor        "Monitor0"
	DefaultDepth   24
	SubSection     "Display"
        	Depth  24 
        	Modes  "1024x600"
	EndSubSection
EndSection


References:


15. UTF-8 Support
Install international fonts:
  • x11-fonts/dejavu
  • x11-fonts/cyberbit-ttfonts

Dejavu is a more UTF-8 complete bitstream-vera-type font, and requires these lines in xorg.conf (already included):
Code:
        Load "freetype"
        FontPath "/usr/local/lib/X11/fonts/dejavu/"

Cyberbit is a CJK font port.

  • Do the following file operations for each one of the users in the system:

Append ~/.login_conf :
Code:
# UTF-8 support
me:\
        :charset=UTF-8:\
        :lang=en_US.UTF-8:

Append ~/.shrc :
Code:
# UTF-8 support
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"
export LC_ALL LANG

Append ~/.cshrc :
Code:
# UTF-8 support
setenv  LC_ALL  en_US.UTF-8
setenv  LANG    en_US.UTF-8

Append ~/.xprofile :
Code:
# UTF-8 support
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8


Reboot the system and verify that the kdm login dialogue appears. If so, continue.

References:


16. Installing the complete KDE4 meta-port
Install the kde4 meta-port: x11/kde4
Wait until the port is fetched and installed!

Log out and log in once more. A complete desktop environment is now available to use.​

17. Installing linux_base-f10
Reminder: The linux compatibility lines were already included in the configure files (/boot/loader.con, /etc/rc.conf, /etc/sysctl.conf and /etc/fstab), but no actual linux base is installed.

Before proceeding, some additional tweaking:

Append /etc/make.conf:
Code:
OVERRIDE_LINUX_BASE_PORT=f10
OVERRIDE_LINUX_NONBASE_PORTS=f10

Make linux_base-f10:
Code:
cd /usr/ports/emulators/linux_base-f10 && make install clean

There are going to be a lot of fetch errors, this behavior is normal. Wait until the port is fetched and installed!


- Continues in this thread -
 
Part 5

- Part 5 -

17. Web browsers with java, and flash-10

Fetch the latest diablo (FreeBSD Java) distfiles:

List of latest files available at the time of this guide's writing:
  • jce_policy-6.zip
  • tzupdater-1_3_18-2009k.zip
  • diablo-latte-freebsd7-i386-1.6.0_07-b02.tar.bz2
  • diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2

Move the files downloaded in the /usr/ports/distfiles/ directory
Code:
mv /path/containing/only/java/zips/* /usr/ports/distfiles/

Make install either diablo-jdk or diablo-jre (if you plan on having tools such an openoffice, you'll be needing the developing kit (jdk).
Code:
cd /usr/ports/java/diablo-jre16 && make install clean
cd /usr/ports/java/diablo-jdk16 && make install clean

Make install Linux Flash 10: www/linux-f10-flashplugin
Since the linux base is already installed and enabled, installing the plugin is going to be trivial.
Make install linux-f10-flashplugin10:
Code:
cd /usr/ports/www/linux-f10-flashplugin10/ && make install clean
There's going to be a lot of fetch errors, this is normal. Wait until the port is fetched and installed!

Install Firefox Web Browswer: www/firefox35

Make install the netscape (mozilla) plugin wrapper: www/nspluginwrapper
Code:
cd /usr/ports/www/nspluginwrapper && make install clean

Create a symbolic link to the flash player plugin in the new plugin location:
Code:
ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so /usr/local/lib/browser_plugins/

Each user should issue the following command to enable in the flash plugin in firefox (except root, since root will attempt to globally install the plugin):
Code:
nspluginwrapper -v -a -i

Enabling the pluigin for firefox will have it ready and available for Konqueror (KDE's defaul web browser).

Install the Opera Web Browser: www/opera

Ceate a /usr/local/etc/nasd.conf file using /usr/local/etc/nasd.conf.eg as a starting point. For shorts, just issue the following command:
Code:
cp /usr/local/etc/nasd.conf.eg /usr/local/etc/nasd.conf
Customize the file if needed.

Make install the opera linux plugin wrapper:
Code:
cd /usr/ports/www/opera-linuxplugins && make install clean

To enable the flash and java plugins in Opera, open (menu) Tools -> Preferences. On the Advanced tab, select content on the left bar. Check [Enable Java] and click on [Java Options]. Click on choose and go to the following path: /usr/local/diablo-jre1.6.0/lib/i386 , then click [Validate Java Path] and [ok]. A message informing the path is valid appears. Check as well [Enable Plugins] and click on [Plug-in Options]. Click on [Find New]. The flash plugin would now be listed.​


18. QT-GTK appearance integration
Install the following ports:
  • x11-themes/qtcurve-kde4/
  • x11-themes/gtk-qt4-engine/
  • x11-themes/qtcurve-gtk2/

These are used to make GTK applications have a fitting look with KDE4, and setup using the "Appearance" module of KDE System Settings.


19. Japanese IME (Anthy input method) (optional)

Other input methods, such as uim and canna, are available as well, but out of the scope of this guide. Some general points of this section may apply to Chinese and Korean input methods as well.

Install the following ports:
  • japanese/scim-anthy
  • textproc/scim-bridge-qt4
  • japanese/font-kochi

Configuration file:
Append to ~/.xprofile:
Code:
# Japanese IME
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim-bridge

Log out and log in again. The scim input module shall appear now.

References:


- The guide ends here -
 
Nice tutorial. I was looking at this topic since I've also installed FreeBSD 7.2 on an acer aspire one. For me everything works except the card reader.

Watching youtube in HD (or other sites with high-consuming cpu flash) from time to time will keep your cpu in 100% and your kde will work very slow. It is useful to have installed htop, from which you can kill flash very easy and also you can see load per each core (well in case of Aspire one you have only one core, but you will see two, because of hyperthreading).
 
Since most of the time I just download the mp4 offered by youtube, I've not really faced that issue. Also, firefox's flashblock is handy for reducing the amount of flash floating around.
 
Thanks Alot...

Thanks for your article... it`s really usefull to me... specially on ntfs-3g part, but use different X`org, I Use Gnome... anyway... thaaaankkkksss so much :stud
 
The D150 is featured today on a popular buying site
(today, friday 16th)
...........................
Notes (not to be taken as
absolutely true, I could have
read something too quickly...)
from that: (just as an aside to this thread).
...........................
one can add a "dell 1390 wifi" upgrade
one can add a bluetooth mouse
one can temporarily use a usb-dvd, say, at home
smaller keyboard than Asus or Samsung notebooks
Over 400 reviews at Amazon, lesser number at
TigerDirect.
Good battery life, but one should recharge it per day
of use probably.
...............
Also mentioned another site with information about it.
..............
 
i`ve been doing your article in ntfs-3g, when i tried to write some files and foldes it works , but something made me confuse, ... when I reboot it, all the files and foldes are gone..

any suggest??
 
Hey thanks for your article! I got a pretty odd problem regarding the gag install. First of all, the copy-files.sh script doens't work properly, as it responses: no such file or directory. I checked the /boot dir and there's just a folder named 'gag?' which appears kinda weird to me?! So I manually created a folder called 'gag' and executed sh copy-files.sh again. Indeed he did copy the files to /boot/gag, but all of them have that question mark at the end of their names. Anyway, changed to /sbin and performed that ./gag-install /dev/sda command, which didn't work cause of 'no such file or directory: ./gag-install'. Well I'm a little desperate in the moment and should add that I'm completely new to FreeBSD, Unix or Linux. Well thanks alot, I hope that's enough information to get a clue what's possibly wrong.
 
I see your section on installing Java and have found myself stuck where 'make' asks for the time zone tool -

' Please open http://java.sun.com/javase/downloads/index.jsp
in a web browser and follow the "Download" link for
"JDK US DST Timezone Update Tool - 1_3_18" to obtain the
time zone update file, tzupdater-1_3_18-2009k.zip.'

The file it is asking for is not available that I can find.

I have downloaded the file that is available tzupdater-1_3_25-2009u.zip

I have tried changing the Makefile and distinfo files to point to the file I downloaded, what I am finding is that there is a MD5 Checksum mismatch which makes sense.

So my question is can I generate a MD5 checksum that I could put into the disinfo file or is there some way around this that anyone has come across?
 
I found an answer:

Make config

On the screen that pops up uncheck the update timezone option on 'ok'

Hope this helps someone else.
 
Config errors

1. In point 14 - Setting up xorg.conf
There is no xorg.conf in /etc/X11/

2. point 17. Make install the netscape plugin...
When I did make install clean for nspluginwrapper, it stopped because linux-f10-pango-1.22.3 has known vulnerabilities
pango -- integer overflow
Please update your ports tree and try again
(#My Ports tree is up to date). So how do I proceed to install the nspluginwrapper?
 
nu2fbsd said:
1. In point 14 - Setting up xorg.conf
There is no xorg.conf in /etc/X11/
Run # Xorg -configure. Then copy /root/xorg.conf.new to /etc/X11/xorg.conf.

http://www.freebsd.org/doc/handbook/x-config.html


nu2fbsd said:
2. point 17. Make install the netscape plugin...
When I did make install clean for nspluginwrapper, it stopped because linux-f10-pango-1.22.3 has known vulnerabilities
pango -- integer overflow
Please update your ports tree and try again
(#My Ports tree is up to date). So how do I proceed to install the nspluginwrapper?
http://forums.freebsd.org/showthread.php?t=10460
 
Back
Top