Tuesday, 26 February 2013

Extending the swap memory in Linux .

How to Add a Swap File – Linux

How do I add a swap file to Linux system using command line options?

In Linux, as in most other Unix-like operating systems, it is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions, although I recommends using a swap partition. The administrative flexibility of swap files outweighs that of partitions; since modern high capacity hard drives can remap physical sectors, no partition is guaranteed to be contiguous. You can add swap file as a dedicated partition or use following instructions to create a swap file.

Procedure To Add a Swap File Under Linux

You need to use the dd command to create swap file. The mkswap command is used to set up a Linux swap area on a device or in a file.

Step #1: Login as the Root User

Open a terminal window (select Applications > Accessories > Terminal) or login to remote server using the ssh client. Switch to the root user by typing su - and entering the root password, when prompted

Step #2: Create Storage File

Type the following command to create 512MB swap file (1024 * 512MB = 524288 block size):
# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
Where,
  1. if=/dev/zero : Read from /dev/zero file. /dev/zero is a special file in that provides as many null characters to build storage file called /swapfile1.
  2. of=/swapfile1 : Read from /dev/zero write stoage file to /swapfile1.
  3. bs=1024 : Read and write 1024 BYTES bytes at a time.
  4. count=524288 : Copy only 523288 BLOCKS input blocks.

Step #3: Set Up a Linux Swap Area

Type the following command to set up a Linux swap area in a file:
# mkswap /swapfile1
Setup correct file permission for security reasons, enter:
# chown root:root /swapfile1
# chmod 0600 /swapfile1

A world-readable swap file is a huge local vulnerability. The above command make sure only root user can read/write to the file. Finally, activate /swapfile1 swap space immediately, enter:
# swapon /swapfile1
To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file. Open this file using a text editor such as vi:
# vi /etc/fstab
Append the following line:
/swapfile1 swap swap defaults 0 0
Save and close the file. Next time Linux comes up after reboot, it enables the new swap file for you automatically.

How do I Verify Swap is Activated or Not?

Simply use the free command:
$ free -m


Reference:
http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ 

Monday, 11 February 2013

How to modify the boot option in grub menu

In Condition of having dual boot option in the system/laptop we have mess in selecting it every time.
Here are simple steps to modify it.

Steps:
1) Login to the Linux flavor you have.
2) Navigate to the path /boot/grub
3) you will find the menu.lst file, open it in any text editor for your comfort.

  The booting option will take decision based on the number in the default = "";
  if its 0 the bootloader will boot the first OS you have  i.e Example: centos
 So if you have 3 OS installed in your system you can use the following numbers in     default options.

Eamples:
 default = 0  <= to boot the first OS shown in list.
 default = 1  <= to boot the second  OS shown in list.
 default = 2  <= to boot the third  OS shown in list.

4) Modify the option you need and save it.
5) Now reboot the machine now you will find the OS that you need to boot in as default.

Monday, 4 February 2013

Ksplice is an open source extension of the Linux kernel

 Ksplice
 
Ksplice is an open source extension of the Linux kernel which
allows system administrators to apply security patches to a running
kernel without having to reboot the operating system (Dynamic Software
Updating).
Ksplice has been implemented for Linux on the x86-32 and x86-64
architectures. It was developed by Ksplice, Inc. until 21 July 2011, when
Oracle acquired Ksplice and started offering support for Oracle Linux.
Support for Red Hat Enterprise Linux was dropped and turned into a free
30-day trial for RHEL customers as an incentive to migrate to Oracle Linux
Premier Support Additionally, anyone can use Ksplice Uptrack for free on
Ubuntu Desktop and Fedora.
 
features:
 
   - Easy to set up
   - Ksplice Uptrack works perfectly in virtualized environments or on bare
   metal.
   - Rollback capability
   - No performance impact
   - Ksplice Uptrack supports using a standard HTTP proxy to pass through
   your firewall.
   - Conveniently check whether all of your systems are up to date, in one
   place, in your web browser.
   - Secure infrastructure
   - email announcement whenever new updates are available for one of your
   systems.
   - API and monitoring
   - Set access policies for individual or groups of machines.
 
Home page: http://www.ksplice.com/
for Binary package and other details:http://pkgs.org/search/?keyword=ksplice
 
 
Thanks to dhanasekar @ kaniyam. 

Saturday, 2 February 2013

Online Electronics Virtual labs

In our colleges day we will do our labs as just the part of study. but if you are really interested in doing the circuits and getting the circuits stuffs, Dociruits.com provides good place to learn.

Go Here DoCircuits

Reference : http://www.docircuits.com/

Fix your Solder Iron

Fix Solder Iron by your self.
 If the ordinary solder that's of simple structure fails you can fix it .

If you open up the solder iron you will find the 3 Pins Or 2 Pins in it. One will be with diode connected in reverse current direction and second with just the wire winded in it. so if the solder fails then try replacing diode(1n4007).

Open Source Stuffs in Tamil

Are you interested in the getting the open source and Linux stuffs in the Tamil.
Then here is a sample help to you.

Kaniyam a association doing there best in giving the open source and Linux stuffs in Tamil Language.

Here is Link for you geek => Kaniyum

Friday, 1 February 2013

Solarify your home

Are you interested in solar power.
Need help in calculating the power consumption, here is a good solution site done by Sudarsun.
Solar sizing calculator.