Bug 750228 - F16 RC2 efidisk.img doesn't boot on ThinkPad T520, older one works
F16 RC2 efidisk.img doesn't boot on ThinkPad T520, older one works
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Gracik
Fedora Extras Quality Assurance
AcceptedBlocker
:
Depends On:
Blocks: F16Blocker/F16FinalBlocker
  Show dependency treegraph
 
Reported: 2011-10-31 08:06 EDT by Charles R. Anderson
Modified: 2013-07-04 08:59 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-03 13:02:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Charles R. Anderson 2011-10-31 08:06:02 EDT
Description of problem:

The latest Fedora 16 Final RC2 efidisk.img doesn't boot on ThinkPad T520.  An earlier Fedora 16 TC efidisk.img does boot fine.  A comparison of the images suggests that the working one has some "mkdosfs" stuff in it, whereas the failing one does not.  The symptoms are that the failing one just returns to the BIOS bootloader menu after poking at the USB.  Many repeated attempts fail, including rewriting the image just to be sure.  The same exact USB stick works with the older efidisk.img.

Working one from around October 23:

>sha256sum efidisk.img
1aaf74fa23ac748a586cd28f8d0e09d9f5bbe59981aa553550cafda269f270eb  efidisk.img
>strings efidisk.img
EFI PART
mkdosfs
ANACONDA   FAT16   
This is not a bootable disk.  Please insert a bootable floppy and
press any key to try again ...

Failing one from RC2:

>sha256sum efidisk.img
728d09398b6808eb7fe0adbceae20be3b793946f1ec310433139039184ce7392  efidisk.img
>strings efidisk.img
EFI PART
EFI PART
Comment 1 Charles R. Anderson 2011-10-31 08:14:51 EDT
I've identified the working efidisk.img as being the one from TC2.
Comment 2 Charles R. Anderson 2011-10-31 08:18:28 EDT
Out of these images:

-rw-rw-r--. 1 root 101737 140613632 Oct 20 12:47 efidisk-tc2.img
-rw-rw-r--. 1 root 101737 140789760 Oct 27 14:05 efidisk-tc3.img
-rw-rw-r--. 1 root 101737 140756992 Oct 29 02:53 efidisk-rc1.img
-rw-rw-r--. 1 root 101737 140781568 Oct 29 22:21 efidisk-rc2.img

ae9c490627be00b5c24a1a2d21d7f54a4a323cfaaa294b95a017bed3d929d493  efidisk-rc1.img
728d09398b6808eb7fe0adbceae20be3b793946f1ec310433139039184ce7392  efidisk-rc2.img
1aaf74fa23ac748a586cd28f8d0e09d9f5bbe59981aa553550cafda269f270eb  efidisk-tc2.img
fe3e88a5155f99963a6ffad657c67abbefc34379c353bc9dc838610ac8e00466  efidisk-tc3.img

RC1 and TC2 have the "mkdosfs" signature:

# grep mkdos efidisk-*
Binary file efidisk-rc1.img matches
Binary file efidisk-tc2.img matches
Comment 3 Charles R. Anderson 2011-10-31 08:33:00 EDT
Confirmed that the RC1 image also works fine.  So it seems that efidisk.img works only if it has the "mkdosfs" signature in it.  TC2 & RC1 work, TC3 & RC2 fail.
Comment 4 Martin Gracik 2011-10-31 08:43:05 EDT
The last version of lorax is from October 17, and nothing has changed since then, so it's strange that rc1 which is newer that tc3 works, but rc2 doesn't.
Comment 5 Charles R. Anderson 2011-10-31 08:58:31 EDT
Perhaps something different in the environment that is running lorax then?  Where can one find the logs of the compose that was done for each release?
Comment 6 Adam Williamson 2011-10-31 12:21:19 EDT
Discussed at 2011-10-31 blocker review meeting. Accepted as a blocker per criterion "Where platform support exists, all dedicated installer images (except efidisk.img, which offers no options) must boot to the graphical boot menu and allow the user to select install options. If no option is selected, the installer should load after a reasonable timeout" . Will talk to releng and try and figure out what they did differently in the working/broken composes. We will need an RC3 for one other blocker, so will fix this at the same time.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 7 Adam Williamson 2011-10-31 12:56:26 EDT
Well, we're a bit confused about this.

Here's the generation log from RC1:

http://fpaste.org/wJRS/

and RC2:

http://fpaste.org/hDjy/

