0.7.1 can't read ext4 partitions

2013-07-10
2013-12-31
  • I'm using refind to detect and boot linux kernels on an ext4 partition.

    This works fine with v0.6.11, but after upgrading to 0.7.1 the ext4 driver can't read my ext4 partition. Even in the EFI shell the ext4 partitions are not detected.

    I ran a fsck on my ext4 filesystems, all is fine.

    When I replace the ext4 driver with the driver of 0.6.11 (all other files still from 0.7.1) everything is working fine again.

    Here part of the driver and map output from EFI shell with ext4 0.7.1 driver (I can send the whole output if necessary)

    driver:
                T   D
    D           Y C I
    R           P F A
    V  VERSION  E G G #D #C DRIVER NAME                         IMAGE NAME
    == ======== = = = == == =================================== ===================
    1EE 00000010 ? - -  -  - rEFInd 0.7.1 ext4 File System Drive EFI\refind\drivers
    
    map:
    Device mapping table
      fs0  :HardDisk - Alias hd41a0a1 blk0 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,4CECC92A-F1FF-4C6F-99BD-4E763AA422E1,0x800,0xFA000)
      fs1  :HardDisk - Alias hd41a0a2 blk1 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(2,GPT,9FEEA77E-6FC7-4832-80F9-6FB11EA0CE56,0xFA800,0x14000)
      blk0 :HardDisk - Alias hd41a0a1 fs0 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,4CECC92A-F1FF-4C6F-99BD-4E763AA422E1,0x800,0xFA000)
      .
      .
    

    Only the FAT filesystems are detected, the ext4 file systems are not available.

    And here the output, when I use the 0.6.11 driver

    drivers:
                T   D
    D           Y C I
    R           P F A
    V  VERSION  E G G #D #C DRIVER NAME                         IMAGE NAME
    == ======== = = = == == =================================== ===================
    1EE 00000010 D - -  2  - rEFInd 0.6.11 ext4 File System Driv EFI\refind\drivers
    
    map:
    Device mapping table
      fs0  :HardDisk - Alias hd41a0a1 blk0 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,4CECC92A-F1FF-4C6F-99BD-4E763AA422E1,0x800,0xFA000)
      fs1  :HardDisk - Alias hd41a0a2 blk1 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(2,GPT,9FEEA77E-6FC7-4832-80F9-6FB11EA0CE56,0xFA800,0x14000)
      fs2  :HardDisk - Alias hd41a0a8 blk2 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(8,GPT,25B4B6A0-4895-44EE-AE2E-AF1934A77423,0x664A9800,0x165A000)
      fs3  :HardDisk - Alias hd41a0a9 blk3 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(9,GPT,A7F0CE36-E249-4570-8211-250F47394580,0x67B03800,0xB0DB000)
      blk0 :HardDisk - Alias hd41a0a1 fs0 
            PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0x0,0x0)/HD(1,GPT,4CECC92A-F1FF-4C6F-99BD-4E763AA422E1,0x800,0xFA000)
      .
      .
    

    The fs2 and fs3 file systems are working fine in EFI shell and I can boot from the linux kernel in fs2

     
    Last edit: Bernhard Ehlers 2013-07-10
  • Some questions and suggested diagnostics:

    • What type of computer are you using? 32-bit vs. 64-bit EFI? EFI version number? Any other salient characteristics, especially if it's something unusual?
    • Are you using the binaries from one of my packages, or did you build it from scratch yourself? If the latter, did you use TianoCore or GNU-EFI?
    • What's on fs1:? Is that another FAT partition, or something else, and if something else, what is it?
    • How large are your ext4fs partitions? If they're small enough (say, a /boot partition), doing a low-level dd backup to a file and making that available to me should enable me to test it locally, which might help with the diagnosis.
    • Could you do a blkid /dev/sda{#} (as root or using sudo) on each of the ext4fs partitions and post the results?
    • The output of parted -l /dev/sda (or whatever the device name is) might be helpful.
    • Could you try putting an ext4 filesystem on a USB flash drive or some other temporary medium and test with it? You could also try with other filesystems.
    • In an EFI shell, please try map -r and see what happens.
     
    • I'm using a DELL Inspiron 17r SE with Windows 8 in 64 it mode.

      Some more testing shows, that the 0.8.1 ext4 driver is working after power-on. But if I reboot the PC, it doesn't work.

      I'm using your debian binary packages.

      Currently I got a more serious problem, windows 8 failed after a software update. I'm think, I will reinstall the whole PC, most likely with windows 7. Currently, I'm not sure, if I will use UEFI or plain old MBR.

      So the next time I won't have time to play with refind. Maybe you can just ignore this issue.

       
  • It's strange that it works on a cold boot but not when rebooting. If you continue using EFI and continue to have this problem, please post back so we can debug this.

     
  • Well, took some time, I'm back now.

    On my Dell Inspiron 17R SE (7720), I updated the BIOS to latest version A16. Then I completely wiped the hard disk, so all special Dell partitions are gone. Then I installed Win7 Pro and Debian Wheezy, the 64 bit versions.

    I installed refind 0.7.6 (the debian binary package).

    Everything works quite fine, the default refind configuration works quite nicely. I made only one minor change, a smaller timeout.

    But I still have the problem, that the /boot partition with the debian boot image is only found on cold start. After a warm start, the linux partition is not found by refind. Initially the partition type was ext2. I then changed it to ext4 (and added the ext4 file system driver to refind). Same result, it only works on cold start. I then reformatted the boot partition (mke2fs sda5) and copied the linux image back, still same result. Then I replaced the refind ext2 driver with that from 0.6.12. Now it's always working.

    So I have the same problem as before.

    Here my partition layout:

    root@dell:~# blkid
    /dev/sda6: UUID="adbad0ff-a26b-4e98-b864-63f0a33ee122" TYPE="swap"
    /dev/sda5: UUID="6fcf18eb-c124-447b-b3e0-39fa8fbf31ba" TYPE="ext2"
    /dev/sda7: UUID="a3de2aea-8cfb-4131-9801-c3f734430608" TYPE="ext4"
    /dev/sda1: UUID="2645-6059" TYPE="vfat"
    /dev/sda3: LABEL="Win7" UUID="ECB255DAB255AA3A" TYPE="ntfs"
    /dev/sda4: LABEL="Daten" UUID="EC06503E06500C48" TYPE="ntfs"
    root@dell:~# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 0.8.5

    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present

    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 1953525168 sectors, 931.5 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): F949A7CF-CB58-4FD0-AC66-C21888D840CA
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1953525134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 3437 sectors (1.7 MiB)

    Number Start (sector) End (sector) Size Code Name
    1 2048 206847 100.0 MiB EF00 EFI system partition
    2 206848 468991 128.0 MiB 0C01 Microsoft reserved part
    3 468992 204799999 97.4 GiB 0700 Basic data partition
    4 204800000 1228799999 488.3 GiB 0700 Basic data partition
    5 1228800000 1229004799 100.0 MiB 8300 /boot
    6 1229004800 1244628991 7.5 GiB 8200 swap
    7 1244628992 1953523711 338.0 GiB 8300 /
    root@dell:~#

    Any ideas what I should test/check now ?

    Best regards

    Bernhard

     
  • In the short term, the solution is obvious: Keep using the 0.6.12 version of the driver(s) you need. This isn't a problem; there should be no dependencies between specific versions of the drivers and rEFInd.

    In the long term, I'll have to look over the changes between 0.6.12 and 0.7.0 (or 0.7.1, since 0.7.0 had some known bugs) to see if anything jumps out at me as a probable cause of your difficulties. If so, I'll post back here.