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
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2014-05-15 15:30:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
livecd log (5.87 KB, text/plain)
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 ./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!


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