as you can see, there's almost no difference...



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 8 Charles R. Anderson 2011-10-31 13:22:59 EDT
How does efiboot.img relate to efidisk.img?  I wonder when to use one vs. the other.  But this bug is about efiDISK.img, so the above fpastes don't help, unless efiboot.img somehow contributes to the contents of efidisk.img.
Comment 9 Adam Williamson 2011-10-31 13:28:58 EDT
yeah, we just noticed that. hold a sec.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 10 Charles R. Anderson 2011-10-31 18:00:46 EDT
We've determined that the efidisk.img is almost entirely zeros (140MB of zeros) after the partition table.  Something is going wrong when lorax copies the efiboot.img contents into the partition on the newly created efidisk.img, but only sometimes.


    def create_efidisk(self, efiboot):
        efidisk = joinpaths(self.workdir, "efidisk.img")
        if os.path.isfile(efidisk):
            os.unlink(efidisk)

...


        with open(efiboot, "rb") as f_from:
            with open("{0}p1".format(dmdev), "wb") as f_to:
                efidata = f_from.read(1024)
                while efidata:
                    f_to.write(efidata)
                    efidata = f_from.read(1024)
Comment 11 Charles R. Anderson 2011-10-31 18:02:06 EDT
That was /usr/lib/python2.7/site-packages/pylorax/__init__.py

As a workaround, I was successful in using:

livecd-iso-to-disk --efi --format --reset-mbr boot.iso /dev/sdX

to install RC2 in EFI mode on my ThinkPad T520.
Comment 12 Václav Mocek 2011-10-31 23:39:14 EDT
Charles: You are lucky.

$ sudo livecd-iso-to-disk --efi --format --reset-mbr boot.iso /dev/sdb
Verifying image...
/home/vamo/Downloads/boot.iso:   b5c9eb0f10996d3e0cb97e9e776c3d43
Fragment sums: 11466c6aa9c7457a1fb7ed2a4a48ea7cd25ad56dfa4bd384d9177555bc63
Fragment count: 20
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!!
Press Enter to continue or ctrl-c to abort

Waiting for devices to settle...
mkdosfs 3.0.9 (31 Jan 2010)
1+0 records in
1+0 records out
16 bytes (16 B) copied, 7.4732e-05 s, 214 kB/s
/home/vamo/Downloads/boot.iso uses initrd.img w/o install.img
ERROR: This live image does not support EFI booting
Cleaning up to exit...
Comment 13 Adam Williamson 2011-11-01 00:25:03 EDT
[root@adam images]# livecd-iso-to-disk --format --reset-mbr --efi Fedora-16-x86_64-netinst.iso /dev/sdd
Verifying image...
/media/Sea500/images/Fedora-16-x86_64-netinst.iso:   b5c9eb0f10996d3e0cb97e9e776c3d43
Fragment sums: 11466c6aa9c7457a1fb7ed2a4a48ea7cd25ad56dfa4bd384d9177555bc63
Fragment count: 20
Press [Esc] to abort check.
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdd!!!
Press Enter to continue or ctrl-c to abort

2 bytes were erased at offset 0x438 (ext2)
they were: 53 ef
Waiting for devices to settle...
mkdosfs 3.0.11 (24 Dec 2010)
/media/Sea500/images/Fedora-16-x86_64-netinst.iso uses initrd.img w/o install.img
Copying DVD image to target device.
Updating boot config file
Installing boot loader
Target device is now set up with a Live image!




-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 14 Martin Gracik 2011-11-01 04:02:04 EDT
fpasting the logs is not a good idea, they are already expired now, so I can't take a look at them. Can you please attach them? Also the kickstart file with which the composes are made would help.
Comment 15 Václav Mocek 2011-11-01 06:17:43 EDT
Using F14-i686 livecd-tools, I can create bootable USB *only* if I make it from LiveCD. However, booting from such USB fails (Lenovo Ideapad S205).

