Wednesday, September 26, 2012

Saturday, May 19, 2012

Linux file sharing for OSX

Do you want to share files from your Linux server to your Mac computers ?
Install netatalk (apt-get netatalk). Edit /etc/default/netatalk and make sure the following are as follows:


Share your directories by editing /etc/netatalk/AppleVolumes.default (one line per share):
~/ "LinuxHome" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,usedots,upriv 

/home/storage "Storage" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,nohex,upriv,usedots,tm

Add the following line to /etc/netatalk/afpd.conf
-setuplog "default log_info /var/log/afpd.log"
-mimicmodel MacPro

To change the icon displayed in Finder, replace the value of mimicmodel with one of the following values: Xserve,PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort. 

You should now have basic file sharing working. Open a Finder window on your Mac and from the menu, choose Go > Connect to server and in the dialog box add afp://mylinuxserver then press + or browse. You should now be able to browse your files. If something goes wrong, like it did on my machine,
cat /var/log/afpd.log 

I had some "connection refused" messages looking like these:

May 19 12:26:27.844314 afpd[1386] {dsi_tcp.c:112} (W:DSI): refused connect from
May 19 12:26:27.844474 afpd[1386] {dsi_getsess.c:60} (E:DSI): dsi_getsess: Connection refused
May 19 12:26:27.844488 afpd[1386] {afp_config.c:226} (E:AFPDaemon): dsi_start: session error: Connection refused

If you have similar messages, edit your hosts.allow :
afpd: ALL

You can also autoconfigure the file sharing service with Zeroconf, or Bonjour, or Avahi. On Debian I'm using the Avahi service. Go to /etc/avahi/services and add a new service file, afpd.service
Add the following to your service file:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">%h Xserve</name>

To change the icon displayed in Finder, replace the value of model= with one of the following values: Xserve,PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort. 

Save and restart the avahi service:
/etc/init.d/avahi-daemon restart

Now you should see TWO servers in the finder network. One is what the Avahi service publishes, the other one is what AFP service is publishing. I guess one doesn't need the Avahi part .. o I moved the afpd.service file to a new directory named "disabled" and restarted the Avahi service. 

If you run iptables, you need the following added to your config:
-A INPUT -p tcp --dport afpovertcp -j ACCEPT

# AppleTalk
-I INPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT
-I OUTPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT

# Bonjour/Zeroconf
-I INPUT -p udp --dport mdns -d -j ACCEPT
-I OUTPUT -p udp --dport mdns -d -j ACCEPT

Happy sharing!

Saturday, March 17, 2012

Yamaha FZ1 Gen II technical - revised Q1 2012

Thanks to all the people who have contributed to this guide, especially Ballmead from for the detailed information about geometry settings.

Check out these pages for guidance:
London Bikers, suspension setup demystified and

Riding style and conditions: 5-15 minutes.  B-roads every weekend, frequent wheelies.Some town riding

5,0L/100KM Highway easy riding
8,6L/100KM Town commuting

Weight savers:
Removing the tools and center stand saves 1,3 Kg. The OEM silencer weighs 7 Kg, and replacing it with a Yoshimura TRC steel sleeve slip-on saves 3,5 kg. Removing the centerstand also makes getting the sidestand out easier. I put my center stand back though, since it makes it easier to clean the chain, it's more stable on grass and gravel, and frankly that kilo doesn't do much for either acceleration or handling.

Suspension adjustment
Rider weight: 110 KG + gear = 123 KG
Worksheet for setting the sag:
Static sag front: 15mm (for the definition of sag, see above links
Static sag rear: 40mm (the spring is too weak for my weight

Suspension adjustment fork:
Preload adjustment:
One+ spring preload indicator decreases fork travel by 8mm. The manual indicates 5,5 "clicks" as standard, 6 is too soft for me, the bike dives too much.
Setup scenario: I want my bike to be a bit stiffer as for inspired backroad driving, somewhat like a sports bike, but not as a bench (read: Ducati)
5 is firm-ish, but it looks like there's too much travel way left, about 50 mm by eye-measure.
With the spring preload at 5, You will feel potholes as with a german car with stiff springs. The fork will be a bit stiffer, the bike doesn't dive as much under braking, and the ride will be comfortable enough. This setup will swallow speed bumps at ~40 km/h without a problem.
You might want to try 4,5 or 4 to harden the preload, and make the bike dive even less.

Aim for between 10 and 20mm sag.

Compression damping: (left fork leg)
Standard is 5 clicks to the left. My setup is 6 clicks to the left. You'll want at least 6 clicks to the left if you're doing wheelies all the time. Landings are pretty hard otherwise.

1 click to the left is megastiff, like a bicycle. Speed bumps will be rock hard at 35 km/h.
26 clicks to the left will feel like you're jumping in bed, a jump, and you go up and down on the springs a couple of times. This will swallow the speed bump softly, but you'll bounce up and around after impact. Terrible sensation.

Rebound damping: (right fork leg)
Standard is 18 clicks to the left out of 28. My setup is 18 clicks to the left.
The standard is good for street riding, I don't feel the need to change it.

Suspension adjustment rear:
Tried 1+ preload, 10+ rebound. Bike spins on full throttle. Rebounds are too hard, you feel shocks in your back , even with smaller obstacles
Current setup: 3+ preload, 8+ rebound - default.

Spring preload:
Standard is 3 clicks, I run with 3 atm. I tried 1 click. Max preload is still too soft
Rebound damping:
Standard is 8, I tried 10, and the rebounds were a bit too hard, I felt the shocks in my back. Slower rebound can adjust chassis pitch, and slow down weight transfer to the front.

Also make sure You read the suspension setup info at the following pages: (for Fireblades)

Geometry adjustment
If You like me find the FZ1 a bit hard to steer into the corners and flick side to side, You will want to try some geometry adjustments before you trade it for a supersport. "Dropping the forks" is something a lot of FZ1 riders do, and is not dangerous in any way. The fork legs are actually raised in the triple clamps, and thus create a steeper steering angle, the bike tilts forward more, thus turning in quicker. The difference is like night and day. The torque for the upper pinch bolts is 26 Nm, and for the lower ones is 23 Nm.
The second thing You can do is change the rear shock to something fit for your weight (if you weigh over 80 kg, and the standard shock isn't good enough) for instance the Nitron NTR Sport , which comes at a reasonable price of around 360 GBP. Make sure you also get it set to a longer length, 325mm eye to eye, compared to the standard 320. This will also aid in turning quicker, further tilting the bike forwards.

Fuel gauge issues
The fuel gauge stays at 100% for over 90 km, then suddenly drops to 50% and then makes another sudden drop to the reserve. This was resolved by changing the fuel pump unit which has the fuel measurement unit incorporated. Now the gauge goes to
-1 dot after ~40 km
-2 dots after ~70 km
UPDATE: My Yamaha shop changed the fuel pump unit, which has the fuel meter incorporated, on the extended warranty. It's all good now!