Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi,
I have knowledge to make partitions unders windows using fdisk. In Red Hat there is also a fdisk command but how can I use it? In which situations we use linux fdisk ?
thanks
garden
fdisk is a tool for partition management, so you use it when you need to manage partitions. You can learn how to use it by read the manpage or other online resources.
you can try fdisk -options /dev/sda or whatever device present on your machine. then provide the value for the corresponding prompt. you can check available options by man fdisk.
listing drives and partitions (in this case the second HD)
Code:
wim@desktop-01:~$ sudo fdisk -l
[sudo] password for wim:
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2e192e18
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3264 26218048+ 7 HPFS/NTFS
/dev/sda2 3265 29422 210109825+ f W95 Ext'd (LBA)
/dev/sda5 3265 7180 31455238+ 7 HPFS/NTFS
/dev/sda6 7181 10444 26218048+ b W95 FAT32
/dev/sda7 10445 13708 26218048+ 83 Linux
/dev/sda8 13709 14229 4179968 82 Linux swap / Solaris
/dev/sda9 14229 29422 122037248 83 Linux
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3c8c2717
Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux
wim@desktop-01:~$
partitioning a disk
Code:
wim@desktop-01:~$ sudo fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
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):
PS
I'm using ubuntu, hence the sudo in front of commands to get root privileges.
Last edited by Wim Sturkenboom; 05-14-2011 at 03:34 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.