Time to turn to Arch

Sometime in March 2013...

 

Prepare disks

Two 1TB disks. Create physical partitions:

gdisk /dev/sda
gdisk /dev/sdb
using o, n, fd00 (Linux RAID)

Create RAID:
mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/sda1 /dev/sdb1 --assume-clean --metadata=1.0

Format partitions:
mkfs -t ext4 /dev/md0

Mount root:
mount /dev/md0 /mnt

Setup connection:
wifi-menu
lsusbRealtek RTL8191SU 802.11n WLAN Adapter
ip linklist interfaces
ip link set eth0 downshutdown eth0 so it’s not on the way of wlan0

 

Install system

Install the base system:
pacstrap /mnt base base-devel

Generate fstab:
genfstab -p /mnt >> /mnt/etc/fstab

chroot:
arch-chroot /mnt

Install wpa_supplicant, so netcfg would work later:
pacman -S wpa_supplicant

Install bootloader & run bootloader script:

pacman -S syslinux
syslinux-install_update -i -a -m

On partition 1 set bit 2 attribute (legacy BIOS bootable):

sgdisk /dev/sda --attributes=1:set:2
sgdisk /dev/sdb --attributes=1:set:2

Install MBR:

dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sda
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdb

Configure bootloader (setting vga for framebuffer):

nano /boot/syslinux/syslinux.cfg
UI vesamenu32.c
PROMPT 1
APPEND root=/dev/md0 ro md=0,/dev/sda1,/dev/sdb1 vga=361

Update RAID config file & assemble RAID (check config):

mdadm --examine --scan >> /etc/mdadm.conf
mdadm --assemble --scan

Set hostname:
echo [hostname] > /etc/hostname

Set timezone & set harware clock to system time:

ln -s /usr/share/zoneinfo/Australia/Sydney /etc/localtime
date -s "-11 hours"
hwclock --hctosys --utc

Set locale (set LANG if needed, uncomment locales, generate locales):

locale > /etc/locale.conf
nano /etc/locale.conf
nano /etc/locale.gen
locale-gen

Create initial RAM disk environment (added both modules and mdadm_udev to conf):
nano /etc/mkinitcpio.conf

MODULES="ext4 raid456"
HOOKS="base udev autodetect pata scsi sata mdadm_udev filesystems usbinput fsck"
mkinitcpio -p linux

Set root password & reboot:

passwd
reboot

 

Initial setup

Configure pacman, as needed:
nano /etc/pacman.conf

Setup network connection (wireless):
ip addrfind wireless device
cp /etc/network.d/examples/wireless-wpa /etc/network.d/mynetworkcreate profile
nano /etc/network.d/mynetworkstart
netcfg mynetworkstart X

Update the system:
pacman -Syu

Configure user:

useradd -m -g users -s /bin/bash <username>
usermod -G audio,disk,floppy,games,locate,lp,network,optical,power,scanner,storage,sys,uucp,video,wheel <username>

Install X:
pacman -S xorg-server xorg-xinit xorg-server-utilsX
pacman -S mesa3D support
pacman -S nvidia nvidia-utilsnvidia
pacman -S xorg-twm xorg-xclock xtermdefault environment
startxtest & make sure it works

Install gnome:

pacman -S gnome gnome-extra
login as user
echo exec gnome-session >> .xinitrc

 

Apps

