Bug 134468

Summary: Yast doesn't correctly handle installs with existing EFI partitions
Product: [openSUSE] SUSE Linux 10.1 Reporter: Tony Jones <tonyj>
Component: InstallationAssignee: Thomas Fehr <fehr>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: gp, rw
Version: Alpha 3   
Target Milestone: ---   
Hardware: IA64   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Log of install including default partition suggestion

Description Tony Jones 2005-11-18 20:27:33 UTC
Installing onto a disk with an existing partition table of the form:
 Disk geometry for /dev/sdb: 0kB - 36GB
 Disk label type: gpt
 Number  Start   End     Size    File system  Name                  Flags
 1       17kB    200MB   200MB   fat32
 2       200MB   36GB    36GB    ext3

Yast makes the following initial suggestion:
 Delete partition sdb2 (33.7 GB)
 Create boot partition /dev/sdb2 (203.9 MB) with vfat
 Create swap partition /dev/sdb3 (1.0 GB)
 Create root partition /dev/sdb4 (32.5 GB) with reiserfs
 Use /dev/sda3 as swap
 Set mount point of /dev/sdb1 to /windows/C

It's handling of the existing sdb1 partition is incorrect.
Comment 1 Jiri Srain 2005-11-21 08:34:37 UTC
Attach the logs, please.
Comment 2 Tony Jones 2005-11-22 18:52:35 UTC
Created attachment 58125 [details]
Log of install including default partition suggestion

Just re-ran install

2005-11-22 10:13:31 <1> linux(2101) [Interpreter] clients/inst_proposal.ycp:171 Called YaST client returned: $["preformatted_proposal": Delete partition sdb2 (33.7 GB) Create boot partition /dev/sdb2 (203.9 MB) with vfat Create swap partition /dev/sdb3 (1.0 GB) Create root partition /dev/sdb4 (32.5 GB) with reiserfs Use /dev/sda3 as swap Set mount point of /dev/sdb1 to /windows/C"]

sdb1 should have been deleted and reinitalized as EFI, not mounted as /windows/C

See full log attached.
Comment 3 Arvin Schnell 2005-11-23 11:21:20 UTC
We require a minimal size of 200k for the boot partition on IA64.
Both sda1 and sdb1 are too small.  That's why a new boot partition
is created.  Maybe the proposal is not perfect in your case but
you can easily change it to your needs.
Comment 4 Tony Jones 2005-11-23 17:07:43 UTC
Assume you mean 200meg, not 200k.   Anyways, have you considered emitting some kind of diagnostic/message in this case?
Comment 5 Tony Jones 2006-01-25 20:01:57 UTC
As an update to this bug, in SLES10P4 it is still not working correctly.

In SLES10P3 there was a problem (missing kernel module) so that the EFI partition CONSTRUCTED BY YAST could not be mounted (after it was created) and the install would fail.

On a subsequent install (SLES10P3 and SLES10P4) you do not reuse the old EFI, rather you create a new one right after it.   

If you find a correctly sized FAT partition, mount it, if it has an EFI structure, use it.
Comment 6 Thomas Fehr 2006-01-26 10:15:29 UTC
It is correct the we create a new EFI if the dicovered one in below 200 MB.
We will not change this, since there are serious consequences if /boot/efi
goes out of space during install. If we discover a correctly sized FAT
partition it should be used for /boot/efi.

The proposal code was completely rewritten with beta#1, the previews still 
contained basically the proposal code of SLES9.

Please retest with beta#2 or newer and reopen if you still encounter problems.
Comment 7 Raymund Will 2006-01-26 10:28:49 UTC
Thomas, would it be "easy" to make the check less strict?

Like accepting FAT partitions which are at least 90% of our "recommended"
size (200 MB).  That way "MB != MiB" and other "rounding" errors  couldn't
kick in as fast.  (IIRC YaST didn't even accept EFI partitions it proposed
and created itself...)
Comment 8 Thomas Fehr 2006-01-26 10:50:29 UTC
Since we always use multiples of disk cylinders it happens anyway that
the created partition is mostly a little larger than the needed size.

But anyway the above is a good idea I just chnange the required size 
for IA64 to be 90% of created size (200MB).
Comment 9 Tony Jones 2006-01-26 16:45:06 UTC
I wasn't asking for 90% checking or support for smaller than recommended (though I think this is a good idea -- though clearly not good enough for the first time the bug was filed)

If you read comment #5 again you'll see that Yast was not reusing a _correctly_ sized EFI partition.  One that Yast itself had previously made (200MB).

I'll retry it on beta1 and reopen as necessary.
Comment 10 Thomas Fehr 2006-01-26 17:17:34 UTC
If possible, retry with beta#2 it was published today.

If course it is a bug if YaST2 does not reuse a correctly sized EFI partition
on a disk it install to.

Be sure to attach files from /var/log/YaST2 if there is still a problem.