LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-29-2003, 10:17 AM   #1
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Rep: Reputation: 0
Partitioning Problems


Hi all,

I've just moved from Mandrake 9.1 to Redhat 9. I don't like mandrake, but I love redhat. However I'm having a problem:

I've lost 2gb of disk space.

There is 5gb of space allocated to linux - I found the redhat partitioning program very complicated compared to mandrakes, so I just told it to install over the top and partition automatically.

Now when I use Kdiskfree, it shows 2 linux partitions, /dev/hda2 and /dev/hda3. (/dev/hda1 is my windows one). Now, /hda2 is 100mb and is mounting at '/boot'. /dev/hda3 is 2.5gb is mounted at /. Now that adds up to nearly 3gb. However, I have allocated 5gb of space to linux. I'm guessing that the 2gb is unpartitioned, anyone have any ideas on how to claim it back?
 
Old 06-29-2003, 10:18 AM   #2
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Using linux i should add, I'm determined not to boot back into windows for this one.
 
Old 06-29-2003, 10:32 AM   #3
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
fdisk -l /dev/hda

should skow all partitions. If you have 2 gb's extra left over - you can either use Parted to resize hda3, or create a seperate partition hda4 and mount it as /usr, /home, or whatever you need. BTW, I'm assuming you have no swap - you didn't mention it. If you do (most likely), maybe that is hda4, so just create a hda5

; )
 
Old 06-29-2003, 10:36 AM   #4
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Fdisk command can't be found, according to bash.

I have no swap, or at least I think i dont

edit: When I used mandrake, my third partition was /home. If I mount it to there, will my current files inside there be moved over or will I have to start again?

Last edited by aldoman; 06-29-2003 at 10:45 AM.
 
Old 06-29-2003, 10:40 AM   #5
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
did you run fdisk as root?

Code:
su
<enter root password>
fdisk -l /dev/hda
 
Old 06-29-2003, 10:46 AM   #6
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
[root@mainPC martin]# fdisk -1 /dev/hda
bash: fdisk: command not found

This is odd...
 
Old 06-29-2003, 11:38 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
/sbin/fdisk

Using su instead of su - will use the environment of the current user and not roots.
 
Old 06-29-2003, 02:17 PM   #8
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Ok, finally got it working, this is the output :

/dev/hda1 * 1 4462 35840983+ 7 HPFS/NTFS
/dev/hda2 4463 4475 104422+ 83 Linux
/dev/hda3 4476 4810 2690887+ 83 Linux
/dev/hda4 4811 5005 1566337+ f Win95 Ext'd (LBA)
/dev/hda5 4811 5005 1566306 82 Linux swap

So there is a linux swap partition, but for some very odd reason hda4 is formatted (with my 2gb of spcae one it) as FAT32?! Why on earth would the redhat partitioner do that?
 
Old 06-29-2003, 02:22 PM   #9
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
hda4 is an extended partition.
the logical drive hda5 is using all that space.
it's not fat32.
 
Old 06-29-2003, 02:23 PM   #10
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
What's even funnier is that hda4 and hda5 seems to be the same partition - look at the starts and ends.
; )

The simplest way to solve this?

Probably remove hda4 and hda5.
then re-partition hda4 creating a 100-200mb swap. Then use the rest to create a hda5 partition with /home, or something.

OTOH, if you want to do a little more work, remove 4 and 5. Then resize hda3 to whatever size you want with parted, creating possibly a hda4 for swap.
 
Old 06-29-2003, 02:29 PM   #11
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
wait whansard, shouldn't partitions 1-4 be primary?

Why is 4 an extension for 5? That's a pretty messy set-up, IMO.
 
Old 06-29-2003, 02:49 PM   #12
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
I agree, it's a terrible setup. For some reason the swap space is 2gb, which is insane as I have 768mb of RAM anyway.

Anyone got any good instructions on how to do this. I'd like to resize hda3 if possible?
 
Old 06-29-2003, 02:54 PM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
an extended partition is considered a type of primary
partition. just one that you can split up.
turn your swap off, delete 5 and 4.
use diskdrake to make 3 bigger, if you want.
 
Old 06-29-2003, 03:53 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Just to support for whansard is saying.

You can have up to 4 primary partitions on a drive.
One of the primary partitions can be used as an extended partition. An extended partition is basically a container for logical drives. You can have up to 64 logical drives.

To make hda3 bigger you will need to boot from the 1st install CD and select rescue mode. You don't want it to be mounted. Delete partitions 4 & 5 and then resize 3. You can use parted but it has limitations depending on what kind of filesystem it is.

Then create a swap if you want one.
 
Old 06-29-2003, 03:55 PM   #15
aldoman
LQ Newbie
 
Registered: Jun 2003
Distribution: Redhat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Which program should I use? Parted?
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Partitioning HD acidtone Slackware - Installation 9 02-20-2006 11:34 AM
Re-partitioning problems Massif Linux - Newbie 2 05-03-2005 12:35 AM
Partitioning problems Oholiab Slackware - Installation 6 03-26-2005 08:04 PM
Partitioning problems...:( Slayer097 Linux - Newbie 6 12-29-2004 03:59 PM
Partitioning Problems Angryguy Linux - Software 3 09-09-2004 04:36 PM


All times are GMT -5. The time now is 01:40 PM.

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