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.
The last unpartitioned space is called raw space. Yes, you can add a partition to it later. I suggest using cfdisk when creating partitions. After you create partition, use hdparm -z /dev/hda to rescan it, so you do not have to reboot to use the new partition.
Distribution: The ones that come in magazines and books.
Posts: 136
Rep:
Hey,
Yes, cfdisk is the Linux equivalent of fdisk in Windows. To my knowledge, I do not think you could do an extension of root. If you were to do another one, I believe it would to put another operating system on there.
I typically use the word unallocted for space not already part of a partition on a hard drive. From your previous post I assumed that you wanted to create a partition and use it for data storage. Steps
create partition (cfdisk)
create filesystem (format using i.e. mke2fs -j /dev/hda4)
create directory to mount filesystem ( mkdir /data)
mount filesystem to a directory (mount -t ext3 /dev/hda4 /data)
I would like to point out that the fdisk in Linux is totally different to the one in Dos/Wind9x.
The Dos' fdisk is a simple partitioning program capable of dealing only either fat16 or fat32 filing systems according to the operating system that runs it. Win2k or XP ntfs system is treated as non-Dos partition no different to a Linux or a BSD partition by fdisk. The Dos version of fdisk does nothing except Dos partitions. In a Fat16 Dos operating system the fdisk can only partition a maximum size of 2Gb because it cannot address beyond that limit on any hard disk.
Linux fdisk program recognises over 100 partition types and is one of the most robust partitioning tools available in a PC. We can use it to partition for all MS systems, Linux, BSD and Solaris. If a Windows can't read a disk because its partition table has been corrupted the chances are Linux's fdisk can read it, repair it and restore the disk to the good health again.
To put it mildly one is a boy and the other is a man. We can't send a boy to do a man's job.
create partition (cfdisk)
create filesystem (format using i.e. mke2fs -j /dev/hda4)
create directory to mount filesystem ( mkdir /data)
mount filesystem to a directory (mount -t ext3 /dev/hda4 /data)
------------------------------------------------------------------
I think Now I am getting little bit sense.
Actually I wanted this RAW device for Oracle ASM (Automated Storage Management) since Oracle recommend using RAW device for database data.
But I wanted to learn to create/delete partition, so I want to practice above commands.
Couple of questions though:
1. is cfdisk is same as fdisk in Linux?
2. how do you choose /dev/hda4 in format command? if I would already have /dev/hda4, then I would use /dev/hda5? how many hdan? I can create?
3. Can I delete the partition later on and leave it as RAW as it is now?
fdisk and cfdisk are two different programs in Linux
Use "fdisk-l" to display all the partitions of every disk.
In side fdisk, type m for menu, p for partition table etc.
Your steps listed out at the beginning show you have formatted /dev/hda4 correctly.
You can have up to hda63.
You can delete any of the partitions but do pay notice to their positions as you can turn a deleted partition into a dead space that cannot be linked to other parts of a hard disk.
If you find it confusing I suggest you have a swap partition and then one single partition for the whole of Linux with /boot being a subdirectory to "/". If you give one partition to a Linux installer to mount its "/" the installer will put everything inside the partition. So one partition for one Linux or one other operating system. Linux can boot from both logical and primary partition.
I used fdisk /dev/hda command to create extended partition.......
Command (m for help): w
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.
and when I do # mkfs.ext3 /dev/hda4
it says "could not stat /dev/hda4 --- no such file or directory
The device apparently does not exists; did you specify correctly?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.