How to mount a windows partition on Linux automatically on each start up

In Ubuntu (and other LiUbuntunux OS) , the external drives are mounted automatically but the Windows drives (NTFS partitions) are required to be mounted manually in each login. Though this mounting is just a click away, in some situation one requires the other partitions to be mounted automatically in each start up. In this tutorial I’ll try to explain the procedure to mount a Windows partition automatically on each start up. Again, the tutorial is performed on Ubuntu but most of the commands are applicable to other major Linux OS. Please follow these steps:

Step 1.

Check what is the name of the drive/partition you want to automatically mount. The name is like /dev/sda. Check the partition with NTFS format. Check the size and otherthing to select the partition you want to mount. Go to the terminal (Ctrl+Alt+T) and enter this command:

sudo fdisk -l

For me the command output looks like this:

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
/dev/sda2 13 13417 107667456 7 HPFS/NTFS
/dev/sda3 13418 38914 204798797 f W95 Ext’d (LBA)
/dev/sda5 13418 26165 102398278+ 7 HPFS/NT

Step 2.

Now we need the UUID of the desired drive/partition. The UUID can be obtained by using the following command:

sudo blkid

The command output looks like this:

/dev/sda1: LABEL=”System Reserved” UUID=”E400CABD00CA95C8″ TYPE=”ntfs”
/dev/sda2: UUID=”E61CD55A1CD525F9″ TYPE=”ntfs”
/dev/sda5: UUID=”01CB76F7C2628FB0″ TYPE=”ntfs”
/dev/sda6: UUID=”01CB76F7F289ADE0″ TYPE=”ntfs”
/dev/sda7: UUID=”b9a176e1-d122-4ea7-815b-555063d

Step 3.

Now make a directory in Ubuntu where you want to mount the drive. Lets say you want to mount the Windows drive in root folder. We will create a directory name mount and under that a directory say WindowsDrive. For this use the command:

mkdir /mount/WindowsDrive

Step 4.

The mount information can then be added to fstab file which stores the information about the storage devices. In the terminal enter:

gksu gedit /etc/fstab

The command will open the fstab file. In here, at the end of the file add this line like this:

UUID=insert_the_UUID_here /mount/WindowsDrive ntfs defaults 0 0

Note: Replace the insert_the_UUID_here with UUID you noted from the blkid command. Save and exit. Now, in terminal enter:

sudo mount -a

Troubleshoot:

The following errors may be generated:

1.

“The file system wasn’t safely closed on Windows. Fixing.
fuse: failed to access mountpoint /mnt/win7: No such file or directory”

2.

“Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel’, but failed: Failed to create file ‘/root/.local/share/recently-used.xbel.CNQ0UV': No such file or directory”

The reason (in both cases) is that it is looking for the directory specified in the fstab file and cannot find it. Check the path and verify that the directory exists at the specified path. If the directory /root/.local/share doesn’t exist, make it manually.

Hope this article helped you. Suggestions, feedbacks and tiny thanks is always welcomed. Enjoy :)

How to know if I’m running 32 bit or 64 bit Ubuntu?

There are several ways to know the architecture of the Ubuntu you are using. I prefer “uname” command to find it out.

Type in the terminal: uname -a

Output: Linux desktop-name 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Conclusion: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.

Extra: To know the processor: “uname -p”

To know the hardware platform: “uname -i”

To know machine hardware name: “uname -m”

In all the above cases: x86_64 (or i686) denotes 64 bit and x86 (or i386) represents 32 bit.

How to know which network adapter I’m using?

To know the manufacturer of the network adapter of your computer in Linux, type this command in terminal:

sudo lshw -C network

The output of the command may look something like this:

       *-network               
       description: Wireless interface
       product: BCM4313 802.11b/g/n Wireless LAN Controller
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 01
       serial: 70:f1:a1:c2:f2:e9
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=brcm80211 driverversion=2.6.38-8-generic firmware=N/A ip=172.17.4.253 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 memory:f0500000-f0503fff
  *-network
       description: Ethernet interface
       product: AR8152 v1.1 Fast Ethernet
       vendor: Atheros Communications
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: c1
       serial: b8:ac:6f:67:11:46
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI firmware=N/A latency=0 link=no multicast=yes port=twisted pair
       resources: irq:43 memory:f0400000-f043ffff ioport:2000(size=128)

Check the output closely. It gives information about both Wired and Wireless Network Adapter. No need to specify that one with Wireless Interface describes wireless adapter and one with Ethernet Interface describes Wired Network Adapter. As you can see in the output, I have Broadcom’s wireless adapter and Atheros Ethernet (wired) adapter.

Questions, suggestions and feedbacks are welcomed. If you liked the post then please acknowledge it by liking/voting/commenting on the post. Enjoy :)

How to solve: No wireless networks in Ubuntu 12.04, 11.10 and 11.04

Problem:

Recently I installed Ubuntu 11.04 (wireless was working while installing) on my Dell Inspiron N4010 which uses Broadcom Wireless Adapter (How to know which network adapter you are using?). Wireless networks were even available when I used it for the first time after installing. Then there were message from Ubuntu that restricted drivers are available for Broadcom STA (BCM4311) (why did it ask me to download the wireless drivers when wireless was working on the first hand..??). Any ways, I said, why not? I clicked on the activate button. It installed the driver and asked me to restart the computer. I restarted it and there you go. Wireless is on. But it detects no networks. I know there are wireless networks but Ubuntu is not detecting any wireless networks.

Reason:

The reason what I think is some compatibility issues (it’s probably a bug in 11.04) with this version of Ubuntu and the restricted driver because same driver was working quite well in previous versions of Ubuntu.

Solution:

Here is what you need to do. Use other Broadcom drivers. Download these drivers (from Windows or through wired network or a friend’s computer or from wherever you are reading this article :) ).

For 32 bit: http://ie.archive.ubuntu.com/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_5.+bdcom-0ubuntu5_i386.deb

For 64 bit: http://ie.archive.ubuntu.com/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_5.+bdcom-0ubuntu5_amd64.deb

(Don’t know which Ubuntu you are using? Click here: Check you Ubuntu architecture)

Now remove the previous drivers in Ubuntu 11.04 by using: sudo apt-get remove bcmwl-kernel-source

Now install the appropriate driver (you have downloaded from the above links). Restart your computer. If restarting doesn’t work try shut down and then start it (strange…but works). Enjoy :)

Alternate Solution 1:

If you could connect through a wired network, this solution might work for you. (If not then check here). The problem is with STA drivers so better to deactivate/uninstall it.

Alternate Solution 2:

People who cannot solve the problem with the above specified method may want to try this one. Here you go:

  • open the ‘Synaptic Package Manager‘ (if you are using Ubuntu 11.10 then install it first from the software cemter) and search for ‘bcm’
  • uninstall the ‘bcm-kernel-source‘ package
  • make sure that the ‘firmware-b43-installer‘ and the ‘b43-fwcutter‘ packages are installed
  • type into terminal:

    cat /etc/modprobe.d/* | egrep '8180|acx|at76|ath|b43|bcm|CX|eth|ipw|irmware|isl|lbtf|orinoco|ndiswrapper|NPE|p54|prism|rtl|rt2|rt3|rt6|rt7|witch|wl' 

    (you may want to copy this till the end if it is not visible properly) and see if the term ‘blacklist bcm43xx‘ is there

  • if it is, then type cd /etc/modprobe.d/ and then sudo gedit blacklist.conf put a # in front of the line: blacklist bcm43xx then save the file (I was getting error messages in the terminal about not being able to save, but it actually did save properly).
  • reboot
Hopefully this works for you all!
Questions, suggestions and feedbacks are welcomed. A word of thanks is always appreciated. And if you like the article and the blog then please subscribe to stay in touch.

Sources: ubuntuforums, askubuntu

How to install Windows application (.exe) on Linux / Ubuntu with Wine

As a new Linux user I always miss Windows for some of the applications that are not available on Linux. Booting the computer to go back to Windows just to use some specific software is a real pain. And that made me think how to install Windows programs i.e. .exe files in Linux? This task can be accomplished by the use of Wine application on Linux OS. To use this application you don’t have to be a member of a real wine club 😛

Jokes apart, Wine offers a compatibility layer that allows Linux users to run Windows application on Linux based OS.This tutorial describes the necessary steps to install a Windows application on Linux. The tutorial is based on Ubuntu but similar steps can be followed for other Linux OS as well.

  1. Install Wine application on Ubuntu. You can use Synaptic Package Manager or use this command: sudo apt-get install wine
  2. In this tutorial I am trying to install Rynga, a VoIP application. Download the .exe file of the application. Right click on it and choose properties. In the properties dialogue box go to the Permissions tab. In here check the  Allow executing the file as program box.
  3. Now go to the open with tab and select Wine Windows program loader. Close it.
  4. Now double click the .exe file and follow the usual Next-Next step as in Windows.

I wish this tutorial helped you to install Windows programs in Linux. Questions and suggestions are welcome.

P.S. Compatibility issues may be there with some applications.

How to run or install .bin files in Ubuntu (Unix)

Being a beginner with Unix OS is a painful but interesting experience. I guess I learn almost everyday few things which might be very basic but definitely challenging for a newbie like me. Few days back I wanted to install Adobe Reader on my Ubuntu 10.10. Most of the ready to install packages for Ubntu are in .deb format which can be installed like an executable file in Windows. But this package was in .deb format. Interesting! I thought. This one is not click and install package but it requires no extra terrestrial effort for sure. Following steps should be taken:

  • Open the terminal and go in the directory where the /deb package is saved
  • Change the access rights / permission for the .deb file/package. Most easy way is to give all rights (read, write and execute) to all users by following command: chmod a+x name_of_file.bin
  • Now run the file with the following command: sudo ./name_of_file.bin

How to install and run Nessus on Ubuntu, Linux or other Unix like OS

installation on UbuntuNessus is a great network security tool but installing it correctly can be a real pain some time even for advance user. I faced few problems and that is why I noted down all the necessary and sufficient steps. The steps below are explained for Ubuntu but I think similar steps can be used for other Unix like OS.

Step1: Download the ubuntu package from the website:http://tenable.com/products/nessus/nessus-download-agreement
and Run it.
Step2: To start nessus, type this command in super user mode: sudo /etc/init.d/nessusd start
Output of this command will result in:

$Starting Nessus : .
takshak@takshak-NB:~$ Missing plugins. Attempting a plugin update…
Your installation is missing plugins. Please register and try again.
To register, please visit http://www.nessus.org/register

Step3. Go on the given link and resgister on the home version, check ur mail get the license and use the command specified in ur mail as super user. It will register the Nessus and will also downlaod the missing plugins.

Step4. Run the nessus by using command: sudo /etc/init.d/nessusd start
Running Nessus command nasl gives an error “nasl : command not found”

(i) Try this command: whereis nessus
output will look something like: nessus: /opt/nessus/bin/nessus

(ii) Check the path see if the mentioned directory is added in the path or not by using command: echo $PATH
If the output of the command is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
then the command is not added to the path

(iii) Add the dirctory to the path by using the command: export PATH=$PATH:/opt/nessus/bin

Step5: Then start nessus by using command: sudo /etc/init.d/nessusd start

Step6: To run a nasl file use: nasl -t target_ip filename.nasl