LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-06-2003, 01:43 AM   #1
rusium
LQ Newbie
 
Registered: May 2003
Distribution: Redhat 9, XP Pro
Posts: 12

Rep: Reputation: 0
Formatting existsing unused partition


I have a 40g HD with 3 defined partitions, I made an extended partition with fdisk and im running into some problems now when formatting it...

fdisk -l
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 83 Linux
/dev/hda2 2551 2677 1020127+ 82 Linux swap
/dev/hda3 2678 4865 17575110 5 Extended

---

mkfs.ext3 /dev/hda3
mke2fs 1.32 (09-Nov-2002)
/dev/hda3: Not enough space to build proposed filesystem while setting up superblock

---

df -a -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/hda1 ext3 20161172 5885384 13251648 31% /
none proc 0 0 0 - /proc
usbdevfs usbdevfs 0 0 0 - /proc/bus/usb
none devpts 0 0 0 - /dev/pts
none tmpfs 192288 0 192288 0% /dev/shm


---

Can someone point me in the right direction?
 
Old 05-06-2003, 02:25 AM   #2
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
I don't get it....

So you want to format /dev/hda3 ext3?
I use:
mke2fs -j /dev/hda3
Or is your problem that you're not seeing the partition using df?
Is it mounted?
 
Old 05-06-2003, 02:52 AM   #3
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yeah, I was going to say I didn't get it, either, but was going to let somebody else post first. *g*

I think he was saying he tried formatting and couldn't. Not sure what the problem is, but I don't trust extended partitions. If you've only got two primaries, why not make a third? I'd just delete the unformatted extended, recreate it as primary, and then try formatting that.

Wait... there is that. If it's an extended, shouldn't it be /dev/hda5? I think that might be what fdisk is complaining about - it sounds like it wants to reorder and rewrite the table, because it's messed up. I don't know.

Like I say, I'd either change the flag to make it 83, or just delete and recreate as 83. Hate extended partitions.
 
Old 05-06-2003, 02:57 AM   #4
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
Ohh, I see...

He needs to make a logical partition, /dev/hda4
 
Old 05-06-2003, 03:06 AM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Hm. Well, if it was DOS, he'd need to create logical drives inside the extended. They'd get labeled D:, E:, etc. But in Linux, I think the extended's just the extended, and begins numbering from hdX5. I've been able to avoid the extended/logical stuff in Linux so far, so I'm not sure. So his table should read

/dev/hda1 83 Linux
/dev/hda2 82 Linux swap
/dev/hda5 5 Extended

and then, yeah, maybe he would need to create an 83 inside the 5? I dunno. But it wouldn't be /dev/hda4. It'd just be a subset of 5, I guess.

Or it should read

/dev/hda1 83 Linux
/dev/hda2 82 Linux swap
/dev/hda3 83 Linux

That last is what I'd do. Then do mkfs on it.
 
Old 05-06-2003, 03:13 AM   #6
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
Re: Formatting existsing unused partition

Quote:
Originally posted by rusium

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 83 Linux
/dev/hda2 2551 2677 1020127+ 82 Linux swap
/dev/hda3 2678 4865 17575110 5 Extended

---

mkfs.ext3 /dev/hda3
mke2fs 1.32 (09-Nov-2002)
/dev/hda3: Not enough space to build proposed filesystem while setting up superblock
/dev/hda3 2678 4865 17575110 5 Extended

I think he's trying to format an extended partition ext3. That's not allowed. The next partition, the logical one, should be /dev/hda4. I think.
What do you think?

I like the idea of getting rid of the extended the best, though. Use that scheme above, I think.
L8TR
 
Old 05-06-2003, 03:37 AM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yeah - just ditch the extended.
 
Old 05-06-2003, 08:21 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,807

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
An extended partition in simple terms is a place holder for logical partitions. You don't format it.

Use fdisk to create a logical drive and then format as you wish. It will be /dev/hda5 as stated above.

FYI
Primary partitions are 1-4. An extended partition is a primary.
Logical partitions are 5-64.

Getting rid of the extended would limit your self to only one additional partition since there are only 4 primaries allowed. Some like to use different partitions for /, /home, /boot, /var etc. which can be more than 4.

Last edited by michaelk; 05-06-2003 at 08:22 AM.
 
Old 05-06-2003, 12:41 PM   #9
rusium
LQ Newbie
 
Registered: May 2003
Distribution: Redhat 9, XP Pro
Posts: 12

Original Poster
Rep: Reputation: 0
Sorry, i posted late last night I was pretty lazy.

Im trying to partition /dev/hda3 which was intended to be an extended partition, but I get errors when trying to format it...


ok i got rid of the extended partition and created a primary, formatted it, mounted it, and it works fine, thanks for the help


-Dan

Last edited by rusium; 05-06-2003 at 12:55 PM.
 
  


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
Formatting partition with XFS. duffmckagan Linux - Software 1 10-30-2005 12:58 PM
Deleting unused space from a partition Tsukasa7 Linux - Newbie 2 08-31-2005 02:05 PM
help with partition formatting and reisferFS debloxie Linux - Newbie 11 05-11-2004 10:24 AM
Formatting a FAT32 partition... SamH Linux - General 3 12-23-2003 10:51 AM
can i resize partition without formatting? doublefailure Linux - General 4 03-23-2002 06:15 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration