Quick instructions to get Folding@home (or any other program) to run at boot before user login on Ubuntu Linux. This probably works on other distros with an rc.local file too.
1. Install F@H client, mine is in /opt/folding
2. Create a simple script, I called mine folding.sh and is only has:
#!/bin/bash
cd /opt/folding
./fah6 -smp
3. Put the screen command in /etc/rc.local. This will execute as user nick (su nick -c), “-dmS” will create the session detached and name it folding, and “bash –rcfile” will allow the screen session to keep running even if folding quits.
su nick -c “screen -dmS folding bash –rcfile /home/nick/bin/folding.sh”
Folding@home now starts whenever the computer boots, before anyone logs in. Nick can reattach to it and control it or watch the progress by running “screen -r folding”.
Quick instructions to getting Tripwire installed and running on Ubuntu 6.06 LTS (Dapper Drake). For more detailed instructions check out this site.
1. Install Tripwire. Say Yes to everything, and create some passwords.
% sudo apt-get install tripwire
% sudo tripwire -m i
2. Fix the policy. I was getting many errors that looked like:
### Warning: File system error.
### Filename: /root/.Xauthority
### No such file or directory
I removed the non-existent files from the policy file with the following commands:
% sudo cp /etc/tripwire/twpol.txt /etc/tripwire/twpol.txt.bak
% sudo vim /etc/tripwire/twpol.txt
% sudo tripwire --update-policy -Z low /etc/tripwire/twpol.txt
Later, when you need to update the database, such as after running updates (adjust the date and number from then end of the file, or sometimes you can just drop the whole -r flag):
% sudo tripwire -m u -r /var/lib/tripwire/report/closetbox64-20071223-133927.twr
By default, Tripwire will be set to email whenever it sees changes. To quickly check the status, run:
% sudo tripwire --check
$ cdrdao drive-info /dev/scd0
Cdrdao version 1.2.2 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) MontyCheck http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.
Using libscg version ‘ubuntu-0.8ubuntu1′
/dev/cdrw: LITE-ON DVDRW LH-20A1S Rev: 9L02
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0×0000)Maximum reading speed: 8467 kB/s
Current reading speed: 8467 kB/s
Maximum writing speed: 8467 kB/s
Current writing speed: 8467 kB/s
BurnProof supported: yes
JustLink supported: no
JustSpeed supported: yes
Download all the Ubuntu i386 and AMD64 ISOs with one command.
wget ftp://mirrors.kernel.org/ubuntu-releases/7.04/ubuntu-7.04-{desktop,server,alternate}-{i386,amd64}.iso
I recently upgrade my main workstation’s hard drive under Ubuntu 6.10 and noticed a couple things changed during the process. Here are my instructions for a fast and reliably hard drive swap. I’m using SATA drives without LVM using the default Ubuntu install and partition options for this howto.
My server decided that an executable file didn’t really exist on the file system, or so I thought. Lack of sleep was the main problem, but here are some things I did to check my file system for errors. I setup this file system on a Ubuntu 6.06 AMD64 install with LVM, so everything is in LVM instead of standard partitions.
# sudo e2fsck -n /dev/mapper/Ubuntu-root
This was showing errors, but I ran it while the system was mounted and running, so there were open files, so this was normal. The -n kept e2fsck from attempting to fix anything, which was good because later I ran the command after booting from an Ubuntu LiveCD and found no errors.
Before booting from the LiveCD I tried to get the system to fix itself by running fsck on boot. Two methods I used to do this on Ubuntu were running these from the live system before rebooting, they both accomplish the same thing, so only one was really needed.
# sudo touch /forcefsck
# sudo tune2fs -C 40 /dev/mapper/Ubuntu-root
These appeared to have no affect, probably because the filesystem was fine, but I took down the system and ran fsck from a LiveCD instead. Of course, this wasn’t as simple as it should have been, the LiveCD did not detect my LVM volumes, so /dev/mapper/Ubuntu-root was missing. The fix was to install LVM2 and start it up.
# sudo apt-get install lvm2
# sudo /etc/init.d/lvm start
The /dev/mapper/ entries then appeared and I could run all the fscks I wanted. At this point my fsck checks were coming out clean, so file system corruption was not to blame.
I updated my laptop to Ubuntu 6.10 Beta (Edgy Eft) and it’s working great. So far I’ve had less problems than the beta of Dapper, but it has only been two day. My first experience off the tested path of synaptic packages is ruby on rails. Edgy comes with a rails package, but like Dapper, no gems. So here is the install of gems, and the rails from withing gems, on Ubuntu 6.10 Edgy Eft.
# sudo apt-get install ruby ruby1.8-dev irb rdoc
# wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
# tar xvfz rubygems-0.9.0.tgz
# cd rubygems-0.9.0
# sudo ruby setup.rb
# sudo gem install rails
I did get an rdoc error, but everything else installed fine, so I ignored it and continued on. This error is fixed by adding rdoc to the apt-get command above. It is here for historical purposes, and perhaps will help someone.
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — rdoc/rdoc (LoadError)
Other Notes:
This is a guide for a single user to setup a barebones SVN repository quickly and without any extra confusing instructions.
The following steps will show how to 1.setup a repository for a project, 2. import files into the repo, 3. pull them out into a different folder, and 4. submit changes back to the repo. Before starting, make sure you have subversion installed (sudo apt-get install subversion) on all the computers you will be using. For this howto I’ll be using the server “closetbox” and the client “icebox”. Both are running Ubuntu Linux.
nick@closetbox:# sudo mkdir /var/svn
nick@closetbox:# sudo svnadmin create /var/svn/frozenindustries
nick@closetbox:# sudo chmod 770 /var/svn/frozenindustries
nick@closetbox:# sudo chown nick:nick /var/svn/frozenindustries
nick@icebox:# svn import -m “look, i’m importing” htdocs/ svn+ssh://closetbox/var/svn/frozenindustries/trunk
nick@icebox:# svn co svn+ssh://closetbox/var/svn/frozenindustries/trunk fi/
nick@icebox:# svn ci fi/
That’s it. Repeat steps 3 and 4 to grab copies of you project and submit changes.
This guide shows how to add a drive to an existing LVM volume.
# dd if=/dev/zero of=/dev/hdd bs=1024k count=1
# pvcreate /dev/hdd
# sudo vgdisplay -A
— Volume group —
VG Name disks
System ID
Format lvm2
Metadata Areas 7
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 7
Act PV 7
VG Size 859.70 GB
PE Size 4.00 MB
Total PE 220084
Alloc PE / Size 220084 / 859.70 GB
Free PE / Size 0 / 0
VG UUID N4TcI6-DIRS-3edy-FAa0-tdUL-MTSX-bs2lJE
# sudo vgextend disks /dev/hdd
# sudo vgdisplay -A
— Volume group —
-snip-
VG Size 1.11 TB
PE Size 4.00 MB
Total PE 291625
Alloc PE / Size 220084 / 859.70 GB
Free PE / Size 71541 / 279.46 GB
# sudo lvextend -l+71541 /dev/disks/backup
Extending logical volume backup to 1.11 TB
Logical volume backup successfully resized
# sudo vgdisplay -A
— Volume group —
-snip-
VG Size 1.11 TB
PE Size 4.00 MB
Total PE 291625
Alloc PE / Size 291625 / 1.11 TB
Free PE / Size 0 / 0
# sudo xfs_growfs /backup
Copyright ©2005-2007 Nicholas Brand. All rights reserved.
powered by WordPress.
24 queries. 0.275 seconds