LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-10-2006, 04:18 AM   #1
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30
Blog Entries: 3

Rep: Reputation: 15
2006: How include unused partitions?


I am running Mandriva 2006, after earlier having tried other distros. It turns out that the others have left behind partitions, some of which Mandriva has marked as unused, which, of course is logical. However, when I try to re-install Mandriva and use the graphical interface during installation, I do not seem able to include the unused space into the system again. When I click the representation at the top of the screen, a dialog pops up, saying "Use Delete". So, I do, but then it deletes a different partition instead. That is not exactly what I intended.

Here is an extract from the listing I get from fdisk -l:

hda1 HPFS/NTFS (this is my windows installation)
hda4 Extended----------------30641223
hda5 Linux-----------------125646916+
hda6 Linux-------------------6136798+
hda7 Linux swap / Solaris-----1630566
hda8 Linux--------------------4088511
hda9 Linux-------------------44671252+
hda10 Linux------------------67183798+
hda11 Linux swap / Solaris----1124518+

fd -m gives me this:

hda9 /-------------42940M
hda6 /boot-----------780M
hda10 /home---------64579M
hda1 /mnt/windows--29916M
hda8 /usr-----------3930M

My problem is that the /usr (hda8) partition is getting full (78% usage), and I'd like to include those not mentioned by fdisk and fd, namely hda2 and hda3. I know that one of them is big enough to match the others (/ and /home).

I am in a position that I can re-install again, because I have saved everything (well, almost) onto a USB drive. However, I daren't delete the active Linux partitions, for the reason that they may not be recognised again during installation...

Any hints?
 
Old 01-10-2006, 04:50 AM   #2
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
console >mount -t [ext2/vfat/ext3...] /dev/[partition name] /[directory where you want ot mounted]

This will mount your harddisk at the specified postition and make it accessible from anywhere as a standart directory tree.

How do you know hda2 and 3 exist though? If fdisk doesnt list them, they aint registered in the partition table of the disk, thus they dont exit as partitions yet and are not listed. run fdisk -p to see what cylinder ranges are in use and if there is free space, then create one or more partitions, use mkfs -t [fstype] to activate them. Only then are they mountable!

Last edited by ichrispa; 01-10-2006 at 04:54 AM.
 
Old 01-10-2006, 05:32 AM   #3
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Well, my logic was that since the two numbers 2 and 3 are missing from the tables, and I KNOW there are two empty partitions unused, these must be 2 and 3. However, what you say makes sense. I have tried numbers between 12 and 19 too, but fdisk tells me it is unable to open them. Besides, my fdisk doesn't have option -p - just -b, -u, -l, -s and -v. What is, by the way, SSZ (mentioned in the fdisk help)? And what do -b and u do? I listed the /dev contents (ls /dev/hda*) and got hda, hda1, hda4, hda5, hda6, hda7, hda8, hda9, hda10, hda11.

Being an impatient rookie, I tried to mount hda. Didn't do it. Maybe a good thing...

Last edited by Bengan; 01-10-2006 at 05:39 AM.
 
Old 01-10-2006, 07:51 AM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
are we running the same version of Mandriva 2006.0 free?

With those commands I get....

[root@GlennsPref My_Downloads]# fd -m
bash: fd: command not found
[root@GlennsPref My_Downloads]# fdisk -p
fdisk: invalid option -- p

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
[root@GlennsPref My_Downloads]#

Last edited by GlennsPref; 01-10-2006 at 07:59 AM.
 
Old 01-10-2006, 07:56 AM   #5
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Here's fdisk -l ( thats a small L folks)

