How to add a new partition to an existing Red HAT 8

How to add a new partition to an existing Red HAT 8

am 20.02.2005 03:53:23 von BJ

Hi !

I have a red hat 8.0 & Windows 2000 on a intel box with a 60 GB hard drive .

Only 20 GB has been partitioned into 10 GB of NTFS and 9 GB of Linux , file
id 83 ext 3 and 1 GB of Linux swap , file id 82 .

I want to use some free unallocated space from the remaining 40 GB for my
linux .

But I could not get fdisk (from the command prompt ) to show me the
unallocated space and partition it .

I could see the unallocated free space when I run KDE hardware browser .

I could find the GUI disk druid too .

So How do I partition the unused free space for my red hat 8.0 .

Which utility do I use ?

When ever I use fdisk , and choose option n ( to add a partition ) , it
gives an error message saying that I need extended partition or I need to
delete old partition to create a new one .

But I have 40 GB of un used space on my hard drive.

Please advice .

Thank you for your help in advance .

cheers,
bj



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: How to add a new partition to an existing Red HAT 8

am 20.02.2005 16:20:19 von SVisor

bj wrote:

....
> When ever I use fdisk , and choose option n ( to add a partition ) , it
> gives an error message saying that I need extended partition or I need to
> delete old partition to create a new one .
>
> But I have 40 GB of un used space on my hard drive.

You can only have 4 partitions per disk. If you want more than that, you
need to make one of them extended (and yes you will loose all data on
that partition).

// Jarmo

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: How to add a new partition to an existing Red HAT 8

am 20.02.2005 16:34:23 von Ray Olszewski

At 08:38 AM 2/20/2005 +0545, bj wrote:
>Hi !
>
>I have a red hat 8.0 & Windows 2000 on a intel box with a 60 GB hard drive .
>
>Only 20 GB has been partitioned into 10 GB of NTFS and 9 GB of Linux , file
>id 83 ext 3 and 1 GB of Linux swap , file id 82 .
>
>I want to use some free unallocated space from the remaining 40 GB for my
>linux .
>
>But I could not get fdisk (from the command prompt ) to show me the
>unallocated space and partition it .
>
>I could see the unallocated free space when I run KDE hardware browser .
>
>I could find the GUI disk druid too .
>
>So How do I partition the unused free space for my red hat 8.0 .
>
>Which utility do I use ?
>
>When ever I use fdisk , and choose option n ( to add a partition ) , it
>gives an error message saying that I need extended partition or I need to
>delete old partition to create a new one .
>
>But I have 40 GB of un used space on my hard drive.
>
>Please advice .
>
>Thank you for your help in advance .

I have to guess here a bit to fill in the blanks, but I think your problem
is an IDE limitation. You listed 4 partitions, and IDE drives are limited
to 4 "real" partitions in their true partition table, partitions that can
be either primary partitions or include one extended partition. An extended
partition can, in turn, be "sub-divided" into more partitions (I think they
are called virtual partitions or something like that).

So your setup on your hard disk sounds like it is similar to this one on
one of my drives:

Command (m for help): p

Disk /dev/hda: 82.3 GB, 82348277760 bytes
240 heads, 63 sectors/track, 10637 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 6 45328+ 83 Linux
/dev/hda2 7 135 975240 82 Linux swap
/dev/hda3 136 2718 19527480 83 Linux
/dev/hda4 2719 10637 59867640 83 Linux

If I try to add a partition to this drive, I get:

Command (m for help): n
You must delete some partition and add an extended partition first

But you only mention 3 partitions above, and I don't know if that is a
reporting error on your part or an indication of some other problem. So the
first thing you should do is check your partition table as I did above (run
fdisk and use its p command).

If you have a fourth, unused partition, either delete it and replace it
with an extended partition, or simply format and use it if it contains all
of the remaining 40 GB in a form you want. (Some hard disks, typically ones
used in laptops, have a very small partition that gets used by the OS for
some special purpose, I think handling sleep mode, and that might be typing
up your fourth partition slot without your knowing it. Just a wild guess
there, though.)

If you do not have a fourth partition in the table, then post again,
including a report from fdisk providing the info I show above from mine,
and maybe I (or someone else here) will be able to spot your problem. Oh,
also report the version of fdisk you are using ( fdisk -v) ... if it's an
older version, it might have problems with the drive's physical size ... I
remember running into that, but years ago.


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: How to add a new partition to an existing Red HAT 8

am 20.02.2005 16:50:24 von Jim Nelson

bj wrote:
> Hi !
>
> I have a red hat 8.0 & Windows 2000 on a intel box with a 60 GB hard drive .
>
> Only 20 GB has been partitioned into 10 GB of NTFS and 9 GB of Linux , file
> id 83 ext 3 and 1 GB of Linux swap , file id 82 .
>
> I want to use some free unallocated space from the remaining 40 GB for my
> linux .
>
> But I could not get fdisk (from the command prompt ) to show me the
> unallocated space and partition it .
>
> I could see the unallocated free space when I run KDE hardware browser .
>
> I could find the GUI disk druid too .
>
> So How do I partition the unused free space for my red hat 8.0 .
>
> Which utility do I use ?
>
> When ever I use fdisk , and choose option n ( to add a partition ) , it
> gives an error message saying that I need extended partition or I need to
> delete old partition to create a new one .
>
> But I have 40 GB of un used space on my hard drive.
>
> Please advice .
>
> Thank you for your help in advance .
>
> cheers,
> bj
>
>

