Linux

Tips for Linux Users

Quick references to some frequently used Linux commands...

This list has been compiled over time as reference to some of the frequently used linux commands that I use. I hope it will help some new-comers ;)

Upgrading from Fedora Core 3 to Fedora Core 4 -- quick upgrade using ISOs from HDD

The easiest and fastest way to upgrade FC3 to FC4 is to do it using the ISOs from the hard drive.

In my case I am using the nvidia driver (see related post...), the IPW2200 kernel module driver for wireless and the firmware for the corresponding IPW2200 driver. (See related post...). So prior to the upgrade make sure to download all of the required drivers.

Below is a quick outline of the upgrade using ISOs from the hard-drive itself without having to burn it into cds or dvds:

FREE Ubuntu Linux CDs shipped to your door !!

If you have had a hard time downloading linux distros due to slow internet connection. Here is an alternative in trying out a Linux distro. The Ubuntu team will send you CDs at no charge, for you to install and share. They cover the cost of shipping the CDs to you as well.

Get it here: shipit.ubuntulinux.org
Get the FAQs here: Ubuntu CDs FAQs

The MoviX Project

eMoviX - a micro (7MB) Linux distro meant to be embedded in a CD together with all video/audio files. A CD burned with eMoviX will be able to boot and play automagically all of its files with MPlayer. Supported formats are AVI (in particular DivX & XviD formats), MPEG, QuickTime, WMV, ASF, MP3, Ogg, and in general everything supported by MPlayer.

BitTorrent downloads on headless machines via CLI

  1. Download and install BitTorrent.
  2. The current version 4.0.2 of BitTorrent requires that you use python2.3 or above else you will not be able to import the modules.

    I got fedora core 1 rpms from python.org and installed via `rpm -ivh python2.3-2.3.4-3pydotorg.i386.rpm`. That way I still kept 2.2 as other application depend on it.

  3. You can now run "btdownloadheadless.py":
    $ python2.3 /usr/bin/btdownloadheadless.py download.torrent --save_in /path/to/directory
    

    You could also use "/usr/bin/btdownloadcurses.py" instead.

  4. For other options:
    $ python2.3 /usr/bin/btdownloadheadless.py -h
    

Network File System - server and client setup on Fedora

  • NFS Server:

    1. You will need "nfs-utils" so `up2date --install nfs-utils` if you don't already have it.
    2. Start "portmapper" first - `service portmap start`.
    3. Setup the exports file with the directory, hosts and permissions for sharing.

      To export the external usb storage drive to everyone on the local subnet, I have the following:

      /mnt/usbdisk 192.168.0.0/255.255.255.0(rw)
      

      This entry allows every machine from the subnet 192.168.0.0 to access the NFS share over the network. After having edited the "/etc/exports" file all you have to do is start the NFS server - `service nfs start` .

      Note: If you are concerned about security edit "/etc/hosts.allow" and "/etc/hosts.deny" to specify which computers on the network can use services on your machine.

    4. Check the status with - `rpcinfo -p` .
  • NFS Client:

    1. Check that the nfs module is loaded first - `grep nfs /proc/filesystems` .
    2. If nothing comes up then load the module with - `modprobe nfs` .
    3. Start "portmapper" - `service portmap start` .
    4. Mount the network file system with - `mount -t nfs nfs_server:/mnt/usbdisk /mnt/nfs_usbdisk` .
    5. If may take a while. Verify with `mount` after .

References:

Fried your Master Boot Record?

No worries! You are using GRUB (GRand Unified Bootloader) aren't you?

You should atleast know where your "/boot" partition is installed.

  1. Here is my drive setup and "/boot" is setup in "hda3".
    # df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
                           18G  4.3G   13G  26% /
    /dev/hda3              99M   19M   76M  20% /boot
    none                  506M     0  506M   0% /dev/shm
    
    # fdisk -l
    
    Disk /dev/hda: 60.0 GB, 60011642880 bytes
    255 heads, 63 sectors/track, 7296 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    

Cloning Production Server for Testing using DAR

DAR (Disk ARchive) is a command-line backup tool, that uses compression, makes differential or full backups, which can be split over several files or disks. Dar saves all *NIX inode types, hard links, as well as Extended Attributes. And many other features...

Below are the steps on what was done to get a full archive of an external production server and restore it to a local test machine. The process can also be used for recovering from hard-disk failures.

  1. Installation:

Notes on VNC server and client setup...

VNC server setup:

  1. Install the vncserver if not installed already on the server-side.
    # up2date -i vncserver
    
  2. Set a password for the VNC server. To do this, log in as a normal user and run the command `vncpasswd` from a shell prompt.
    # su - <user1>
    $ vncpasswd
    
    Note: The VNC service will not start unless you have set a password.
  3. Edit the "/etc/sysconfig/vncservers" file as below replacing the user values with the actual usernames.
    VNCSERVERS="1:<user1> 2:<user2>"
    

Linux Newbie Administrator Guide

Linux Newbie Administrator Guide is a complete reference for new Linux users who wish to set up and administer their own Linux home computer, workstation and/or their home or small office network. It is meant to be simple, with just sufficient detail, and always supported with a readily usable example. The topic ranges from Linux installation to some more advanced and useful commands/tools.

Comment