Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
03-06-2005, 06:53 PM
|
#1
|
LQ Newbie
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14
Rep:
|
howto partition in linux
I'm afraid i am a relative newb to the nix world, although having been a unix user at uni and at home i haven't done all that other than be an end user.
My linux distrubtion, being Fedora, is installed on a second hdd, XP being on my primary, and this linux disc is at ten gigs, plus my swap space etc, but i want to partition the rest of it so i can use it, atm its just dormant. I've only ever used disk-druid on install or PM in windows, so atm i'm at a loss, as i've done some googleing and it looks as though i can't run disk druid outside of anaconda, and guessing i need to use fdisc but i'm a little scared that i'll end up destroying any of my partitons. I can't seem to find much help on the net, or that i can understand in the least, so hoping you guys could help me out a bit.
Cheers guys
|
|
|
03-06-2005, 06:58 PM
|
#2
|
Member
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128
Rep:
|
Fdisk is pretty easy to use. And the changes don't take place until you write the table, so if you think you messed up or you want to stop, you can quit without losing everything. Also, check out cfdisk, which is a little easier to use.
|
|
|
03-06-2005, 07:05 PM
|
#3
|
Member
Registered: Mar 2005
Location: Alphen aan den Rijn , netherlands
Distribution: core
Posts: 57
Rep:
|
cfdisk is not on fedora @ default
Do
fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 64 514048+ 83 Linux
/dev/hda2 65 9729 77634112+ fd Linux raid autodetect
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 64 514048+ 82 Linux swap
/dev/hdb2 65 9729 77634112+ fd Linux raid autodetect
You can see partitions of my server (for the geeks yes partitions could be MUCH better but he! its a P2 my own temp fileserver at home)
Sort out wich partition it is about and use fdisk :
fdisk /dev/hda
The number of cylinders for this disk is set to 9729.
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): p
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 64 514048+ 83 Linux
/dev/hda2 65 9729 77634112+ fd Linux raid autodetect
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):
all you need to know that there can be 4 primary partitions the fourth must be an extendend (can be primary 4 btw but that is stupid)
you make the partition and give it 83 Linux in the L list (default btw)
then write (w)
after that you can do mkfs.ext3 /dev/hda3 (for partition 3 on master ide drive on first ide interface)
now you can put him in /etc/fstab and mount the sucker
NOTE when you use label in fstab use e2label to label the disk but is basicly for higher purposes)
fdisk is simpel and great dont use easy tools learn the core with youre unix background you should know this also
use : man fdisk
hope it helps
Last edited by narmida; 03-06-2005 at 07:08 PM.
|
|
|
03-06-2005, 07:42 PM
|
#4
|
LQ Newbie
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14
Original Poster
Rep:
|
dude thats stunning, thats exactly what i'm after, i'm doin a lotta learning here, forgotten how such a small thing can be such an accomplishment, heres what i got:
Command (m for help): p
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 24966 12582832+ 83 Linux
/dev/hdb2 24967 27047 1048824 82 Linux swap
/dev/hdb3 27048 155061 64519056 5 Extended
Command (m for help):
but how do i tell it to be a fat partition, when i made the partition should i have typed b for W95 FAT ??
thanks again
|
|
|
03-06-2005, 08:17 PM
|
#5
|
LQ Newbie
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14
Original Poster
Rep:
|
okay i'm one better, but i dont get how to format it,
Command (m for help): p
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 24966 12582832+ 83 Linux
/dev/hdb2 24967 27047 1048824 82 Linux swap
/dev/hdb3 27048 155061 64519056 b W95 FAT32
i take it that mkfs is make file system, i worked that out, but how do i go about it, would it be
mkfs /dev/hdb3
i dont understand the .ext3, isn't that a type of format? so would i want .fat or am i way off?
|
|
|
03-06-2005, 08:34 PM
|
#6
|
Member
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128
Rep:
|
You just need to use the commands. Press m to see them all. First, delete the partition you wish to get rid of. Then, create a new partition. It will default to Linux. Then use the 'w' command to write the table and quit. To create a file system, you can use a number of tools. Use 'makefs' for ext2 and ext3 filesystems, and 'mkreiserfs' for reiserfs filesystems.
|
|
|
03-06-2005, 09:02 PM
|
#7
|
LQ Newbie
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14
Original Poster
Rep:
|
i got the fdisking down ok, i just can't seem to sort out how to format it to fat, i'm getting a bit tired, may leave it for the morning
|
|
|
03-06-2005, 09:26 PM
|
#8
|
Member
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128
Rep:
|
What filesystem do you want to use? You might want to put a bit of research into Linux filesystems. The most common filesystem is probably ext3. I personally use reiserfs.
|
|
|
03-06-2005, 09:35 PM
|
#9
|
LQ Newbie
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14
Original Poster
Rep:
|
i actually want it to be Fat32, and have worked out how to do it,but i'm getting a error that i dont understand:
firstly, i've made hdb3 in fdisk to be fat according to the partition table:
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 24966 12582832+ 83 Linux
/dev/hdb2 24967 27047 1048824 82 Linux swap
/dev/hdb3 27048 155061 64519056 c W95 FAT32 (LBA)
so its there, hdb3.
i'm now using mkfs.vfat or mkfs -t vfat:
root@localhost puk]# /sbin/mkfs.vfat /dev/hdb3
mkfs.vfat 2.8 (28 Feb 2001)
/dev/hdb3: No such device or address
and
[root@localhost puk]# /sbin/mkfs -t vfat /dev/hdb3
mkfs.vfat 2.8 (28 Feb 2001)
/dev/hdb3: No such device or address
it can't find the device but it is there as i proved with the above table, am i missing something here?
cheers
|
|
|
03-07-2005, 09:09 AM
|
#10
|
Member
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170
Rep:
|
Some versions of Linux require a reboot after creating new partitions.
|
|
|
All times are GMT -5. The time now is 09:59 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.
|
Latest Threads
LQ News
|
|