gimpe »
04 August 2009 »
In FreeNAS, bash »
wget
To install wget on a “data” parition:
export PKG_TMPDIR=/mnt/usb-data/temp
pkg_add -r wget -P /mnt/usb-data/pkg
Now we need a script to create the symlinks to the wget binaries in the “pkg” directory:
nano /mnt/usb-data/hooks.sh
Here’s the content:
#!/bin/sh
ln -s /mnt/usb-data/pkg/bin/wget /bin/wget
Now make it run at boot time, go in System —> Advanced —> Command scripts and enter:
/mnt/usb-data/hooks.sh
Select PostInit and that’s it! Everytime you reboot your FreeNAS server the symlinks will be re-created!
bash
For bash, add this in the “hooks.sh” script:
# .bashrc for root
ln -s /mnt/usb-data/bashrc /root/.bashrc
# .bashrc for regular user
ln -s /mnt/usb-data/bashrc /mnt/.bashrc
# automatically load bash for root on login (not clean but works)
echo "bash --init-file /mnt/usb-data/bashrc" >> /root/.cshrc
# automatically load bash for regular user on login (not clean but works)
echo "bash --init-file /mnt/usb-data/bashrc" >> /mnt/.cshrc
Continue reading...
Tags: bash, FreeNAS
gimpe »
03 August 2009 »
In FreeNAS, bash »
You need an embedded install with a data partition. My FreeNAS server runs from a 1GB usb stick and the data partition is mounted as “/mnt/usb-data”. To install Vim on the usb stick:
# using csh
setenv PKG_TMPDIR /mnt/usb-data/temp
# install package
pkg_add -r vim-lite -P /mnt/usb-data/pkg
Now we need a script to create the symlinks to the Vim binaries in the “pkg” directory:
nano /mnt/usb-data/hooks.sh
Here’s the content:
#!/bin/sh
# Vim symlinks to binaries
ln -s /mnt/usb-data/pkg/bin/vim /bin/vi
ln -s /mnt/usb-data/pkg/bin/vim /bin/vim
# .vimrc for root
ln -s /mnt/usb-data/pkg/share/vim/vim72/vimrc_example.vim /root/.vimrc
# .vimrc for regular user
ln -s /mnt/usb-data/pkg/share/vim/vim72/vimrc_example.vim /mnt/.vimrc
# syntax file
mkdir /usr/local/share/vim/
mkdir /usr/local/share/vim/syntax/
ln -s /mnt/usb-data/pkg/share/vim/vim72/syntax/syntax.vim /usr/local/share/vim/syntax/syntax.vim
Now make it run at boot time, go in System —> Advanced —> Command scripts and enter:
/mnt/usb-data/hooks.sh
Select PostInit and that’s it! Everytime you reboot your FreeNAS server the symlinks will be re-created!
Continue reading...
Tags: bash, FreeNAS
gimpe »
01 August 2009 »
In bash, linux, network »
vi /etc/init.d/1000Mbs
#!/bin/sh
ETHTOOL="/usr/sbin/ethtool"
DEV="eth0"
case "$1" in
start)
echo -n "Setting eth0 speed 1000 full-duplex...";
$ETHTOOL -s $DEV speed 1000 duplex full autoneg on;
echo " done."
;;
stop)
;;
esac
exit 0
update-rc.d 1000Mbs defaults
SOURCE: http://www.cyberciti.biz/tips/howto-linux-add-ethtool-duplex-settings-permanent.html
Continue reading...
Tags: bash, linux, network
gimpe »
29 July 2009 »
In linux »
1 – Compile and install driver:
Source: http://wiki.cchtml.com/
sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms
sh ati-driver-installer-9-7-x86.x86_64.run --buildpkg Ubuntu/jaunty
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb
2 – Generate base xorg.conf:
sudo aticonfig --initial=dual-head
sudo aticonfig --dtop=horizontal
Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.
3 – Log out and log in to use the new xorg.conf
4 – Activate multi-screen & compiz:
Source: http://www.uluga.ubuntuforums.org/showthread.php?p=7552538
Start ATI Catalyst Control Center as root:
sudo amdcccle
Now, go in Display Manager -> Multi-Display -> Big Desktop right fo display 1
Then start compiz: System -> Preferences -> Appearence -> Visual Effects
Continue reading...
Tags: linux
gimpe »
16 July 2009 »
In FreeBSD »
mkdir /var/log/lighttpd.access.log
mkdir /var/log/lighttpd.error.log
chown www:www /var/log/lighttpd.access.log
chown www:www /var/log/lighttpd.error.log
http://redmine.lighttpd.net/boards/2/topics/144
mkdir /var/run/lighttpd/
and chown it to the user you configured in lighttpd
Continue reading...
Tags: FreeBSD
gimpe »
09 July 2009 »
In FreeNAS »
UPDATE 2010-05-20
I am now running 0.7.1 Shere (revision 5127) since 1 month with Hyperthreading enabled and I had no issue. It seems to be fixed.
UPDATE 2009-09-03
Still running without any issues :)
UPDATE 2009-08-01
Re-installed FreeNAS this weekend and the problem didn’t come back!
Disabling Hyperthreading fixed it!
UPDATE 2009-07-26
Disabling Hyperthreading in the Bios seems to do the trick, I haven’t yet got the error again, I am crossing my fingers.
UPDATE 2009-07-21
Now I am trying to disable Hyperthreading to see if my problem will go away, stay tuned.
ORIGINAL POST
I had some “panic spin lock held too long” problem, my FreeNAS box was freezing without any reasons.
Here’s what I did:
- Resetted the Bios to default settings (I had turned OFF many things before)
- Installed using full install amd64 (I was using an embedded install before)
- System -> Advanced -> activated Power Daemon
- Network -> LAN -> activated Device Polling
- Network -> LAN -> Type 1000baseTX / Full-Duplex
And since then no more “panic spin lock held too long”.
Unfortunately, the problem came back :( It seems to be related to when I leave mounted shares on my Ubuntu dektop for a long period without activity. I re-installed my NAS directly with FreeBSD/Samba and the same problem happened again.
Interesting feed: http://lists.freebsd.org/pipermail/freebsd-stable/2009-July/thread.html#51019
Continue reading...
gimpe »
18 June 2009 »
In linux »
1 – Compile and install driver:
Source: http://wiki.cchtml.com/
sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms
sh ati-driver-installer-9-6-x86.x86_64.run --buildpkg Ubuntu/jaunty
# i386
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb
# AMD64
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb
2 – Generate xorg.conf:
sudo aticonfig --initial=dual-head --screen-layout=right
sudo aticonfig --dtop=horizontal --overlay-on=1
sudo aticonfig --xinerama=on
Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.
3 – Bug workaround:
Source: http://jen3ral.wordpress.com/
- Login to a tty (ctrl+alt F1) and type sudo killall gdm.
- Type sudo nano (or gedit, whichever you prefer) /etc/ati/amdpcsdb to edit the file. Go to the [AMDPCSROOT/SYSTEM/DDX] section and add:
EnableRandR12=Sfalse.
- Type this into a terminal, sudo nano (or gedit) /etc/X11/xorg.conf, to open the xorg.conf file.
- Under the “Device” section add these options on separate lines:
Option "EnableRandR12" "false"
Option "DesktopSetup" "horizontal"
- Now just restart your computer and it should be good to go.
Compiz still not working…
Continue reading...
Tags: linux
gimpe »
15 June 2009 »
In linux »
When you add a new network card in your linux box and remove the old one, the new card will be named eth1. If you want to change it back to eth0, you can edit the file “70-persistent-net.rules” to remove the old eth0 card line and also remove the new eth1 line:
vi /etc/udev/rules.d/70-persistent-net.rules
Then you just need to reboot and the file will be updated with the new network card as eth0.
Continue reading...
Tags: linux
gimpe »
03 March 2009 »
In linux »
dpkg-reconfigure exim4-config
Choose: “mail sent by smarthost; received via SMTP or fetchmail”
Continue reading...
Tags: linux