Bug 1371 - installer chooses too little free space on wrong partition (on the recovery partition)
Summary: installer chooses too little free space on wrong partition (on the recovery p...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Pascal Terjan
QA Contact:
URL:
Whiteboard: 5RC
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-21 22:05 CEST by Marja Van Waes
Modified: 2015-04-21 22:30 CEST (History)
5 users (show)

See Also:
Source RPM: drakx-installer-stage2-16.79-1.mga5
CVE:
Status comment:


Attachments
ddebug.log (467.26 KB, text/plain)
2011-09-03 15:47 CEST, Marja Van Waes
Details
install.log (159.96 KB, text/plain)
2011-09-03 15:48 CEST, Marja Van Waes
Details
stage1.log (4.76 KB, text/plain)
2011-09-03 15:49 CEST, Marja Van Waes
Details
report.bug.xz with DrakX v. 16.79 (240.39 KB, application/x-xz)
2015-04-07 23:39 CEST, Marja Van Waes
Details
screenshot of free space on rescue partition selected (97.87 KB, image/png)
2015-04-07 23:40 CEST, Marja Van Waes
Details
only 2,9GB on a 7,2GB partition selected (screenshot) (101.64 KB, image/png)
2015-04-07 23:43 CEST, Marja Van Waes
Details
detect Lenovo recovery as such (929 bytes, patch)
2015-04-13 13:23 CEST, Thierry Vignaud
Details | Diff
we should ignore ESP too for that matter... (839 bytes, patch)
2015-04-13 13:24 CEST, Thierry Vignaud
Details | Diff

Description Marja Van Waes 2011-05-21 22:05:24 CEST
Description of problem:


Mageia dvd-1-rc x86_64 

When I let installer choose, it chooses the way too tiny bit of free space on the Lenovo restore partition "Q" of my Thinkpad SL510 instead of the much more than 100 GB of free space on the Windows partition "C", to install Mageia.

However, choosing myself worked fine.

How reproducible:

I gave installer two chances and it flunked it twice


Steps to Reproduce:
1. Take a Lenovo Thinkpad SL510 with a restore partition
2. start it with a Mageia dvd-1-rc x 86_64
3. Let installer pick the free space to install Mageia on
Marja Van Waes 2011-05-22 08:28:10 CEST

CC: (none) => m.van.waes

Ahmad Samir 2011-06-16 21:27:35 CEST

Source RPM: (none) => drakx-installer-stage2

Thierry Vignaud 2011-08-09 12:07:43 CEST

CC: (none) => thierry.vignaud
Assignee: bugsquad => pterjan

Comment 1 Marja Van Waes 2011-09-03 15:47:46 CEST
Created attachment 752 [details]
ddebug.log

When I made this bug report, I didn't know that I should add /root/drakx/report.bug.gz. I don't have that file anymore, but I do still have ddbug.log1, install.log1 and stage1.log1, all from the day I installed Mageia rc.

I'll attach them
Comment 2 Marja Van Waes 2011-09-03 15:48:36 CEST
Created attachment 753 [details]
install.log
Comment 3 Marja Van Waes 2011-09-03 15:49:10 CEST
Created attachment 754 [details]
stage1.log
Manuel Hiebel 2011-09-03 15:58:00 CEST

Attachment 752 mime type: application/octet-stream => text/plain

Manuel Hiebel 2011-09-03 15:58:16 CEST

Attachment 753 mime type: application/octet-stream => text/plain

Manuel Hiebel 2011-09-03 15:58:29 CEST

Attachment 754 mime type: application/octet-stream => text/plain

Comment 4 Marja Van Waes 2011-09-03 21:49:21 CEST
Today I wanted to see whether there is any difference between rc and Mageia, so I used the free space on Windows D for a second Mageia install, first I started with Mageia rc, I stopped when in the partitioning screen, then I installed Mageia 1 official.

I had already noticed, after installing rc in May, that the restore partition seemed to have shrunk, but I hadn't noticed yet that the free space of that partition had become an empty partition, size 949 MB, running from cylinder 30280 to 30400

Installer still checks the box before the worst option: to use this free space for install, there is no difference between Mageia 1 rc and Mageia 1 official in this respect.

This doesn't happen on 4 other systems with a rescue partition that we own, it only occurs with this ThinkPad SL510
Comment 5 Marja Van Waes 2011-09-03 21:50:35 CEST
and of course I started from the beginning, when installing Mageia 1 official ;)
Marja Van Waes 2011-09-03 22:48:47 CEST

Source RPM: drakx-installer-stage2 => drakx-installer-stage2-13.53

Marja Van Waes 2011-09-04 10:52:25 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=2610

Comment 6 Marja Van Waes 2011-09-04 12:34:12 CEST
If the later logfiles I uploaded don't show the original situation (before the free space on the recovery partition was converted into a very small empty partition), than I think this bug should be treated the same as bug 2610.
Comment 7 Marja Van Waes 2011-12-29 20:36:39 CET
@ pterjan