You have a bit of a problem. You'll need to create an extended partition to
handle anything beyond the 4 basic partions. Let's make an example:

# fdisk /dev/hda

....blah...

Command (m for help): p

If it shows something like:

Disk /dev/hda: ..blah..

Device Boot Start End Blocks Id System
/dev/hda1 1 20480 something 86 NTFS
/dev/hda2 20481 40960 something 83 Linux
/dev/hda3 40961 41960 something 82 Linux swap

Then you're okay.

Do:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 4

and that'll create the extended partitions you need.

Then, you can have up to 16 partitions iirc.

If you have all 4 primary partitions full, you have to do a few more steps.

boot into single-user mode (init 1)

# swapoff -a
# fdisk /dev/hda

Then, you remove your swap partition, make the extended partition in the hole you
made in the partition table, create the swap partition in /dev/hda5 in the same
place on the hard drive you had it before. Make whatever other partitions you
want in /dev/hda6, etc.

After you are done, do:

# mkswap /dev/hda5
# vi /etc/fstab

and modify the entry for the swap partition from /dev/hda3 (or wherever) to
/dev/hda5, and reboot.

To make your life easier, you might want to look at LVM -
http://www.tldp.org/HOWTO/LVM-HOWTO/. Came to Linux from AIX.

It's made chaining hard drives and dealing with expanding directories much easier.
Windows has similar functionality in Server 2003 and (I think) XP Pro - just
haven't played with it enough to be sure.

Good luck,
Jim

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

RE: How to add a new partition to an existing Red HAT 8

am 20.02.2005 16:55:03 von BJ

Hi !

I think I did hit the 4 partition limit .

The result of my fdisk -l /dev/hda is as ffs:-


Disk /dev/hda: 255 heads, 63 sectors, 7297 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 574 4610623+ 7 HPFS/NTFS
/dev/hda2 575 1097 4200997+ 83 Linux
/dev/hda3 1098 1228 1052257+ 82 Linux swap
/dev/hda4 1229 1835 4875727+ 7 HPFS/NTFS


Thank you all for your help .

bj



-----Original Message-----
From: linux-newbie-owner@vger.kernel.org
[mailto:linux-newbie-owner@vger.kernel.org]On Behalf Of Ray Olszewski
Sent: Sunday, February 20, 2005 10:18 PM
To: linux-newbie@vger.kernel.org
Subject: Re: How to add a new partition to an existing Red HAT 8


At 10:56 AM 2/20/2005 -0500, Jim Nelson wrote:
>Ray Olszewski wrote:
>
>>But you only mention 3 partitions above, and I don't know if that is a
>>reporting error on your part or an indication of some other problem. So
>>the first thing you should do is check your partition table as I did
>>above (run fdisk and use its p command).
>
>If he ran with the RH defaults, then it made a 100MB /boot partition, a
>swap partition, and then the / partition. That'll fill the partition
>table right up on a dual-boot system.
>
>Jim

That certainly makes sense ... but in his message he did include a list of
partitions, and it only had 3 entries (only one linux partition, so no
/boot partition, presumably).

If he just missed the fourth one ... he didn't say *how* he checked the
partition list ... the procedure I described will find it for him, and he
may have something of a mess on his hands (depending on the geometry of the
drive as the BIOS sees it).

If he did not miss it, and he really has only 3 partitions, then he has a
different problem and needs different help.


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: How to add a new partition to an existing Red HAT 8

am 20.02.2005 16:56:08 von Jim Nelson

Ray Olszewski wrote:

> But you only mention 3 partitions above, and I don't know if that is a
> reporting error on your part or an indication of some other problem. So
> the first thing you should do is check your partition table as I did
> above (run fdisk and use its p command).
>

If he ran with the RH defaults, then it made a 100MB /boot partition, a swap
partition, and then the / partition. That'll fill the partition table right up on
a dual-boot system.

Jim
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: How to add a new partition to an existing Red HAT 8

am 20.02.2005 17:33:06 von Ray Olszewski

At 10:56 AM 2/20/2005 -0500, Jim Nelson wrote:
>Ray Olszewski wrote:
>
>>But you only mention 3 partitions above, and I don't know if that is a
>>reporting error on your part or an indication of some other problem. So
>>the first thing you should do is check your partition table as I did
>>above (run fdisk and use its p command).
>
>If he ran with the RH defaults, then it made a 100MB /boot partition, a
>swap partition, and then the / partition. That'll fill the partition
>table right up on a dual-boot system.
>
>Jim

That certainly makes sense ... but in his message he did include a list of
partitions, and it only had 3 entries (only one linux partition, so no
/boot partition, presumably).

If he just missed the fourth one ... he didn't say *how* he checked the
partition list ... the procedure I described will find it for him, and he
may have something of a mess on his hands (depending on the geometry of the
drive as the BIOS sees it).

If he did not miss it, and he really has only 3 partitions, then he has a
different problem and needs different help.


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs