Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Monday, May 25, 2009

Wireless iwl3945 on Debian

I have struggled A LOT lately trying to get my built-in wireless network card on my HP NX7400 to work. I seemed to have tried it all, and I could not understand why it would not work. I was using the iwl3945 driver, I could find the networks, but for some reason I could not retrieve dhcp information, and it seemed to not want to connect properly.

But I managed to get it working, finally. The solution? Easy. For some strange strange reason it will only work when using the new wicd (1.5.9) manager from KDE. If you are using fluxbox, as me, simply start it by running wicd-client in bash, and you will get a neat icon in your system tray.

A tip might be to add it to your fluxbox startup file:
nano ~/.fluxbox/startup
and add the following line:
/usr/bin/wicd-client &

Try it out. Hope it helps.

Thursday, May 21, 2009

UUID, Fstab and Automatically mount USB Drive

Finally found a solution on how to make my Linux (Debian):
A) Remember the unique USB drive(in my case a Western Digital Mirror Edition), and where to mount it
B) Automatically mount it when connected

First you have to identify your usb drive, make sure it is connected and you know the device name, in my case:
NoMore:/home# blkid /dev/sdc1
/dev/sdc1: UUID="6494BFE994BFBC3C" LABEL="My Book" TYPE="ntfs"
NoMore:/home#

As you see my drive has a unique ID. This is what we are gonna use in fstab instead of the device name. Smart huh? :) This way we avoid the problem of changing device names when plugging stuff in and out.

Next in fstab, make a line like this:
UUID=6494BFE994BFBC3C /home/user/DiSK/ ntfs-3g defaults,auto,umask=000,users,rw 0 0
Make the changes you need, but make sure you use your correct UUID(and remove the "") and it is set auto like above.

Next check if it works by typing:
mount -a
The -a parameter means it shall mount everything set to auto in fstab. If it works, umount your drive and let's continue:

Ok, make sure you got udev installed. This is what's gonna automaticly mount our drives when new ones are detected. Make a new file;
NoMore:/home# nano /etc/udev/rules.d/99-mount.rules
And add the following line:
SUBSYSTEM=="block", run+="/bin/mount -a"
Just make sure it uses the correct path to the mount command.
Next restart udev:
NoMore:/home# /etc/init.d/udev restart
Now unmount(umount) your drive, unplug it and try it out.

Wednesday, May 20, 2009

Error mounting NTFS in Linux

I have recently bought a Western Digital (WD) Mirror Edition 2TB, which I run in raid in order to offer me a really good backup solution for all my pictures and hd-videos from my SLR and important documents. The system is delivered with a NTFS system, which I knew obviously might cause some problems with Linux. As predicted, it happened today. I was just going to do a routine dismout (umount) and connect it to another computer when I ran into problems trying to unmount it. So I did a "umount -l" on the drive, which I apparently never should have.

Later when trying to mount the drive again in Linux (Windows always handles this stuff perfect), I got the following errors:

[root@nomore /]# mount -t ntfs-3g /dev/sdb1 /mnt/ntfs
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read of MFT, mft=10 count=1 br=-1: Input/output error
Failed to read vcn 0x4: Input/output error
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.


So as instructed I connected the drive up to my computer running Microsoft Windows thinking the chkdsk /f command would fix it, but without luck. Tried dismounting properly aswell but it still refused to work.

But I found a solution. Go into "My Computer" while the drive is connected, right click on the drive, select "Properties" head to the "Tools" tab and under Error-checking click "Check now". Remember to tick both the options you get, and let it finish. This might take some time. For my 1TB USB drive it took a couple of hours. When finished, dismount the drive properly in Windows. I don't know if it matters, but just to be sure I dismounted it both with the WD tools and the windows plug&play manager.

I also rebooted my laptop running Linux, before I tired reconnecting. This time it worked perfectly again :) Thank god!

12$ NX7400 adapter arrived

These last weeks I have ordered 2 new adapters from Hong Kong for my nx7400 laptops. It's amazingly cheap, and they are working perfectly. Pictures added for proof :) I have also noticed that dealextreme have started selling these chargers as well, who also offers world-wide free shipping. Only con is that the cable is a little short, but that's no big task to fix.


So, all in all, ordering laptop adapters from ebay/dealextreme:
Pros:
+ Incredibly cheap! I only payed 12$ including shipping and handling for mine
+ Works perfectly
Cons:
- A little slow shipping.. 2-3 weeks
- A little short cable

Thursday, May 14, 2009

Easy D90 manual

I have found a really great Nikon D90 users guide which I have to recommend to all you other Nikon D90 users and owners online. It's totally free and even exists in PDF with great explanations and illustrations. The D90 was my very first DSLR camera, and I obviously didn't know quite lot on how to use these cameras before I bought this one. The user manual is located right here, and if you just scroll some lines downwards you will find the link to the guide in PDF format.

Oh, and by the way check out my other post about how to get the cheapest D90 remote available.

Saturday, May 2, 2009

Updating acpid in Debian error

After trying to update debian I get the following errors:


Preparing to replace acpid 1.0.8-6 (using .../acpid_1.0.8-7_i386.deb) ...
* Stopping ACPI services... [ OK ]
invoke-rc.d: initscript acpid, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
* Stopping ACPI services... [ OK ]
invoke-rc.d: initscript acpid, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/acpid_1.0.8-7_i386.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
* Starting ACPI services... [ OK ]
invoke-rc.d: initscript acpid, action "start" failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/acpid_1.0.8-7_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: error processing acpid (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.


The solution was simple though:
su
mv /etc/lsb-base-logging.sh /etc/lsb-base-logging.sh.backup


Then try again :)
apt-get upgrade