Please set status to ASSIGNED or, if for work flow reasons you can't do that, put OK on the whiteboard instead.

Is there any additional information you'd like to have? I didn't install Mga2a2 on this laptop yet, but I don't mind doing that if that would help.
Comment 8 Marja Van Waes 2012-01-27 11:58:56 CET
@ pterjan

I was going to offer you to make a copy of that recovery partition, while in Brussels, in case you need more information about such partitions to be able to tell installer to ignore them.

But did I corrupt it when adding the 1 GB that was taken from it?
It now has (according to diskdrake):

Volume label: Lenovo_Recovery
<snip>
Type: NTFS-3G
Size: 11GB (5%)

I don't understand the 5% after adding 1GB of empty space to a filled-to-the-brim partition.

Anyway, if you don't need it, I'll probably only take my old laptop with me.
Comment 9 Marja Van Waes 2012-01-27 13:06:07 CET
It looks like I mixed up diskdrake percentages with df ones. In df the % means used space, and apparently diskdrake talks about available space. And the empty space I added back was a bit less than 1 GB, that brings it closer to that 5%.
Comment 10 Thierry Vignaud 2012-01-27 13:54:27 CET
No, that's 5% of your hard disk
Comment 11 Marja Van Waes 2012-05-09 15:23:42 CEST
Closing as old because I can't test whether this bug is still valid, this system runs 24/7

Besides, not one newbie reported having this issue and getting confused by it.

Status: NEW => RESOLVED
Resolution: (none) => OLD

Comment 12 Marja Van Waes 2015-04-07 22:39:28 CEST
(In reply to Marja van Waes from comment #11)
> Closing as old because I can't test whether this bug is still valid, this
> system runs 24/7
> 
> Besides, not one newbie reported having this issue and getting confused by
> it.

Well, it is still valid, I justed started to test using free space on a windows partition, to see whether bug 15589 is valid on non-gpt disks, too.

However, the doPartitionDisk screen shows the little free space on the recovery partition as chosen to install Mageia to, instead of the ample amount of free space on the main windows partition.

So I continued with custom partitioning, instead.

I'll attach screenhots of the doPartitionDisk screen + new report.bug.xz after finishing install

Status: RESOLVED => REOPENED
Resolution: OLD => (none)
Source RPM: drakx-installer-stage2-13.53 => drakx-installer-stage2-16.78 or 16.79
Whiteboard: (none) => 5RC

Comment 13 Marja Van Waes 2015-04-07 23:39:13 CEST
Created attachment 6215 [details]
report.bug.xz with DrakX v. 16.79

Attachment 752 is obsolete: 0 => 1
Attachment 753 is obsolete: 0 => 1
Attachment 754 is obsolete: 0 => 1

Comment 14 Marja Van Waes 2015-04-07 23:40:38 CEST
Created attachment 6216 [details]
screenshot of free space on rescue partition selected
Comment 15 Marja Van Waes 2015-04-07 23:43:16 CEST
Created attachment 6217 [details]
only 2,9GB on a 7,2GB partition selected (screenshot)
Marja Van Waes 2015-04-07 23:44:54 CEST

Source RPM: drakx-installer-stage2-16.78 or 16.79 => drakx-installer-stage2-16.79-1.mga5

Comment 16 Barry Jackson 2015-04-08 00:05:59 CEST
I have also reported this same problem as part of:
https://bugs.mageia.org/show_bug.cgi?id=15482
(UEFI installer makes bad partition choices with "use free space" option)

CC: (none) => zen25000

Comment 17 Marja Van Waes 2015-04-09 13:18:35 CEST
Maybe installer just selects the windows partition on the highest partition number?

This morning, when I installed to a system with the rescue partition on sda1, installer selected the correct partition (sda2 in this case).
Comment 18 Marja Van Waes 2015-04-09 13:47:54 CEST
(In reply to Marja van Waes from comment #17)
> Maybe installer just selects the windows partition on the highest partition
> number?
> 
> This morning, when I installed to a system with the rescue partition on
> sda1, installer selected the correct partition (sda2 in this case).

report.bug.xz for this _correct_ selection is attachment 6226 [details] of bug 15663
Comment 19 Marja Van Waes 2015-04-13 08:31:17 CEST
(In reply to Marja van Waes from comment #17)
> Maybe installer just selects the windows partition on the highest partition
> number?
> 

If so, then not with Live installer (KDE LiveDVD  from april 10 2015): there the normal windows partition was chosen
Comment 20 Marja Van Waes 2015-04-13 08:32:11 CEST
(which is on a partiton with a lower partition number)
Comment 21 Pascal Terjan 2015-04-13 08:54:27 CEST
Reading the code:

1/ Partitions get ignored if after resizing there will not be enough space to install (650MB)
2/ The installer computes the suggested new size ($part->{req_size}) for each window partition. That means removing 10% of the windows partition, up to 6G, or less if there is not enough space.
3/ The installer selects the one with the largest $part->{req_size}, which means the one where windows will have most space left if selecting default resizing.

If you have one 100G partition with 1G free and one 50G partition with 40G free, we will select the first one as req_size will be 99G vs 44G for the second one.

We probably want to use the one with most space that can be used instead ($part->{size} - $part->{min_win}).
Comment 22 Marja Van Waes 2015-04-13 10:38:35 CEST
I might misunderstand 
> 2/ The installer computes the suggested new size ($part->{req_size}) for each
> window partition. That means removing 10% of the windows partition, up to 6G,
> or less if there is not enough space.
https://bugs.mageia.org/attachment.cgi?id=6217
2,9GB of a 7,2GB rescue partition got selected
the windows partition was 286,7GB At least 186,7 GB, but probably over 200GB had been Mageia 4 and Mageia cauldron partitions that were re-added to the windows partition before install.... so at least 186,7 GB was unused space on a windows partition.

Or does, what is shown in the doPartitionDisks screen, no longer reflect which windows partition will be resized (and how much)?

How much time would it take to probe how much free space is really available on a windows partition _before_ the doPartitionDisks screen shows the options?

On a different system, with text installer, I found that the probing is only done afterwards. I deliberately agreed with the default there to resize a huge windows partition to only a few MBs, to see what would happen. Only then was the probing started, it errored out, because windows needed more space than that.

cc'ing lebarhon, because this is also about bug 15589

CC: (none) => lebarhon

Comment 23 Thierry Vignaud 2015-04-13 13:22:52 CEST
(In reply to Marja van Waes from comment #12)
> However, the doPartitionDisk screen shows the little free space on the
> recovery partition as chosen to install Mageia to, instead of the ample
> amount of free space on the main windows partition.

Your recovery partition isn't detected as such b/c it uses a regular NTFS. partition type
Comment 24 Thierry Vignaud 2015-04-13 13:23:29 CEST
Created attachment 6255 [details]
detect Lenovo recovery as such

this should help
Comment 25 Thierry Vignaud 2015-04-13 13:24:06 CEST
Created attachment 6256 [details]
we should ignore ESP too for that matter...
Comment 26 Pascal Terjan 2015-04-13 13:59:00 CEST
(In reply to Marja van Waes from comment #22)
> I might misunderstand 
> > 2/ The installer computes the suggested new size ($part->{req_size}) for each
> > window partition. That means removing 10% of the windows partition, up to 6G,
> > or less if there is not enough space.
> https://bugs.mageia.org/attachment.cgi?id=6217

Wow that's bad, we should not to scroll and there are ugly separators between partitions. I can't see the one to resize on the screenshot.

> 2,9GB of a 7,2GB rescue partition got selected
> the windows partition was 286,7GB At least 186,7 GB, but probably over 200GB
> had been Mageia 4 and Mageia cauldron partitions that were re-added to the
> windows partition before install.... so at least 186,7 GB was unused space
> on a windows partition.

That is strange, it should have selected the large, even if it had less space than the samll one.

> Or does, what is shown in the doPartitionDisks screen, no longer reflect
> which windows partition will be resized (and how much)?
>
> How much time would it take to probe how much free space is really available
> on a windows partition _before_ the doPartitionDisks screen shows the
> options?

The partitioning wizard uses the space that will really be available after resize.

I believe text mode is different and just gives you the list of partitions to select from, without sorting them inany way or checking how much they can be shrunked.
 
> On a different system, with text installer, I found that the probing is only
> done afterwards. I deliberately agreed with the default there to resize a
> huge windows partition to only a few MBs, to see what would happen. Only
> then was the probing started, it errored out, because windows needed more
> space than that.
> 
> cc'ing lebarhon, because this is also about bug 15589
Rémi Verschelde 2015-04-13 22:39:05 CEST

CC: (none) => rverschelde

Comment 27 Marja Van Waes 2015-04-13 22:45:39 CEST
Thanks, Thierry, this  bug is fixed :-)
Comment 28 Marja Van Waes 2015-04-13 22:46:06 CEST
now really closing

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED

Comment 29 André DESMOTTES 2015-04-15 18:51:06 CEST
Bug still valid with Mageia-5-RC-LiveDVD-KDE4-i586-DVD round 8
Comment 30 Marja Van Waes 2015-04-21 22:30:50 CEST
(In reply to André DESMOTTES from comment #29)
> Bug still valid with Mageia-5-RC-LiveDVD-KDE4-i586-DVD round 8

pterjan's fixes are included in round 9

If that doesn't fix bug 15589 for you, then please reopen that report.

If you are talking about a not correctly identified recovery partition: please reopen this report if that's a Lenovo_Recovery partition. 

If it's a recovery partition with a different label, then please tell which label it has.

Summary: installer chooses too little free space on wrong partition => installer chooses too little free space on wrong partition (on the recovery partition)


Note You need to log in before you can comment on or make changes to this bug.