Bug 1014783 - The efi and root ('/') partition types are incorrect for a disk image made using livemedia-creator
The efi and root ('/') partition types are incorrect for a disk image made us...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
aarch64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 15:11 EDT by D. Marlin
Modified: 2014-10-08 18:42 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-08 18:42:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description D. Marlin 2013-10-02 15:11:59 EDT
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 15:13:56 EDT
Created attachment 806688 [details]
Kickstart file used for testing.
Comment 2 D. Marlin 2013-10-02 15:15:05 EDT
Created attachment 806689 [details]
storage log from lmc test run.
Comment 3 D. Marlin 2013-10-02 15:18:26 EDT
Created attachment 806690 [details]
anaconda log for test run.
Comment 4 D. Marlin 2014-02-14 13:35:04 EST
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 17:03:49 EST
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-20 20:56:55 EST
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-20 21:58:11 EST
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 18:42:14 EDT
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.