Friday, February 4, 2011

Mount NTFS partition in Linux

Mount NTFS partition in Redhat Enterpris Linux / Ubuntu Linux


Enterprise Linux distributions like Redhat Enterprise Linux ( RHEL ) does not provide native support to Windows NTFS partitions. However you may wand to mount a NTFS formated partiiton in your RHEL box. Here is a simple howto to mount NTFS partitions in your RHEL box.

First of all you need to install a couple of packages. You can use YUM for installing the packages. The rpmforge yum repo contains required rpm packages for mounting NTFS partitions on Linux server. The packages are fuse and fuse-ntfs-3g.

              # yum install fuse fuse-ntfs-3g
Yes, you are done now you can mount ntfs partitions on your rhel server using the mount commandas follows.

             # mount -t ntfs-3g /dev/device-name /mount-point

For example:
           # mount -t ntfs-3g /dev/sdb1 /media

This one also works!!!!!

          # mount.ntfs-3g /dev/sdb1 /media
Newer Ubuntu distributions like Ubuntu 10.04 LTS natively supports NTFS partiitons, so in a Ubuntu server you can mount NTFS partition by just using the above mount commnad.



Saturday, December 4, 2010

Install linux in a pendrive.

Install Linux in pen drive
Yea guys, this time I will show you how to install a Linux distribution in your pen drive. You can use this how-to install almost all the Linux distributions including Ubuntu, fedora, CentOS, Debian, KNOPPIX and much more.


What you need:
  • Universal USB Installer tool.
  • Windows XP/Vista/7 to create the USB (Win 98/2K WILL NOT Work! 
  • Fat32 Formatted Flash Drive, 
  • Your Favourite Linux ISO
And of course a PC supporting USB booting to boot from your pen drive.

You can download the Universal USB Installer tool from this link:
 
The Universal USB Installer is a Live Linux USB creator which allows you to choose from a list of Linux distributions and install it in your pen drive. It also allows you to download the required Linux distribution.
The process is just a piece of cake, just run the tool, select your distribution, browse to the distribution, select the flash drive and click install.

Thursday, November 11, 2010

How to reset root password in Ubuntu 10.04 LTS


In this how to we shall discuss how to reset root password in Ubuntu 10.04 LTS. I guess this howto will be of highly useful if you forgot your root password in Linux servers particularly in debian based systems like Ubuntu.

Single User Mode in Ubuntu 
To reset the root password you have to boot to single user mode. Follow to steps below to boot to the single user mode in Ubuntu 10.04 LTS.

Please note that Ubuntu 10.04 LTS use the GRUB 2 as bootloader. The first boot option will be used by GRUB 2 by default and it will be used for booting without waiting for user input. So you need to interrupt the boot process for getting boot menu.

Thursday, October 7, 2010

Set date and time in Ubuntu LTS 10.04

How to set Date and Time in Ubuntu 10.04 LTS Lucid Lynx via command line.

You can use the “date’ command for setting Date in any ubuntu bases distributions.

It is better to take a peek into the man pages of the ‘data’ command via:

                  # man date

The man page of date command in Ubuntu might be a bit confusing for all. Let me explain the process to you!!!

Type in the following command, replacing:

                  nn with two digit month (e.g. 01, 05, 12),
                  dd with two digit day (e.g. 02, 24, 31),
                  hh with two digit hour in 24 hour clock format ( 00, 03, 23), 
                  yy/yyyy with the year in two digit or four digit (optional),
and after a period symbol (.) ss with two digit second (00, 05, 59).

The syntax of the date command is:
            # date nnddhhmmyyyy.ss
or
            # date nnddhhmmyy.ss :- in two digit year format
or      
            # date nnddhhmm :- With minimum required parameters (without year and second)
or         
            # date nnddhhmm.ss :- Without year

Month from 01 to 12 (nn)
Day from 01 to 30/31 (dd)

Hour from 00 to 23 (hh)
Minute from 00 to 59 (mm)
Year in four or two digit format (yy yyyy)
Seconds after the period (.) symbol from 00 to 59 (ss)


Example for specifying 21st september, 2010 6:54:20 PM, you should type in the command

             # date 092118542010.20

To specify set NTP server for automatic time synchronyzation:

            # sudo ntpdate NTP-SERVER_URL_OR_IP

I guess I made it faily simple for updating date and time in Ubuntu Server / Desktop LTS 10.04. Also you can try this command in any of the linux based distributions such as RedHat Enterprise Linux, SUSE Enterprise Linux, Fedora etc.
     

Monday, September 20, 2010

Setting up DNS in Ubuntu 10.04 LTS Lucid Lynx

The DNS setup is also a starignt forward job in Ubuntu 10.04 LTS. Like all other major distributions like Redhat Enterprise Linux, Ubuntu distributions also use the /etc/resolv.conf file for DNS resolving.


To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.

Open the /etc/resolv.conf file in your favoirite editor and specify the DNS server in it.

               # sudo vi /etc/resolv.conf
              
              search example.com
              nameserver 192.168.10.1

Here 192.168.10.1 is my DNS server in my example.com domain. Now if your server does not have the file resolv.conf in your /etc directory, dont worry you can simply create it and edit it as above.

       # touch /etc/resolv.conf

Similarly you can assign static lookups in your /etc/hosts file.

             # sudo vi /etc/hosts


             #
 
             192.168.10.100 test test.example.com

If you specify these host explicitely in the /etc/hosts file then the domain name rsolution will takes place fastly.

Setting hostname in Ubuntu 10.04 LTS

In my last post i have described how to configure network in Ubuntu 10.04 LTS in bare metal form. Now we will check how to configure hostname in Ubuntu based distributions. First of all let me asure that the process of seting up hostname is very straight forward in Ubuntu 10.04 LTS.


You can directly query or set the hostname with the "hostname" command.

The current hostname can be viewed using:

             # sudo /bin/hostname

To set hostname you can use the command:

                     # sudo /bin/hostname demo.demoserver.in

NOTE: Need not to say that you should change the hostname from demo.demoserver.in to your requirements.

While rebooting Ubuntu based distributions will read the hostname from /etc/hostname file.

So you can open the file /etc/hostname in your favourite editor and specify the hostname there to make the change persistant.

                # sudo vi /etc/hostname


             # specify your hostname here.
             demo.demoserver.in

Network Interface Configuration in Ubuntu 10.04 LTS Lucid Lynx

Normally all the users will create and configure their network while installing the Operating System Itself. However here I am post the process of configuring the network using command line in Ubuntu 10.04 LTS Lucid Lynx. You can also configure network using GUI utilities in Ubuntu 10.04 LTS such as network-admin or else your famous ifcfg command etc.


Here I am following the bare metal method and will edit the main network configuration files for providing the network information. The main network configuration file of any Ubuntu based distribution is the "/etc/network/interfaces" file. Just open the file in your favourite editor and start configuring it as follows.