[root@GlennsPref My_Downloads]# fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 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 1912 15358108+ 7 HPFS/NTFS
/dev/hda2 1913 4865 23719972+ 5 Extended
/dev/hda5 1913 4865 23719941 7 HPFS/NTFS
notics hda2 is extended, not a useable partition, windows then skips to hda5 when partitioning.

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2919 23446836 7 HPFS/NTFS
/dev/sda3 2920 14593 93771405 f W95 Ext'd (LBA)
/dev/sda5 2920 3018 795186 83 Linux
/dev/sda6 5839 7677 14771736 c W95 FAT32 (LBA)
/dev/sda7 7678 7839 1301264+ 82 Linux swap / Solaris
/dev/sda8 7840 11216 27125721 7 HPFS/NTFS
/dev/sda9 3019 4295 10257471 83 Linux
/dev/sda10 4296 4498 1630566 83 Linux
/dev/sda11 4499 5838 10763518+ 83 Linux
/dev/sda12 11217 13771 20523006 83 Linux
/dev/sda13 13772 14593 6602683+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sdb: 262 MB, 262144000 bytes
32 heads, 33 sectors/track, 484 cylinders
Units = cylinders of 1056 * 512 = 540672 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 485 255984 6 FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 0, 33)
Partition 1 has different physical/logical endings:
phys=(254, 31, 33) logical=(484, 27, 5)
[root@GlennsPref My_Downloads]#
 
Old 01-10-2006, 11:37 AM   #6
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Sorry, I took my afternoon nap, so I haven't been online for a while

we do seem to run the same version of 2006. You don't have the -p option either - just the ones I listed My fdisk gives pretty much the same output as yours. Here's mine:

[root@dhcpp1 bengt]# fdisk -l

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Bopot Start End Blocks Id System
/dev/hda1 * 1 3815 30641223 7 HPFS/NTFS
/dev/hda4 3816 19458 125646916+ 5 Extended
/dev/hda5 3816 4579 6136798? 83 Linux
/dev/hda6 13084 13184 811251 83 Linux
/dev/hda7 13185 13387 1630566 82 Linux swap / Solaris
/dev/hda8 13388 13896 4088511 83 Linux
/dev/hda9 13897 19458 44671252+ 83 Linux
/dev/hda10 4720 13083 67183798+ 83 Linux
/dev/hda11 4580 4719 1124518+ Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sda 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4863 39062016 c W95 FAT32 (LBA)

[root@dhcpp1 bengt]#

So, this tells me that yu too seem to have a USB drive or similar connected and mounted, but yours seem to be partitioned - mine is not. I've got two swap partitions, and you one.

My drive is probably a bit differently partitioned than yours. What fdisk DOESN'T say is what the partitions are being used for, but that can be remedied with the df -m command (whose output I partly quoted in my first post). It also doesn't tell me about the unused partitions and, most importantly, how I can include them into Linux. hda8 is my /usr partition and it is used to 78%, so I need more. I think it is a shame to just leave partitions unused. Maybe I can scrap the /usr partition, thereby letting it be included into the / partition or something (which probably would give me yet another unused partition).
 
Old 01-10-2006, 05:42 PM   #7
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Seems you know more about this than I do.

I was checking this post out, because I want to convert one of my ntfs partitions, and posibly put /usr on to it.

That's why I was checking the commands, sorry for intruding....

...but that's another story and I will post a separate thread for it when the time comes.

Yes. we are on different sides of the Globe, helps to have patience, huh?
 
Old 01-10-2006, 06:16 PM   #8
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Yup, Glenn, patience is what it takes. No worries, though, I'll get around it somehow.

In case somebody out there has a good answer to my problem, don't hesitate! Here's some additional info:

If I go into the K Menu/System/Configuration/Configure your computer, I'll end up in the Control Center. There I select Mount Points/Create, Delete and Resize hard disk partitions.That gives me a graphical representation of the hard drive and the partitions. Along the upper edge of the window a map of my disk is shown. To the right of the graph there are two areas that differ in that they remain grey. They are labelled "Other" and "Empty". The Empty one is what I am after. Clicking it just opens a dialog saying 'Use "Delete" instead'. (There is another dialog saying "Please make a backup of your data first". Well, I haven't, so I can't do much - there is only one button shown "Unmount", but the point is: How do I integrate the Empty partition into my Linux system? Clicking Empty shows no explanatory text that I can draw conclusions from. I've even read the Diskdrake manual, and it too shows the empty partition, but gives no hint as to what it is and how to integrate it.

Last edited by Bengan; 01-10-2006 at 06:17 PM.
 
Old 01-11-2006, 06:35 AM   #9
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
let me explain what you see.

