Archive for the ‘linux’ tag
Linux, Samba spaces in share names
Yesterday i had to reconfigure the samba server at the office. And at the same time change some of the share names we’ve been using. One of the new names contained a space. And while setting this up on all Windows boxes i noticed no problem.
After all was finished i went to edit my fstab file so i get the new shares at boot. And after making changes to fstab i always do a simple test
sudo mount -a
This resulted in a syntax error from the fstab file
[mntent]: line 13 in /etc/fstab is bad
That’s nice. So Linux doesn’t like spaces in the share names. How strange
So i tried a few escaping sequences.
’samba share’
“samba share”
samba\ share
Non of that seemed to work. So after a bit of searching found the solution. You can use an octal number format to express the ASCII symbol. In this case that’s ‘040′. And escape it with a slash.
samba\040share
Subversion cross platform errors
Yesterday my colleague was complaining he couldn’t do a normal check out of one of the projects in Subversion. At first i thought it was just something wrong with his local settings. Because i could do the check out just fine. Today when i was thinking about this problem. I quickly realized we are on two different platforms. He works on Windows while I’m on Linux.
And since i had to do some Photoshop work today. I took the chance to install Subversion on my Windows partition. When i did a checkout of the failing project. I ran into the same problems as my colleague did before. Two different errors were preventing me from making a complete checkout. The first error:
svn: In directory ‘path/to/some/images’
svn: Can’t copy ‘path/to/some/images/image.JPG.svn-base’ to ‘path/to/some/image.JPG.tmp’: No such file or directory
Is caused by multiple files with the same name. At least to windows it looks like this. Because image.jpg and image.JPG are two different files on Linux. On windows however these two files are one and the same. This causes Subversion to choke. After manually deleting all duplicates from the repositorie it self the problem dissapeared.
The second error was something like:
svn: Working copy ‘/some/path/\ ‘ is missing or not locked
This one was actually pretty obvious. A file name with an illigal character. I wonder how it got in the repository. The folder name causeing the problems was a folder called ‘\ ‘. Which was empty. After removing this. I could do a complete checkout again.
Making permanent changes to resolv.conf under Ubuntu.
At work we have a local dev box. This box is running Ubuntu 8.04 and some tools we need for developing. Nothing special. This box get’s it’s IP address from the DHCP server that runs on the router. And this caused some problems because we are running a local DNS server for the dev box. Mainly to use internal domains for testing.
To make this work we changed the resolv.conf to use the new local DNS server. This works fine wouldn’t it be for Ubuntu changing the file back to it’s original settings on every DHCP request. So every 900 sec the file gets overwritten. To solve this the first time i simply made the file read only. This however caused some problems with the DHCP client requesting an IP address over and over again. This caused the load on the dev box to rise….
Further inspection showed that it’s the dhclient-script the overwrites the resolv.conf file. I tried commenting out parts of the dhclient-script. But this just created more problems. So i did a search on the Ubuntu package list. And found a promising program called resolvconf. This program takes over from resolv.conf. And with this program installed it’s possible to make permanent changes without creating any problems.
After installing the package and doing a search for resolvconf. I found a directory in /etc which had a resolv.conf inside. This seemed to be the template used for overwriting the original resolv.conf. After changing this file all problems were resolved.
/etc/resolvconf/run/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
search example.com
domain example.com
nameserver xxx.xxx.x.xx
*Update
After googling some more. I think i found a better way to solve this problem. And probably the only way to solve this. No need to install any extra software. Just edit the dhclient config file.
change the following lines in /etc/dhcp3/dhclient.conf
supersede domain-name “example.com”
prepend domain-name-server xxx.xxx.xxx.1, xxx.xxx.xxx.2
Ubuntu 8.10 NVidia driver trickery
I was up early last Sunday. just couldn’t sleep anymore. So i decided to do a fresh OS install on my main workstation. One or two weeks ago i updated my Ubuntu 8.04 to the latest 8.10 Interpid. This went without real big problems. And the system was running stable. Besides at the office i did some clean installs of Ubuntu 8.10. And there were no real problems to name.
So i thought what the hell. Let’s do a clean install here at home also. I created a backup of my important files. and downloaded the new .iso image (couldn’t find the previous downloaded one). And started of the install. It was nice weather and i thought if i finish this fast. I can go and enjoy a nice Sunday.
The install went without problems. And after rebooting it booted up fine. First thing i did was run an update through synaptic. Installed the new kernel and a whole lot of other packages. Did a reboot. And everything was still fine and dandy. Now it was time to install the Nvidia driver. I used the Restricted Hardware manager in Ubuntu to select the NVidia 177 driver. Which did the job before the install. And rebooted the machine after the install was complete.
When it booted backup. I was surprised to see a tty screen. and not the GDM i expected
. The error message on the screen stated no screens found. So i logged in and checked the xorg.conf file. Which had a pretty default setup. So i thought running nvidia-xconfig would solve the problem. This generated the same xorg.conf. After rebooting a few times and trying to change the xorg.conf file. I was getting a bit frustrated.
In my hurry i by accident removed my backup partition. So i was getting more frustrated every minute. I do have to say i have a dual Head system. With two PCI-e video cards. And for some strange reason nvidia-xconfig didn’t find the correct hardware. And running nvidia-settings from command line is not possible. So i was stuck. Removing the nvidia-glx driver and the rest of the nvidia-177 files. Got me back in X. Running a very low resolution.
Googling revealed i was not the only one with this problem. But there were no real solutions. At least none that worked on my system. So i decided to reinstall Ubuntu 8.04. Updated the whole damn system. Installed the nvidia-glx-new driver. And got everything to work. After this i did a distupdate to 8.10. And everything kept working. This was weird. I was happy the system is up and running again. But i wasn’t satisfied.
I made a backup of my xorg.conf file. And again did a complete new install of Ubuntu 8.10. After the install i updated to the new kernel. And after a reboot installed the nvidia-177 driver. But this time before i rebooted i copied my old xorg.conf file over the one generated by nvidia-xconfig. Rebooted the machine. Everything worked.
Conclusion. nvidia-xconfig doesn’t create a correct xorg.conf file. I got two different errors from the nvidia driver at boot up. One saying “no screens found’ The other one saying “Device is not PCI” or something like that.
I’ll add my xorg.conf file here. Maybe it’s of any use
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@vernadsky) Thu Jun 5 09:26:53 UTC 2008# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type “man xorg.conf” at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorgSection “ServerLayout”
Identifier “Default Layout”
Screen 0 “Screen0″ 0 0
EndSectionSection “Module”
Load “glx”
EndSectionSection “ServerFlags”
Option “Xinerama” “0″
EndSection# commented out by update-manager, HAL is now used
#Section “InputDevice”
# Identifier “Generic Keyboard”
# Driver “kbd”
# Option “XkbRules” “xorg”
# Option “XkbModel” “pc105″
# Option “XkbLayout” “us”
#EndSection# commented out by update-manager, HAL is now used
#Section “InputDevice”
# Identifier “Configured Mouse”
# Driver “mouse”
# Option “CorePointer”
#EndSectionSection “Monitor”
Identifier “Configured Monitor”
EndSectionSection “Monitor”
Identifier “Monitor0″
VendorName “Unknown”
ModelName “Iiyama PL2201W”
HorizSync 30.0 – 80.0
VertRefresh 55.0 – 75.0
EndSectionSection “Device”
Identifier “Configured Video Device”
Driver “nvidia”
Option “NoLogo” “True”
EndSectionSection “Device”
Identifier “Videocard0″
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce 8600 GT”
BusID “PCI:1:0:0″
EndSectionSection “Screen”
Identifier “Default Screen”
Device “Configured Video Device”
Monitor “Configured Monitor”
DefaultDepth 24
EndSectionSection “Screen”
Identifier “Screen0″
Device “Videocard0″
Monitor “Monitor0″
DefaultDepth 24
Option “TwinView” “1″
Option “TwinViewXineramaInfoOrder” “DFP-0″
Option “metamodes” “DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0″
EndSection






