Monthly Archives: November 2016

How can we make our android mobile cctv camera without costing

hii friends . In this tutorial , i will tell you  how  we cam make our android mobile CCTV camera without external costing . Its a very simple trick   all  we need is one laptop or computer and  android mobile hots pot connectivity. Continue reading

Advertisements

How to create partition in linux redhat

Hello Guys In this tutorial we are going to learn how to create partition in Redhat linux Server. we can use partition create commands on all type of Linux operating system. in this tutorial i have Rhel5 Linux based operating system.

So let we start just click right and open terminal as a root. if you have ubuntu based linux system just need to login root user.

below command are show Heard disk status on your linux operating  system.

[root@localhost Desktop]# fdisk -l

Disk /dev/sda: 21.6 GB, 21613379584 bytes
255 heads, 63 sectors/track, 2627 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 382 3068383+ 83 Linux
/dev/sda2 383 764 3068415 fd Linux raid autodetect
/dev/sda3 765 1083 2562367+ 82 Linux swap / Solaris

now we will select our heard disk which one we need to create partition. here my heard disk name is /dev/sda if you have number of heard disk  you will see de/sdb ,/dev/sdc ,/dev/sdd. After put fdisk with our heard disk name disk partition editor will be open then we can look all kind of help when we put m and press enter  

[root@localhost Desktop]# fdisk /dev/sda    

The number of cylinders for this disk is set to 2627.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): n
Command action
e extended
p primary partition (1-4)

e
Selected partition 4
First cylinder (1084-2627, default 1084):
Using default value 1084
Last cylinder or +size or +sizeM or +sizeK (1084-2627, default 2627): (we press enter becouse extended partation requaird all space we create new partation in extend partation)
Using default value 2627

Command (m for help): n
First cylinder (1084-2627, default 1084):
Using default value 1084
Last cylinder or +size or +sizeM or +sizeK (1084-2627, default 2627): +500M

Command (m for help): n
First cylinder (1146-2627, default 1146):
Using default value 1146
Last cylinder or +size or +sizeM or +sizeK (1146-2627, default 2627): +400M

Command (m for help): n
First cylinder (1196-2627, default 1196):
Using default value 1196
Last cylinder or +size or +sizeM or +sizeK (1196-2627, default 2627): +500M

Command (m for help): p

Disk /dev/sda: 21.6 GB, 21613379584 bytes
255 heads, 63 sectors/track, 2627 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 382 3068383+ 83 Linux
/dev/sda2 383 764 3068415 fd Linux raid autodetect
/dev/sda3 765 1083 2562367+ 82 Linux swap / Solaris
/dev/sda4 1084 2627 12402180 5 Extended
/dev/sda5 1084 1145 497983+ 83 Linux
/dev/sda6 1146 1195 401593+ 83 Linux
/dev/sda7 1196 1257 497983+ 83 Linux

Command (m for help): w (save for partition
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

Here we need to reboot our system. but Here we suppose  we are work on real server then we can’t reboot server for this Service. because Many people are connected to server. so Linuc in we have Commands. we can reboot only Heard Disk partition table. Commands is Partprobe and heard disk name which one we was create partition . 

[root@localhost Desktop]# partprobe  /dev/sda

Then we Formate our partition and mount in any folder which have required .

[root@localhost Desktop]# mkdir data
[root@localhost Desktop]# mkfs.ext3  /dev/sda5

[root@localhost Desktop]# mkfs.ext3  /dev/sda6

[root@localhost Desktop]#  mount   /dev/sda7  data

Then we will go to fstab file. this file in have all mounted device information we are also write New partition description

[root@localhost Desktop]# vim /etc/fstab 

if you have any problem in this method please comment here i will solve your problem

Thank  you

Vishnu Sharma

what is loop devise ? and how to create loop in redhat linux

hello guys today we will learn how to create loop before we know what is loop .loop device is  connected to an existing file in the filesystem.

at fast we create blank 200mb file
# dd if=/dev/zero of=file bs=m1 count=200 (create for blank file )
# losetup /dev/loop0 file (configure loop0)
# losetup -a (looking for loop0)
# mkdir data (create data folder )
# mkfs.ext3 /dev/loop0 (format loop0)
# mount /dev/loop0 data (loop is mount in data folder)
# df -h (looking for mount loop0)

loop-1
we can remove to following cmd..
at fast we remove permanently go to vim /etc/fstab and umount
# umount data ( loopo unmount to data folder )
# losetup -d /dev/loop0 (delet loop0)
# losetup -a
# rm -rf file (delet foe file)

How to create a text file in linux redhat

this tutorials in we learn how to create simpl text file in linux  we follow just simple cmd or put code in linux

# vim hello.txt    (we can create simple text file to vim cmd  when we put enter then we look some file look space on desktop then we push ( I ) later through keybord after we can write aney data or matter in file when we complet our work then we push Ese key then push ( : )

then if we press (w q ) w q is for file saving

wq  is  seve and exit file

q  is only exit file without aney save and changeing

we can also create file touch  cmd through

# touch hello

# touch demo.txt