Monday, February 27, 2012

Debian: smart ndiswrapper install and configure how-to

Now we look to install and configure ndiswrapper for our debian...

apt-cache search ndiswrapper
if no results... add a good repository location into your sources.list
In my case I add this line into /etc/apt/sources.list
deb http://www.edmondweblog.com/repo/binary/ stable main
after I run: apt-get update
and now when I search for ndiswrapper I found it.....

So I need to install three things:
- ndiswrapper-utils-1.9
- wireless-tools
- linux-headers-2.6.32-5-686 (this only for my case.... you have to install the appropriate for your version...)

And you obtain it giving those commands...:
apt-get install wireless-tools
aptitude install ndiswrapper-utils-1.9
(this last command will download and install for you the correct version, for your operative system version, of  linux-headers[....])

Then I run 
echo ndiswrapper >> /etc/modules
to add ndiswrapper module to system startup modules list loading


now I give ndiswrapper -l 
to list ndiswrapper modules charged....
for now list is empty.... Only when I correctly configured the module I found something as result of this command....

ndiswrapper -i Desktop/WLAN/NETw3.inf
to install the driver 
then if I give  
ndiswrapper -l 
and my result is something like this:
netr28 : driver installed
I sounds like the driver is installed but the device is not present....(probably you have not the right driver...)
Give this to unistall:
ndiswrapper -e netr28
...where netr28 is the name of the driver(different for you.....)

If the result is something like this:
netr28 : driver installed
device (1814:0781) present (alternate driver: rt2860sta)

You have correctly done the driver installation....
Now configure it with:
modprobe ndiswrapper

Give iwlist command to verify if all is done.....

PROBLEM:
in my case the command
modprobe ndiswrapper
give tis result:
FATAL: Module ndiswrapper not found.
It means that probably you have to recompile the ndiswrapper package....
The package you have is not correctly for you linux-headers......
So:
apt-get install ndiswrapper-source
this command install for you also module-assistant package....
then run:
m-a a-i ndiswrapper
at the end of process the correct version of ndiswrapper is ready for you....

ANOTHER PROBLEM:
In my case I need to force to not load, at boot, the pre-ndiswrapper wifi module.... loaded as default....
So I need to edit blacklist.conf giving.... 
vim /etc/modprobe.d/blacklist.conf
I add this row at the and of the file:
blacklist rt2860sta
Where rt2860sta were the wifi module loaded.... I found it by giving

lsmod

Restart the system and all is done!!!! 

Ps.: for troubleshootings I found this page

Bye.....

Thursday, February 16, 2012

Debian: create bootable usb drive with an operative system iso image file

Unetbootin is a great tool to "install" a operative system starting from an iso image file.
As root install it:

apt-get install unetbootin

now type unetbootin command to start the tool.
Simply select the iso image file, select the drive and go!!!


Bye...

Friday, February 10, 2012

Bind or unbind html form to enter key pression

You should need to force the enter key pression, on a html form, to a javascript function(instead of the tag attribute action content).

$(document).ready(function(){
    $("#recoverUsernameFormId").bind("keypress", function(e) {
        if (e.keyCode == 13) {
            callYourFuncion();
            return false;
        }

    });
});


At the same way, you should need to unbind the enter key pression to the html form.


$(document).ready(function(){
    $("#recoverUsernameFormId").bind("keypress", function(e) {
        if (e.keyCode == 13) {
            return false;
        }

    });
}); 


Bye...

Thursday, February 2, 2012

Linux: mounting an iso image - at booting...

Differently to the previous post,
now we proceed to setup the system to auto mount an iso image at the system booting....
Suppose you have an iso image file:

/home/user/your_cd_or_dvd_backup.iso

Create a directory:

mkdir /home/user/your_backup

Open the file /etc/fstab and add the current row:


/home/user/your_cd_or_dvd_backup.iso  /home/user/your_backup udf,iso9660 loop 00
 
This row provides to auto-mount the iso file every time you restart the system.

Bye.

Linux: mounting an iso image - one shot....

Suppose you have an iso file:

/home/user/your_cd_or_dvd_backup.iso

Create a directory:

mkdir /home/user/your_backup

and as root execute the following command to mount it:

mount -o loop /home/user/your_cd_or_dvd_backup.iso /home/user/your_backup


Bye