LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 03-06-2005, 06:53 PM   #1
pukington
LQ Newbie
 
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14

Rep: Reputation: 0
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
 
Old 03-06-2005, 06:58 PM   #2
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Rep: Reputation: 15
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.
 
Old 03-06-2005, 07:05 PM   #3
narmida
Member
 
Registered: Mar 2005
Location: Alphen aan den Rijn , netherlands
Distribution: core
Posts: 57

Rep: Reputation: 15
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.
 
Old 03-06-2005, 07:42 PM   #4
pukington
LQ Newbie
 
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 03-06-2005, 08:17 PM   #5
pukington
LQ Newbie
 
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14

Original Poster
Rep: Reputation: 0
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?
 
Old 03-06-2005, 08:34 PM   #6
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Rep: Reputation: 15
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.
 
Old 03-06-2005, 09:02 PM   #7
pukington
LQ Newbie
 
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 03-06-2005, 09:26 PM   #8
ssimontis
Member
 
Registered: Apr 2004
Location: USA
Distribution: Fedora Core 3
Posts: 128

Rep: Reputation: 15
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.
 
Old 03-06-2005, 09:35 PM   #9
pukington
LQ Newbie
 
Registered: Mar 2005
Location: Portsmouth, England
Distribution: Fedora
Posts: 14

Original Poster
Rep: Reputation: 0
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
 
Old 03-07-2005, 09:09 AM   #10
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
Some versions of Linux require a reboot after creating new partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving linux partition from original hard drive to another, howto??? Fear58 Linux - General 22 02-15-2008 05:26 PM
howto remove GRUB from the partition using fdisk ? cccc Linux - General 6 01-18-2005 08:09 PM
howto increase partition size vasanthraghavan Linux - Software 4 07-01-2004 10:42 AM
howto extend ext3 partition compfriend Linux - Hardware 1 09-16-2003 11:42 AM
How to add new partition before Linux partition in an existing Linux box? ashutosh Linux - Software 3 04-23-2002 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration