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 - EFI variable doesn't appear to respect --reset-mbr, leading to error
Summary: EFI variable doesn't appear to respect --reset-mbr, leading to error
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-31 15:59 UTC by abrouwers
Modified: 2014-05-15 16:00 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-05-15 15:30:11 UTC

Attachments (Terms of Use)
livecd log (deleted)
2014-05-14 22:04 UTC, abrouwers
no flags Details

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 ./ --reset-mbr --noverify --format --efi Fedora-20-x86_64-netinst.iso /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 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 ./ --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!

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