Bug 1014783 - The efi and root ('/') partition types are incorrect for a disk image made using livemedia-creator
Summary: The efi and root ('/') partition types are incorrect for a disk image made us...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: aarch64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 19:11 UTC by D. Marlin
Modified: 2014-10-08 22:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-08 22:42:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Kickstart file used for testing. (4.21 KB, text/plain)
2013-10-02 19:13 UTC, D. Marlin
no flags Details
storage log from lmc test run. (120.96 KB, text/plain)
2013-10-02 19:15 UTC, D. Marlin
no flags Details
anaconda log for test run. (3.86 KB, text/plain)
2013-10-02 19:18 UTC, D. Marlin
no flags Details

Description D. Marlin 2013-10-02 19:11:59 UTC
Description of problem:

The efi and root ('/') partition types are incorrect for a disk image made using livemedia-creator with novirt for an EFI system.  This was tested on an aarch64 simulator running in EFI mode.


Version-Release number of selected component (if applicable):

anaconda-19.30.13-1.fc19
lorax-19.5-1.fc19
python-blivet-0.17-1.fc19


How reproducible:

Consistently.


Steps to Reproduce:
1. make a livemedia-creator disk image:

  livemedia-creator \
     --no-virt --make-disk \
     --ks=./F19-aarch64-efi.ks

2. check the partition types of the resulting image:

  parted -s /var/tmp/disk<string>.img p


3.


Actual results:

Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Model:  (file)
Disk /var/tmp/diskknyEig.img: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  106MB   105MB   fat16
 2      106MB   10.2GB  10.1GB  ext4
 3      10.2GB  12.3GB  2097MB  linux-swap(v1)

Note: the Name and Flags are blank.


Expected results:

Model:  (file)
Disk /var/tmp/diskknyEig.img: 12.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name              Flags
 1      1049kB  106MB   105MB   fat16        EFI System        boot
 2      106MB   10.2GB  10.1GB  ext4         Linux filesystem
 3      10.2GB  12.3GB  2097MB  linux-swap(v1)


Additional info:

Comment 1 D. Marlin 2013-10-02 19:13:56 UTC
Created attachment 806688 [details]
Kickstart file used for testing.

Comment 2 D. Marlin 2013-10-02 19:15:05 UTC
Created attachment 806689 [details]
storage log from lmc test run.

Comment 3 D. Marlin 2013-10-02 19:18:26 UTC
Created attachment 806690 [details]
anaconda log for test run.

Comment 4 D. Marlin 2014-02-14 18:35:04 UTC
As of:

  anaconda-19.31.56-1.1.sa1.1.aarch64
  lorax-19.6.18-1.sa1.1.aarch64
  python-blivet-0.18.23-1.sa1.1.noarch


the EFI partition is correct, but the ext4 partitions (2 and 4, /boot and '/') are not:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI System Partition
   2          206848         1026047   400.0 MiB   0700
   3         1026048         5122047   2.0 GiB     8200
   4         5122048        24373247   9.2 GiB     0700


I believe they should be:

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI System Partition
   2          206848         1026047   400.0 MiB   8300  Linux filesystem
   3         1026048         5122047   2.0 GiB     8200  Linux swap
   4         5122048        24373247   9.2 GiB     8300  Linux filesystem

Comment 5 Brian Lane 2014-02-20 22:03:49 UTC
The problem is that you have skipped installing a bootloader, so it doesn't set the boot flag on the /boot/efi/ partition you create. On EFI you obviously cannot setup the bootloader since efibootmgr will likely modify the host so for now you can probably work around it in %post by setting the boot flag using parted.

The EFI System Partition name is also set by the same code, so it won't be there when skipping the bootloader.

The names for the other partitions have never been set by anaconda.

Comment 6 D. Marlin 2014-02-21 01:56:55 UTC
We are now installing the bootloader (grub2-efi), and as I mentioned in comment #4 the EFI partition is now correct.

The ext4 partitions, however, still use Code 0700 instead of the Linux Filesystem Code 8300.

On some older systems I have checked, the Code looks correct, i.e., 

(on F17)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1026047   500.0 MiB   8300  Linux filesystem
   2         1026048       976773119   465.3 GiB   8E00  Linux LVM

(on rhel6.4)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1026047   500.0 MiB   8300  Linux filesystem
   2         1026048       488396799   232.4 GiB   8E00  Linux LVM


but on rhel7.0 Beta - x86_64 (EFI):

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System Partition
   2          411648         1435647   500.0 MiB   0700
   3         1435648        83359743   39.1 GiB    8E00
   4        83359744       975699934   425.5 GiB   8300


So this does not appear to be livemedia-creator or aarch64 specific (but possibly EFI system specific).  Do I need to open a different BZ for this?

Comment 7 Brian Lane 2014-02-21 02:58:11 UTC
That should depend on what you are installing from. parted in rhel7 does not have the new linux GUID support, that was added in rawhide (F21) parted-3.1-14

Comment 8 Brian Lane 2014-10-08 22:42:14 UTC
This should be working fine for F21 and rawhide.


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