after doing "expert" install, can't create new partitions

Bug #18472 reported by boomer17
10
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

If this "bug" should have gone to a mailing list instead, my apologies. Please
let me know.

I have just installed ubuntu by using "expert" at the "boot:" prompt and now I
need to create some more partitions (which I wish now that I made during the
installation) and I have used fdisk several times on other distros and created
partitions, put a filesystemm on the partition, created mount point directories,
mounted the partitions on the directories and added the partitions to fstab.

At the $ prompt (for a non-root user), I ran: su - and put in the root
password and ran fdisk and tried to create the partitions and I also used: sudo
 fdisk /dev/hda and neither of these worked. However, there may be something
wrong with my setup. Should the name of the non-root user that I created during
the installation be in the /etc/sudoers file? I also can't run administrator
gui utilities (such as to create users and groups) from the desktop. When I get
asked for the password and I put in the password of the root user or the
password of the non-root user, neither provides access to the administrator gui
utilities.

I have 3 primary partitions and an Extended with 3 logical partitions and about
80 GB of available disk space. I run: fdisk /dev/hda and type n to create a
new partition and the default starting cyl is 4501 (and the range is 4501-4502)
and I press Enter and at the prompt for the size, I type in: +50M and press
Enter and I get an "out of range" error message. All of this can be seen below.

Do I need to run fdisk with sudo? Can I run: su - and then run fdisk?
Does X need to be shut down to run fdisk?
Do I need to be in runlevel 1 (which I tried) to be able to run fdisk?
With 3 primary and one Extended, should I not be able to create more than three
logical partitions in the extended partition?
Is the partition location of the swap partition a problem?

Basically, why can't I create partitions on my other 80 GB of disk space? Any
help would be GREATLY appreciated. Thanks in advance. Clyde

There are 14946 cylinders on the disk, the last first avail cyl is 4501 and the
last is 4502 (as shown below).

The fdisk "session" is shown below.

The number of cylinders for this disk is set to 14946.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/hda1 1 61 489951 83 Linux
/dev/hda2 62 547 3903795 83 Linux
/dev/hda3 548 1398 6835657+ 83 Linux
/dev/hda4 1399 4502 24932880 5 Extended
/dev/hda5 1399 2006 4883728+ 83 Linux
/dev/hda6 2007 4438 19535008+ 83 Linux
/dev/hda7 4439 4500 497983+ 82 Linux swap / Solaris

Command (m for help): n
First cylinder (4501-4502, default 4501):
Using default value 4501
Last cylinder or +size or +sizeM or +sizeK (4501-4502, default 4502): +50M
Value out of range.
Last cylinder or +size or +sizeM or +sizeK (4501-4502, default 4502):

The current contents of fstab and the output of: fdisk -l /dev/hda are shown
below.

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda1 /boot ext3 defaults 0 2
/dev/hda6 /home ext3 defaults 0 2
/dev/hda3 /usr ext3 defaults 0 2
/dev/hda5 /var ext3 defaults 0 2
/dev/hda7 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

The current partitions are shown below:

root@lancom77:~ # fdisk -l /dev/hda

Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/hda1 1 61 489951 83 Linux
/dev/hda2 62 547 3903795 83 Linux
/dev/hda3 548 1398 6835657+ 83 Linux
/dev/hda4 1399 4502 24932880 5 Extended
/dev/hda5 1399 2006 4883728+ 83 Linux
/dev/hda6 2007 4438 19535008+ 83 Linux
/dev/hda7 4439 4500 497983+ 82 Linux swap / Solaris

Revision history for this message
Matt Zimmerman (mdz) wrote :

(yes, this is a support issue, and should be taken to a mailing list or IRC instead)

Basically, you only have about 16M unallocated space on the disk and are trying
to create a 50M partition in that space.

Revision history for this message
boomer17 (cboom) wrote :

I don't think you are correct. I think there is about 80 GB of disk space
available.

How did you arrive at the figure of 16 MB ?

From the output of "p" in fdisk, you can see that the disk is 122.9 GB.
From the output of: df -h the total space used by partitions is about 43 GB
(out of 122.9).
Therefore, I should be able to create partitions.

I went to IRC and no one was able to provide any help.

(In reply to comment #1)
> (yes, this is a support issue, and should be taken to a mailing list or IRC
instead)
>
> Basically, you only have about 16M unallocated space on the disk and are trying
> to create a 50M partition in that space.

Revision history for this message
boomer17 (cboom) wrote :

Hi -

I don't think this is bug and I don't think the description below is for a
mailing list because I know that what I'm doing should work!

I reinstalled ubuntu without typing "expert" at the "boot:" prompt and I was
able to use the installation routine to create a 60 GB partition (and I could
have created a larger partition, smaller partition and more partitions, if
needed) IN ADDITION to the partitions that I created when I used "expert" (that
I was not, and still cannot create at the command line). In other words, I
could create partitions in the installation routine, but not at the command
line, after running: sudo fdisk /dev/hda and typing "n" to create a new
partition.

After the most recent installation, I still can't create a partition using the
steps described above. I have created partitions many times in Red Hat, Fedora,
SUSE and Mandrake.

I still want to be able to create partitions on hda and the other hard disk that
is in the system. Could someone please help me with this?

The following may be related to my problem and so I am relating this to you here.

When I installed with "expert", I could not run gui administration utilities,
such as by doing: System ; Administration ; Users and Groups (see bug
report 12201
). When prompted for the password, I put in the password of the
non-root user that I created when I did the installation and got an error
message. After doing the recent installation (by just pressing Enter at the
"boot:" prompt), I was able to access gui installation utilities using the
non-root user's password. With the "expert" installation, the following
statement was NOT put at the end of /etc/sodoers:

          %admin ALL=(ALL) ALL

And with just pressing Enter at the "boot:" prompt, the above statement was put
at the end of /etc/sudoers. Also, the non-root user was put in the group named
admin (which probably didn't happen when I installed as "expert").

THEREFORE, is something still missing from my setup so that I don't have enough
permission to create a partition?

Any assistance would be greatly appreciated.

Revision history for this message
Carthik Sharma (carthik) wrote :

Is this a duplicate of Bug #5100 or Bug #25598 ?

Thanks.

Revision history for this message
Rich Johnson (nixternal) wrote :

Your bug lacks information we would need to investigate further. We
are now going to close the bug - please reopen if you have more
information at hand.

Changed in util-linux:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.