hda2 two and 3 do not exist at all. In the old days there was the hypothesis that who would want more than four partitions on a 100MB HDD anyway? So back then you could only create four partitions (this goes for all IBM based systems). With time, the necessity for more partitions rose, so one created the following trick. On the MPT, the master partition table, you can register 4 master partitions. Each one of those is reconed as a seperate disk. These are also called primaries.

However, you can create so called "extended" partitions. That means, that within a master partition you create a new partition table, subdividing a virtual disk. imagine it like this:
------------------
| hda1 |
------------------
|hda2 |
------------------
|hda3 |
------------------
|hda 4 |
||--------------||
||hda5 ||
|----------------|
||hda6, etc,etc ||
|---------------||
------------------

Either you or your bootloader erased partitions two and three and intigrated them into hda1 (cylinders in my knowledge need to be listed in the MPT sequentialy), but the extended partition, hda4, stayed. If you try to mount hda4 you will get the message "perhaps you are trying to mount an extended partition?", which is a quite similar case to trying to mount hda as a device itself.

As a addition: you are right, fdisk does not have an paramter called -p. It can however be invoced as a interactive program, try "fdisk /dev/hda". You will be presented with a command prompt ">" (or similar.). From here you can modify your MPT. Now try just typing "p", it will print out the MPT in detail. There will be no hda2 and 3, unless they are swap partitions and linux doesn' t make them available for mounting as storage...

No to the rest of you guys. /dev/sda stands for a serial device (hence the sd), not for something using storage. There are various USB sticks, some use a MPT as a storage system standard, but no rules imply that it needs to be done. /dev/sda can also be a printer, a mouse, hell even a usb-driven coffee machine.
To get a detailed information of what is mounted and used type "mount", no params. To see what is mounted on boot, try "cat /etc/fstab", "/etc/mtab" are all curently mounted devices.

As I already wrote, partition numbers are not in order numbered order, as Bengan correctly wrote, they are in assending order of cylinders used by the partition. Dont bother with graphical interfaces bengan, they are a bitch and make life hellish. As fighterpilots say: Fly as low as you can, as fast as you can.
Now, your hda2 and three do not exit, you cant mount or format them. start fdisk /dev/hda. type n. there will be a question about primary or extended, select primary. number 2. lowest free cylinder will be selected automatically (enter), highest one too (enter). If there are errors like overlapping partitions quit q, post the error. else, save the MPT with w. then q.
hda2 has now been written to the MPT. type "mkfs -t ext2 /dev/hda2 -m 0". This will create an extended2 linux filesystem. You should now be able to mount the partition as you wish, where you wish. I there are problems, post the error given by the system.

By the way everyone, if you are using fdisk, you are all using fdisk. There's no "mine doesnt have...". fdisk --help for detailes, man or info fdisk for even more. Case sensitive, as everything in linux! Type fdisk -v for version infos. I bet my soul you are all over 2.x...

Last edited by ichrispa; 01-11-2006 at 06:51 AM.
 
Old 01-11-2006, 08:03 AM   #10
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,654
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Excellent explanation ichrispa!

cheers.
 
Old 01-12-2006, 08:07 AM   #11
Bengan
Member
 
Registered: Dec 2005
Location: Sweden
Distribution: Mandriva 2006
Posts: 30

Original Poster
Blog Entries: 3

Rep: Reputation: 15
Yes, thank you very much! A brilliant explanation!

It turned out that I had misunderstood the top part of the graphical display. It doesn't show partitions, but usage of partitions. That's why there is a field marked Empty - to show that an empty partition is white (or light grey or whatever).
 
  


Reply



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
How to disable unused hardware ?? kevkim55 Linux - Hardware 2 01-01-2006 11:08 PM
Mandriva 2006 or 2006.1? tauhshi Mandriva 3 01-01-2006 07:18 PM
include/linux/types.h and include/linux/posix_types.h kpachopoulos Programming 2 11-26-2005 05:52 AM
amavisd unused ?? Wynand1 SUSE / openSUSE 0 09-22-2005 07:50 AM
Including unused partitions kartik Linux - Hardware 2 05-03-2002 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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