Clicking "Edit Partition" shows wrong partition size

Bug #89509 reported by Billy Charlton
This bug report is a duplicate of:  Bug #95400: resize logic not 64-bit clean. Edit Remove
8
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Incomplete
Undecided
Colin Watson

Bug Description

Binary package hint: ubiquity

Feisty Herd 5.

What happens
-------------------

Using 'Manual' partition setup, click on a pre-existing ext3 partition, then click "Edit Partition".

Sometimes the dialog shows the correct partition size, but other times, (especially for smaller partitions and/or after editing a different partition) the "new partition size" field does not seem to get updated. It will show the size of the previous partition selected, or perhaps some random number that is also wrong.

What should happen
----------------------------
Seems like the partition-size field in the "Edit Partition" dialog needs to be updated to match what's in the main window before it is displayed.

Revision history for this message
Colin Watson (cjwatson) wrote :

Could you please attach /var/log/syslog and /var/log/partman to this bug, following the directions in http://wiki.ubuntu.com/DebuggingUbiquity/AttachingLogs? Thanks in advance.

Changed in ubiquity:
assignee: nobody → kamion
status: Unconfirmed → Needs Info
Revision history for this message
Colin Watson (cjwatson) wrote :

Oh, it might be useful to reproduce this with 'ubiquity --debug' and attach /var/log/installer/debug too.

Revision history for this message
Gerd Bavendiek (gerd-bavendiek) wrote :

Same thing here with Feisty as of Thu, 08 Mar 2007 9:29:07 UTC.

I have:

jojo:/root>>> cat /proc/partitions
major minor #blocks name

   8 0 244198584 sda
   8 1 6297448 sda1
   8 2 2104515 sda2
   8 3 3148740 sda3
   8 4 1 sda4
   8 5 73400953 sda5
   8 6 159244281 sda6
   8 16 244198584 sdb
   8 17 6297448 sdb1
   8 18 2104515 sdb2
   8 19 3148740 sdb3
   8 20 1 sdb4
   8 21 73400953 sdb5
   8 22 159244281 sdb6
   9 0 159244160 md0
 253 0 94371840 dm-0
 253 1 52428800 dm-1

and want to install on sdb1 / and sdb2 swap. I do not want to change the partition layout (sda1 is kinda productive root).

Editing sdb1 gives me the wrong size 0. I cancel and edit sdb2. Here size is shown correctly (2155). I cancel and click sdb3. Size should be 3224, but again 2155 is displayed. I cancel and go back to sdb1. 2155 is displayed. I canceled the installation.

Kind regards

Gerd

Revision history for this message
Colin Watson (cjwatson) wrote :

Gerd, please attach the information I asked for above; /proc/partitions is a mildly interesting data point but doesn't really help me get anywhere with this bug.

Revision history for this message
Gerd Bavendiek (gerd-bavendiek) wrote :

Colin, I ran ubiquity --debug and did the same as described earlier. Clicking sdb3 this time gave me no size at all. Hope debug log helps.

Gerd

Revision history for this message
Colin Watson (cjwatson) wrote :

OK, this is expected; the installer didn't detect any filesystem it knew about on sdb3, and at present it only shows a partition size in the "Edit partition" dialog for the purposes of resizing the filesystem, so you don't get a size displayed there if it can't resize the filesystem.

Did you experience any other similar problems in this run, other than sdb3?

Revision history for this message
Stephen Gornick (sgornick) wrote :

I am experiencing the same problem. For example, all I wanted to do was change the mount point for an existing ext3 partition (from /media/hda[n]) to root partition (/). When I clicked on Edit partition, the value in the field labeled "New parititon size in megabytes" was 0. If I only changed the mount point, ubiquity then wanted to resize the partition to 0.

I then canceled and re-launched Ubiquity and get the same behavior. Other partition types (swap, ntfs) appeared to be getting the size pre-filled in the field correctly.

Revision history for this message
Gerd Bavendiek (gerd-bavendiek) wrote : Re: [Bug 89509] Re: Clicking "Edit Partition" shows wrong partition size

Colin Watson schrieb:
> OK, this is expected; the installer didn't detect any filesystem it knew
> about on sdb3, and at present it only shows a partition size in the
> "Edit partition" dialog for the purposes of resizing the filesystem, so
> you don't get a size displayed there if it can't resize the filesystem.
>
> Did you experience any other similar problems in this run, other than
> sdb3?
>

Colin,

wish you were here - you certainly would get me right in no time at all.
But that's not possible - so I'll try to explain my problem better.

I just started the edgy-ubiquity on the box in question - everything
works as expected. I then started the new version coming with feisty.

I choose "Partitiontable manual". I want to install Feisty on /dev/sdb1
(root) and /dev/sdb2 (swap). I do not want to change any partition size.

I highlight the line reading
/dev/sdb1 ext3 /media/sdb1 6448 MB

That's fine, there is an existing ext3 with an old edgy test
installation. So I click "Edit Partition". A new window pops up telling me:

New partition size: 0 # zero
use as: ext3
mountpoint: /media/sdb1

 From this point on I'm lost. I do not know the precise partition size,
so I can't correct 0 to the right value in MB.

To be able to read better the main window, I dragged the "Edit
Partition" Window a bit aside. Strange enough: The value for new
partition size jumped from 0 to 2000. Weird ...

As I do not want to change my partition layout, I cancel the installation.

Uuuuh ...

Gerd

Revision history for this message
Gerd Bavendiek (gerd-bavendiek) wrote :

Find attached ubiquity log.

Gerd

Revision history for this message
Colin Watson (cjwatson) wrote :

Hmm. At least some of this appears to be because dash doesn't support 64-bit arithmetic, so it does something like 100 * 2000000000 / 6400000000 and gets 0, which is obviously wrong. I'll look at workarounds.

Revision history for this message
Colin Watson (cjwatson) wrote :

I've fixed this as bug 95400 (this one was earlier, but I forgot about this one when I was trying to find a bug number for the problem).

Revision history for this message
Gerd Bavendiek (gerd-bavendiek) wrote :

I just tested this with Daliy Build as of March 30 (ubiquity --version 1.4.4).

Sorry to say: Nothing has changed for me. Still "New partition size 0".

When I drag the window a few pixel, the displayed value changes from 0 to 2000.

So the same behaviour as before for me.

Gerd

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.