Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1060272

Summary: EFI variable doesn't appear to respect --reset-mbr, leading to error
Product: [Fedora] Fedora Reporter: abrouwers
Component: livecd-toolsAssignee: Brian Lane <bcl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: abrouwers, adam.stokes, bcl, bruno, dhuff, Jasper.Hartline, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-15 15:30:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
livecd log none

Description abrouwers 2014-01-31 15:59:27 UTC
Description of problem:

I was trying to wipe away a USB key, and create an EFI bootable installer image.  I passed --efi, along with --reset-mbr, but parted appears to not be passing the correct naming:

[root@thinkpad Downloads]# /bin/bash ./livecd.sh --reset-mbr --noverify --format --efi Fedora-20-x86_64-netinst.iso /dev/sdb
WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!!
Press Enter to continue or ctrl-c to abort

/dev/sdb: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdb: 8 bytes were erased at offset 0x776ffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdb: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdb: calling ioclt to re-read partition table: Success
Waiting for devices to settle...
mkfs.fat 3.0.25 (2014-01-17)
Partition name must be 'EFI System Partition'
This can be set in parted or you can run with --reset-mbr



As can be seen from my command, I did indeed issue --reset-mbr (also omitting --reset-mbr fails equally), yet parted does not name the partition properly.

Comment 1 Brian Lane 2014-01-31 21:48:49 UTC
What version are you using? And why is it named livecd.sh and not livecd-iso-to-disk?

This works fine for me with livecd-tools-20.1-1.fc20.x86_64

If you are using the latest version and it is still a problem could you attach the output from:

bash -x ./livecd.sh --reset-mbr --noverify --format --efi Fedora-20-x86_64-netinst.iso /dev/sdb |& tee livecd.log

Output from parted -s /dev/sdb p would also be helpful.

Comment 2 abrouwers 2014-05-14 22:04:25 UTC
Created attachment 895658 [details]
livecd log

Comment 3 abrouwers 2014-05-14 22:05:04 UTC
Sorry for the delay; here's the parted output.  This is on archlinux, btw:

[ajb@thinkpad Downloads]$ sudo /usr/bin/parted -s /dev/sdb p
Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 2004MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2002MB  2001MB  fat32              boot

Comment 4 Brian Lane 2014-05-15 15:30:11 UTC
It looks like arch has a bug in parted. The script runs:

/sbin/parted -s /dev/sdb u MB mkpart '"EFI System Partition"' fat32 1 2002 set 1 boot on

Which sets the Name and it looks like it wasn't actually written. I'd open a bug with arch. You should be able to reproduce it easily for them with the cmdline above.

Comment 5 abrouwers 2014-05-15 16:00:36 UTC
I figured that since arch's parted didn't do any unique patching, that it would have been distro-agnostic.  Sorry for the noise!