LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-01-2003, 11:38 PM   #1
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
Partition Free Space?


My HD is 30GB now I have 1 / partition, 1Swap, 1/home and
I have a 10GB free space without partition what can I do to take advantage of the free space ?, how can I do a partition? I tried with this:

[root@ud3-25 Gerardo]# /sbin/fdisk /dev/shm
You will not be able to write the partition table.

Unable to read /dev/shm

Thanks
 
Old 06-01-2003, 11:55 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Try /sbin/fdisk /dev/hda I am assuming this is the first HD.
 
Old 06-01-2003, 11:57 PM   #3
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
That's not a drive IDE drives have to be /dev/hda, /dev/hdb, /dev/hdc or /dev/hdc unless it's a raid array.

Code:
[root@uilleann root]# fdisk /dev/hda -l

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1217   9772056    c  Win95 FAT32 (LBA)
/dev/hda2          1217      1229     99855   83  Linux
/dev/hda3          1230      1676   3590527+  83  Linux
/dev/hda4          1677      4865  25615642+   5  Extended
/dev/hda5          1677      1742    530113+  82  Linux swap
/dev/hda6          1743      2189   3590496   83  Linux
/dev/hda7          2190      2636   3590496   83  Linux
/dev/hda8          2637      3751   8956206   83  Linux
/dev/hda9          3752      4865   8948173+  83  Linux
[root@uilleann root]#
 
Old 06-02-2003, 12:05 AM   #4
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
My HD config is :

[root@ud3-25 Gerardo]# /sbin/fdisk /dev/hda -l

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1925 15358140 83 Linux
/dev/hda3 1926 2435 4096575 83 Linux
/dev/hda4 2436 3738 10466347+ f Win95 Ext'd (LBA)
/dev/hda5 2436 2459 192748+ 82 Linux swap

and I tryed sbin/fdisk /dev/hda and it works but in the menu what command I need choose?

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)

Thanks!!
 
Old 06-02-2003, 12:23 AM   #5
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
So you have cylinders 2460 - 3738 left for partitioning.

Just like the menu says, n creates a new partition (but not unless you exit with w) with the default start = first available cylinder and end = last cylinder

man fdisk
info fdisk

Don't forget after partitioning, you have to format with mkfs, then make mount points, then mount.

Last edited by fancypiper; 06-02-2003 at 12:30 AM.
 
Old 06-02-2003, 12:31 AM   #6
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
Hi again:

Hey what did you mean with "unless you exit with w", please if you can tell me step by step I will appreciate. you I'm newbie

Thanks.
 
Old 06-02-2003, 12:39 AM   #7
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
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)

As is says, w actually writes the partition table and exits. You can chicken out with q quit without saving changes.

It's self explanatory, at least it makes sense to me.
 
Old 06-02-2003, 12:43 AM   #8
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
I tried this one

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

and when I type df -h still

[root@ud3-25 Gerardo]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 14G 1.7G 12G 12% /
/dev/hda1 99M 9.2M 84M 10% /boot
/dev/hda3 3.8G 119M 3.5G 4% /home
none 93M 0 93M 0% /dev/shm

Thanks
 
Old 06-02-2003, 12:48 AM   #9
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Obviously you didn't n add a new partition before you re-wrote the exact same partition table.
 
Old 06-02-2003, 12:50 AM   #10
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Or if you did, did you reboot?
Quote:
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
 
Old 06-02-2003, 12:56 AM   #11
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
Sorry but belive me I'm newbie in partitions and I fear to fall in a big mistake
I reboot my box then I add a new partition and then "w" and appeared me the same error and now if I try to add a new partition appear me "No free sectors available" what do you think?

Thanks
 
Old 06-02-2003, 01:00 AM   #12
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Go back through the process. Look at your partition table again

fdisk /dev/hda -l

Has it changed since your first posting of it?
 
Old 06-02-2003, 01:03 AM   #13
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
You won't see it in df -h until you

1. Create the new partition
2. Create a filesystem
3. Create a mount point
4. Mount the drive

Then you can see it.
 
Old 06-02-2003, 01:03 AM   #14
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
Yeah now is:

/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1925 15358140 83 Linux
/dev/hda3 1926 2435 4096575 83 Linux
/dev/hda4 2436 3738 10466347+ f Win95 Ext'd (LBA)
/dev/hda5 2436 2459 192748+ 82 Linux swap
/dev/hda6 2460 3738 10273536 83 Linux

but how can I use it?
 
Old 06-02-2003, 01:07 AM   #15
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
how can I make the file system? , and the mount point?

Thanks a lot..
 
  


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
partition used/free space elbriga Linux - General 2 09-24-2004 12:36 PM
Can't free space on root partition AThomsen Fedora 1 06-18-2004 02:58 PM
How do I check free partition space explorer Linux - General 5 04-14-2004 12:35 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:37 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