Bug 1444530 - Using --efi returns a "label too long" error
Summary: Using --efi returns a "label too long" error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-21 14:29 UTC by Peter Larsen
Modified: 2017-08-28 13:40 UTC (History)
9 users (show)

Fixed In Version: livecd-tools-24.4-1.fc26 livecd-tools-24.4-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-14 20:17:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github livecd-tools livecd-tools issues 59 0 None None None 2017-04-22 20:17:39 UTC

Description Peter Larsen 2017-04-21 14:29:57 UTC
Description of problem:
When creating livecd images using livecd-iso-to-disk, you get a fatlabel:labels can not be longer than 11 characters error.

sudo livecd-iso-to-disk --noverify --format --reset-mbr --efi --overlay-size-mb 1024 --home-size-mb 2048 --unencrypted-home --msdos  some.iso /dev/sdc

    WARNING: This will DESTROY All DATA on: /dev/sdc !!

        Press Enter to continue, or Ctrl C to abort.

/dev/sdc: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 8 bytes were erased at offset 0x3a4fffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdc: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdc: calling ioctl to re-read partition table: Success
Waiting for devices to settle...
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
fatlabel: labels can be no longer than 11 characters
Cleaning up to exit...

The label created is:
sudo parted /dev/sdc print
Model: UFD 3.0 Silicon-Power16G (scsi)
Disk /dev/sdc: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      4194kB  15.7GB  15.6GB  fat32        EFI System Partition  boot, esp

If you try to force the label to a different value, you get an error that the label MUST be "EFI System Partition". 

Version-Release number of selected component (if applicable):
rpm -q livecd-tools
livecd-tools-24.3-2.fc25.x86_64


How reproducible:
Run the above command - run with --efi enabled and I've had no successful run so it's reproducing every time.

Comment 1 Frederick Grose 2017-04-24 01:19:07 UTC
See https://github.com/livecd-tools/livecd-tools/pull/60

You might avoid this bug by using the --label option.

(Aside, --msdos is redundant with --efi in livecd-iso-to-disk currently.)

Comment 2 Peter Larsen 2017-04-24 02:20:19 UTC
(In reply to Frederick Grose from comment #1)
> See https://github.com/livecd-tools/livecd-tools/pull/60
> 
> You might avoid this bug by using the --label option.
> 
> (Aside, --msdos is redundant with --efi in livecd-iso-to-disk currently.)

There's a constraint enforced by livecd-iso-to-disk requiring the label of the EFI partition to be "EFI System Partition". Also note, that --label is used for the data partition, not the EFI partition. That's true for --msdos too. EFI can only be vfat by definition.

Comment 3 Neal Gompa 2017-04-24 05:48:01 UTC
(In reply to Peter Larsen from comment #2)
> (In reply to Frederick Grose from comment #1)
> > See https://github.com/livecd-tools/livecd-tools/pull/60
> > 
> > You might avoid this bug by using the --label option.
> > 
> > (Aside, --msdos is redundant with --efi in livecd-iso-to-disk currently.)
> 
> There's a constraint enforced by livecd-iso-to-disk requiring the label of
> the EFI partition to be "EFI System Partition". Also note, that --label is
> used for the data partition, not the EFI partition. That's true for --msdos
> too. EFI can only be vfat by definition.

ESP isn't technically vfat (though it is derived from it) as it has its own filesystem type defined in the UEFI spec. Do we need to set the proper fs type when we're creating the partition? Maybe it has slightly different rules...

Comment 4 Frederick Grose 2017-04-24 21:14:39 UTC
I reproduced Peter's symptoms with a device that has/had a long filesystem label with an ext4 or btrfs volume.

Because commit 34c52bc68a9f7ee82293215943c565c04a483abc introduced code to preserve the original label, it neglected logic to recognize the truncation of the label by mkfs.fat to 11 bytes and to update the held variable for later comparison.

The patch provided in https://github.com/livecd-tools/livecd-tools/pull/60 provides the missing logic.  With this patch, the requested installation completes successfully.

Peter should be able to confirm if it works.

Comment 5 Fedora Update System 2017-05-08 04:59:42 UTC
livecd-tools-24.4-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6d5aa85fd7

Comment 6 Fedora Update System 2017-05-08 05:00:26 UTC
livecd-tools-24.4-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7076993b7d

Comment 7 Fedora Update System 2017-05-09 00:46:12 UTC
livecd-tools-24.4-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6d5aa85fd7

Comment 8 Fedora Update System 2017-05-09 02:38:25 UTC
livecd-tools-24.4-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7076993b7d

Comment 9 Fedora Update System 2017-05-14 20:17:27 UTC
livecd-tools-24.4-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-05-26 04:02:23 UTC
livecd-tools-24.4-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Peter Larsen 2017-08-28 13:40:57 UTC
Clearing "needinfo" since the patch is out and is working.


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