See: https://bugzilla.redhat.com/show_bug.cgi?id=748272#c28
Comment 16 Mads Kiilerich 2011-11-01 06:29:24 EDT
(In reply to comment #15)
> Using F14-i686 livecd-tools, I can create bootable USB *only* if I make it from
> LiveCD. However, booting from such USB fails (Lenovo Ideapad S205).

You can't expect f14 livecd-tools to be able to create f16 live images. That would require backporting of all new development.
Comment 17 Václav Mocek 2011-11-01 06:34:05 EDT
So the user, having F14, basically can not create a bootable image to update the system to F16?

Does anybody verified, that it works on F15?
Comment 19 Charles R. Anderson 2011-11-01 08:43:25 EDT
The F16 livecd-iso-to-disk script is also on the F16 LiveCD image, so if you can loopback mount that, you can get the script to use on an older Fedora release (I didn't test it though).

LiveOS/livecd-iso-to-disk
Comment 20 Václav Mocek 2011-11-01 09:00:06 EDT
Mads Kiilerich: 
dd works if it is a hybrid image, which is case of all F16 images. It could boot from such USB, but not in *EFI mode*.
https://bugzilla.redhat.com/show_bug.cgi?id=748272#c24

Charles R. Anderson:
Thanks, I will try it.
Comment 21 Charles R. Anderson 2011-11-01 09:31:38 EDT
Can you put the Lenovo BIOS setting to "UEFI-Only" i.e. no Legacy Boot?  That might be necessary in order to boot a hybrid image in EFI-mode.  I'll be testing that shortly.
Comment 22 Václav Mocek 2011-11-01 10:46:46 EDT
Charles R. Anderson: 
No, it would be the first thing I would do. The new Lenovo Ideapad S205 doesn't have a legacy compatible mode, only UEFI is supported (Phoenix SecureCore Tiano). The older Lenovo ThinkPad X120e has it.
Comment 23 Václav Mocek 2011-11-01 11:07:31 EDT
Charles R. Anderson: regarding the Comment 19 - the loopback mount and the new livecd-iso-to-disk fail, because the F14's parted doesn't support option "legacy_boot on".

$ sudo ./livecd-iso-to-disk --format --reset-mbr --efi ../../Fedora-16-x86_64-netinst.iso /dev/sdb
Verifying image...
./livecd-iso-to-disk: line 799: checkisomd5: command not found
Are you SURE you want to continue?
Press Enter to continue or ctrl-c to abort

WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!!
Press Enter to continue or ctrl-c to abort

wipefs: WARNING: /dev/sdb: appears to contain 'gpt' partition table
Waiting for devices to settle...
mkdosfs 3.0.9 (31 Jan 2010)
parted: invalid token: legacy_boot
Comment 24 Brian Lane 2011-11-01 11:16:12 EDT
(In reply to comment #12)

> /home/vamo/Downloads/boot.iso uses initrd.img w/o install.img
> ERROR: This live image does not support EFI booting
> Cleaning up to exit...

This means that the source image you are using doesn't have EFI support on it. There were some problems with earlier F16 TC's missing EFI due to the change to grub2 for harddrive installs. Try a newer image and make sure it has the /EFI/ directory on it.

Also, older livecd-iso-to-disk versions *should* work to make newer media. If it doesn't, file a bug against livecd-tools with the image you used and the livecd-iso-to-disk version you are using and I'll fix it.
Comment 25 Brian Lane 2011-11-01 11:17:44 EDT
(In reply to comment #23)
> Charles R. Anderson: regarding the Comment 19 - the loopback mount and the new
> livecd-iso-to-disk fail, because the F14's parted doesn't support option
> "legacy_boot on".

The version of parted that supports this is still in testing, if you could grab it, give it a try and leave karma for it in koji I would appreciate it.
Comment 26 Václav Mocek 2011-11-01 11:39:05 EDT
Brian C. Lane, you say:

"This means that the source image you are using doesn't have EFI support on it."

It was the F14's livecd-iso-to-disk; I use F16 RC2, the same as Adam W., see the checksum.

I will try the new parted, but not sure if if it is everything - the script uses the host's syslinux:

resetMBR() {
...
if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
            cat /usr/lib/syslinux/gptmbr.bin > $device
...

In F14 might be too old ... I will see.
Comment 27 Adam Williamson 2011-11-01 11:41:49 EDT
RC3's efidisk.img worked in testing for me, anyone else?



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 28 Václav Mocek 2011-11-01 12:14:31 EDT
Brian C. Lane: parted was patched in F15, not in F14.
Comment 29 Václav Mocek 2011-11-01 12:15:03 EDT
RC3?!
Comment 30 Charles R. Anderson 2011-11-01 14:26:06 EDT
RC3 dd if=efidisk.img of=/dev/sdX works for me if I put BIOS setup into UEFI-only boot mode.

dd if=Fedora-16-x86_64-netinst.iso of=/dev/sdX doesn't work in EFI-mode for me, despite mjg59's cool hacks.  I tried UEFI-only mode in the BIOS setup, and it just fails to boot at all.  If I switch to Legacy-only mode in the BIOS setup, it boots fine but in BIOS-mode with syslinux, of course.  An install done that way will end up with a MBR partition table due to the Lenovo blacklist that was implemented in anaconda.

So it is good to keep efidisk.img around for Lenovo systems, at least.  Please don't deprecate it unless a fix is found for EFI on Lenovo.

Of course, we also have the less convenient workaround of using livecd-iso-to-disk --efi --format --reset-mbr Fedora-16-x86_64-netinst.iso /dev/sdX as well.  That works to boot the Lenovo in EFI mode.
Comment 31 Charles R. Anderson 2011-11-01 14:57:44 EDT
I installed Fedora 14, enabled updates-testing, yum update, and then:

yum install livecd-tools
livecd-iso-to-disk --efi --format --reset-mbr Fedora-16-x86_64-netinst.iso /dev/sdX

(using the livecd-iso-to-disk script from the Fedora 14 install, NOT from 16)

The result boots in EFI mode on my Lenovo ThinkPad T520.  So it looks like we have covered lots of ways to workaround the issues.
Comment 32 Adam Williamson 2011-11-01 15:01:20 EDT
cra: it's not really a 'workaround'. the correct way to write an EFI-bootable USB stick in Fedora is to use livecd-iso-to-disk --efi . dd is not recommended for doing it.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 33 Adam Williamson 2011-11-01 15:40:51 EDT
Discussed at 2011-11-01 emergency blocker review meeting. dgilmore is fairly sure he knows how to ensure valid efidisk.img gets produced now; RC3's was okay, and RC4's should be too. Leaving open just so we remember to check RC4.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 34 Charles R. Anderson 2011-11-01 18:44:03 EDT
http://tflink.fedorapeople.org/iso/20111101_preRc4.x64.boot.iso
http://tflink.fedorapeople.org/iso/20111101_preRc4.x64.boot.iso.sha256

efidisk.img looks fine, and boots fine to anaconda on ThinkPad T520, didn't do a full install test.
Comment 35 Václav Mocek 2011-11-01 19:21:42 EDT

(In reply to comment #31)
> I installed Fedora 14, enabled updates-testing, yum update, and then:
> 
> yum install livecd-tools
> livecd-iso-to-disk --efi --format --reset-mbr Fedora-16-x86_64-netinst.iso
> /dev/sdX
> 
> (using the livecd-iso-to-disk script from the Fedora 14 install, NOT from 16)
> 
> The result boots in EFI mode on my Lenovo ThinkPad T520.  So it looks like we
> have covered lots of ways to workaround the issues.


It doesn't work on F14 i686, I am still getting error (Comment 12): 

ERROR: This live image does not support EFI booting

I modified livecd-iso-to-disk in the place, where it detects if it is an EFI disk:

if [ -n "$efi" -a ! -d $CDMNT/EFI/boot ]; then

    # debug begin
    echo ------------------
    grep $CDMNT /etc/mtab
    echo ------------------
    ls -al $CDMNT
    echo ------------------
    if [ -d $CDMNT/EFI ]; then
        ls -al $CDMNT/EFI/
    fi
    echo ------------------
    # debug end

    echo "ERROR: This live image does not support EFI booting"
    exitclean
fi

And I got the following result:

-----------------
/home/vamo/not_backupped/fedora-16-RC3/Fedora-16-x86_64-netinst.iso /media/cdtmp.RYOkuX iso9660 ro,loop=/dev/loop0 0 0
------------------
total 12
dr-xr-xr-x. 5 root root   2048 Nov  1 03:54 .
drwxr-xr-x. 4 root root   4096 Nov  1 23:05 ..
dr-xr-xr-x. 3 root root   2048 Nov  1 03:54 EFI
drwxrwsr-x. 3 root 101737 2048 Nov  1 03:54 images
drwxrwsr-x. 2 root 101737 2048 Nov  1 03:54 isolinux
------------------
total 6
dr-xr-xr-x. 3 root root   2048 Nov  1 03:54 .
dr-xr-xr-x. 5 root root   2048 Nov  1 03:54 ..
drwxrwsr-x. 2 root 101737 2048 Nov  1 03:54 BOOT
------------------

The problem is, that the script tests [ ... -d $CDMNT/EFI/boot ], but the mounted image contains /EFI/BOOT

My kernel is "uname -a" is:

Linux amulet 2.6.35.14-100.fc14.i686 #1 SMP Fri Oct 21 19:14:19 UTC 2011 i686 i686 i386 GNU/Linux

I am going to report it as a bug.
Comment 36 Adam Williamson 2011-11-01 19:37:33 EDT
did you use the latest f14 updates, including updates-testing?



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 37 Brian Lane 2011-11-01 19:59:49 EDT
Václav, please update livecd-tools to the version (14.5) from updates-testing and leave feedback here:

https://admin.fedoraproject.org/updates/FEDORA-2011-13515

The problem has been fixed, but since there isn't enough karma it hasn't been pushed to stable yet.
Comment 38 Václav Mocek 2011-11-01 20:18:00 EDT
Downloaded, tested, it works.

It is for the first time, I am able to boot in EFI mode without efidisk.img.

I have already filled the bug report, sorry, the next time I will try updates-testing first.
Comment 39 Adam Williamson 2011-11-03 13:02:37 EDT
this is fixed in RC5 (was fixed in RC3 and RC4 too) and we're almost certainly going to ship that, so closing.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

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