Some useful things:
yaourt adding access to AUR
gnome gnome-tweak-tool (kb layout switch, shell extensions, etc.)
https://extensions.gnome.org/
fonts e.g. ttf-freefont, etc.
manual install of fonts:
su
mkdir /usr/share/fonts/my-fonts
cp <font-files> /usr/share/fonts/my-fonts
chmod 0644 /usr/share/fonts/my-fonts/*
fc-cache -vf
(build font info cache files)
ssh openssh
on local site:
add Port 443 to /etc/ssh/sshd_config (to enable SSHD listening on HTTPS port)
on remote site (behind firewall):
put ProxyCommand /bin/corkscrew <proxy_ip> <proxy_port> %h %p into ~/.ssh/config
call ssh -L <port>:localhost:<port> <username>@<sshd_ip> -p 443
connect to localhost:<port> as required
vsftpd Enable the following in /etc/vsftpd.conf
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO

# Uncomment this to allow local users to log in.
local_enable=YES

# Uncomment this to enable any form of FTP write command.
write_enable=YES

chroot_local_user=YES 	# jail local users to their home directory
firefox plugins: flashplugin, NetVideoHunter, Russian spellchecking dictionary, Australian English Dictionary, Transliterator

about:config
extensions.transliterator.layouts.sasha.description;sasha

extensions.transliterator.layouts.sasha;[["a","À"],["b","Á"],["v","Â"],["g","Ã"],["d","Ä"],["e","Å"],["yo","¨"],["zh","Æ"],["z","Ç"],["i","È"],["j","É"],["k","Ê"],["l","Ë"],["m","Ì"],["n","Í"],["o","Î"],["p","Ï"],["r","Ð"],["s","Ñ"],["t","Ò"],["u","Ó"],["f","Ô"],["x","Õ"],["c","Ö"],["ch","×"],["sh","Ø"],["shch","Ù"],["``","Ú"],["`","ú",true],["y","Û"],["''","Ü"],["'","ü",true],["q","Ý"],["yu","Þ"],["ya","ß"],["\\e","ª"],["\\i","²"],["yi","¯"],["\\'","'"],["y\\u","ÛÓ"],["y\\i","ÛÈ"]]
thunderbird move old profile and run thunderbird -profilemanager to migrate everything
gimp plugins / extensions: gimp-plugin-gmic gimpfx-foundry(yaourt) gimp-plugin-separate+ extra-fonts-gimp gimp-extras gimphelp-scriptfu FIL(manually)
apache
php
php-apache
web server & extensions
ntp time sync
ntfs-3g NTFS support
digital camera (PTP) &
Android phone (MTP)
pacman -S gphoto2
pacman -S gvfs-gphoto2, gvfs-mtp

pacman -S thunar

* thunar auto-mounts the mobile on connection
* after restart both camera and mobile are auto-mounted on connection (by system)

e.g.
lsusb:
Bus 003 Device 053: ID 04b0:0423 Nikon Corp. D5000
Bus 003 Device 051: ID 04e8:685c Samsung Electronics Co., Ltd GT-I9250 Phone [Galaxy Nexus]
in thunar use:
mtp://[usb:003,051]/
gphoto2://[usb:003,053]/
tigervnc vncserver :1 (start)
vncserver -kill :1 (stop)
x11vnc x11vnc -display :0 (to connect to main display)
fuseiso for mounting ISO images
virtualbox usermod -aG vboxusers romashka (to allow VirtualBox to access USB devices)
aspell dictionaries e.g. aspell-ru
aspell dump dicts (check installed dicts)
firewire yaourt -S dvb-fe-tda10048-1.0.fw - firmware
dvgrab - to capture DV / MPEG-2 Transport Stream (HDV) video and audio data from FireWire
mythtv systemctl start mysqld
usermod -a -G mysql,mythtv <username>
systemctl restart mysqld
mysql -u root -p < /usr/share/mythtv/mc.sql
mysql_upgrade -u root -p
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

echo MBE_USER='mythtv' > /etc/conf.d/mythbackend
mythtv-setup
systemctl start mythbackend
(run as superuser)
mythfilldatabase
must make ~/.mythtv/channels readable and <storage dir> read/write

to get channel 9 working, manually add transport and rescan: Standard=DVB, Freq.=191625000, Bandwidth=7MHz, Inversion=Auto, Modulation=QAM-64, LP Coderate=None, HP Coderate=3/4, Trans.Mode=8K, Guard Int.=1/16, Hierarchy=None

Full channel table (+ after DTV move, if applicable)
Seven               ATN    177.500 Mhz -> 529.500 Mhz
Nine                TCN    191.625 Mhz
Ten                 TEN    219.500 Mhz
ABC                 ABC    226.500 Mhz
Television Sydney   TSN    536.625 Mhz
SBS                 SBS    571.500 Mhz -> 557.500 Mhz
w_scan -c AU (install and attempt to blind scan all DVB, if some channels are not found)
HP PSC 750 (printer-scanner) pacman -S sane cups
xsane
(scanner got recognised)
hp-setup -i (setup printer)

Services to enable to auto-start:

systemctl enable mysqld.service
systemctl enable mythbackend.service
systemctl enable netcfg.service
(two profiles: wireless, ethernet)
systemctl enable httpd.service
systemctl enable sshd.service
systemctl start cups.service
systemctl start ntpd.service

 

Other issues:

Get delete key to actually delete a file:
in ~/.config/nautilus/accels uncomment line (gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")

Fix broken icons:

su pacman -S librsvg /usr/bin/gdk-pixbuf-query-loaders --update-cache

Fix audio starting mute:

su
pacman -S pavucontrol
(and configure the volume there)

Fix HIGHMEM64 issue (using only 2.7 GiB of RAM for 32-bit systems):

zgrep HIGHMEM64 /proc/config.gz shows CONFIG_HIGHMEM64G=n
yaourt -S linux-pae nvidia-pae

Fix a degraded RAID array:
mdadm -D /dev/md0 find out faulty device
Number Major Minor RaidDevice State
0      0     0     0          removed
1      8     17    1          active sync /dev/sdb1
mdadm --zero-superblock /dev/sda1overwrite superblock
mdadm --add /dev/md0 /dev/sda1add hdd back to array
cat /proc/mdstatcheck the status of sync

Fix Adobe Flash plugin not opening in fullscreen mode:

su
pacman -S devilspie
mkdir ~/.devilspie
nano ~/.devilspie/flash-fullscreen-firefox.ds
(if
 (is (application_name) "plugin-container")
  (begin
   (focus)
  )
)
use gnome-session-properties to set-up autostart

 

Changes / Additions:

Remove netcfg, install NetworkManager

nano /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
no-auto-default=00:24:1d:8a:2e:09	# do not create default wired connection to eth0 (use wlan0)

dkms (dynamic kernel module support)

pacman -Rd nvidia
yaourt -S nvidia-hook (also installs nvidia-dkms)
yaourt -S vboxhost-hook (also installs virtualbox-host-dkms)
add to HOOKS="... nvidia vboxhost" in /etc/mkinitcpio.conf

build and install modules manually, without reboot:
dkms install -m vboxhost -v 4.3.6 -k 3.13.5-1-pae
dkms autoinstall -k 3.13.5-1-pae
(for all modules)
3.13.5-1-pae: from /usr/lib/modules/ (location for kernel)
4.3.6: from /var/lib/dkms/<module>/ (location for individual dkms packages)

Remove orphaned packages and their configs recursively:
pacman -Rns $(pacman -Qtdq)

Remove old kernel versions:

pacman -Qo /usr/lib/modules/3.13.1.1-pae (see whether the file is used by any package)
rm -rf /usr/lib/modules/3.13.1.1-pae

Send mail from console:

pacman -S mutt
nano ~/.mutt/muttrc
set smtp_url=smtp://user:pass@smtp_mail.server.org:port (SMTP port is typically 25)
set from=email@address.org

Problem with NVIDIA / PAE:

  • Used to have the following packages: linux, nvidia
  • Then I realised that I need linux-pae to enable HIGHMEM support. So the setup became: linux-pae, nvidia-pae
  • Then NVIDIA dropped support for my card, so I had to switch to nvidia-340xx. There is no nvidia-340xx-pae, so I started using dkms. The setup became: linux-pae, nvidia-340xx-dkms
  • Then nvidia-340xx-dkms became outdated in AUR (it seems to be no longer maintained), so I had to "update all" ignoring the newest nvidia-340xx-utils and nvidia-340xx-libgl
  • Then new Xorg got released which no longer works with outdated nvidia-340xx packages
  • Now the only setup that works for me (hanging the latest KDE plasma soon after start and crashing Enlightenment from time to time, but at least it does work) is as follows: linux, nvidia-340xx
DECISION: Enough! Switch to 64-bit following this guide.

Problem with new wireless USB adaptor (8192CU):

Install dkms-8192cu package (which will black list in-tree rtl8192cu driver etc.)

Valid HTML 4.01 Transitional

© sashka76 [at] hotmail.com ®