Month: November 2009

How To Take The Backup Of MBR(Master Boot Recorder)

1.How to take the backup and restore MBR? Why do you require to take the backup of your MBR? Ans : MBR (Master Boot Recorder) is a vital part of your hard disk which contains booting information, without it it’s difficult to boot the system. Suppose you have windows and Linux duel boot on your machine and as you know windows is more prone to virus attacks. So it’s always better to backup your MBR to be in safe place. 2. How to take backup of your MBR? Ans : Using dd command (dataset definition). Here are the steps to take backup of you MBR and keep it in safe place to restore your system if it get corrupted. #dd if=/dev/hdx of=/safe/location bs=512 count=1 Let me explain the above command how it will work. “If” in the command is nothing but to specify Input File, here we are specifying our input file as hard disk(if the hard disk is /dev/hda it is primary master, so for general purpose I given ‘x’). “of” in the command is nothing but to specify Output File, here we are specifying our output file as /safe/location. Then “bs” this is nothing but block size to write in to hard disk. And then “count” nothing but how many times you want to write date this many block sizes. Here in this example count=1 that means...

Read More

Linux Ext2 VS Ext3 File Systems in Linux

The differences between Ext2 and Ext3 file systems are as follows. Sl.No EXT2 EXT3 Journaling No journaling Has journaling Speed of file system(read-write) Bit faster Bit slower then ext2 file-system Data corruption File system may be corrupted due to unplanned reboots Prevents file-system corruption Way to recover data Require fsck to recover data after unplanned reboot Does not require(automatic file recovery is done at booting time) Online file system growth. By default there is no Online file system growth. Online file system growth Commands to format mkfs.ext2 or mke2fs mkfs.ext3 or mke2fs -j Max file size(if block size is...

Read More

Linux Virtual File System

Can we create a file system (i.e. formatting a drive/partition) with in a file system?Looks little bit strange is int it? So follow me I will show you how to create a virtual partition and file system within a partition. Step1 : Create a empty file with /dev/zero with size equal to 50Mb.#dd if=/dev/zero of=/temp/vf0 count=102400Note : 1. By default “dd” command(dataset definition) uses block of 512bytes so the size will be 102400*512=52 428 800=~50MB2. /dev/zero is a device files which will be used create a file which conations “0” i.e. an empty file.Clipped output:[root@test6 ~]# dd if=/dev/zero of=/temp/vf0 count=102400102400+0 records in102400+0 records out[root@test ~]# ls -lh /temp/vf0-rw-r–r– 1 root root 50M Nov 7 12:08 /temp/vf0Step2 : Create ext3 file system for this virtual partition.#mkfs -t ext3 /temp/vf0Here it will ask “do you want to format the file or not”?, just say yes. Step3 : Now we have to create a mount point (nothing but a directory) and mount the created partition.# mkdir /virtdrive# mount -o loop=/dev/loop0 /temp/vf0 /virtdriveNote:/dev/loop is special hardware device used to mount ISO files and virtual file systems. In Linux there are total 8 loop devices numbering from 0 to 7. So you can mount only 8 ISO files/virtual file systems by default. Step4 : Edit /etc/fstab file to mount permanently, so that it be auto mounted at boot time too. Specify following entry in...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.