RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - Printable Version +- iPXE discussion forum (https://forum.ipxe.org) +-- Forum: iPXE user forums (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error (/showthread.php?tid=8195) |
RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - zix - 2016-10-02 00:31 Hello Forum, I had trouble installing Oracle Enterprise Linux (OEL) 7.2 using ipxe.efi the other day. OEL is a Redhat Enterprise Linux (RHEL) clone similar to CentOS and Scientific Linux. I noticed several users of this forum encountered similar to difficulties as myself during installation, namely that initrd wasn't being mounted correctly. The failure occurred on an UEFI enabled HP Proliant DL360 Gen 9. I was also able to get the installation to fail on an UEFI enabled virtual machine in VMware Fusion 8.5. At first, both the HP physical server and the virtual machine on my laptop were failing in a similar manner with the same kernel panic. Quote:Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) I found the suggestion to reverse the kernel and initrd lines in the iPXE configuration on this forum. I modified my ipxe script and, interestingly, this allowed the virtual machine to install! The HP still kernel panicked, though. A close inspection of the kernel logs turned up this error: Quote:Initramfs unpacking failed: XZ-compressed data is corrupt By default, RHEL based systems use XZ to compress their initial ram disks since the XZ algorithm provides excellent compression compared to other algorithms. As far as I could tell, the kernel's de-compression function was detecting errors in the data loaded into RAM by iPXE. initrd.img is a cpio archive compressed with xz (or another compression algorithm supported by the kernel) and is easy to decompress and re-compress. I next tried a gzipped compressed initrd.img and got: Quote:Unpacking initramfs... How odd. I then tried a raw initrd.img cpio archive with no compression: Quote:Unpacking initramfs... An uncompressed image file worked! I was able to install OEL 7.2 without trouble using the uncompressed image. I haven't tested other operating systems or servers other than the HP and VM. My wild speculation since I don't know anything about the iPXE source is that the image binary is being mangled somehow while it's being pulled into RAM by iPXE. Note that I did not run into any of this diffculty using BIOS iPXE. It's easy to remove the xz compression from the default initrd.img. Code: mv initrd.img initrd.img.xz My iPXE script file: Code: #!ipxe RE: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - NiKiZe - 2016-10-02 22:32 Great that you got a workaround for this particular case on the specific hardware. But I do believe that this is due to bug in old kernels see this post and the linked replies from there: http://forum.ipxe.org/showthread.php?tid=7589&pid=11866#pid11866 and if you can please post the output of uname -r so we can verify if that is a old kernel or not. RE: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - zix - 2016-10-04 15:49 (2016-10-02 22:32)NiKiZe Wrote: Great that you got a workaround for this particular case on the specific hardware. But I do believe that this is due to bug in old kernels The kernel version is a bit behind. This is the default kernel that comes with the 7.2 installation media: Code: $ file vmlinuz RE: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - NiKiZe - 2016-10-04 18:48 (2016-10-04 15:49)zix Wrote: Ok so yes, that i probably a buggy kernel and should not be used for efi boot with initrd. I'd say it's pure luck if it works. Quite sad to see this come up again and again just because RH refuses to release something decent (IMHO) /rant RE: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - pxe_curious - 2017-04-07 16:48 Just wanted to ask what exactly happens when iPXE loads a compressed image file: - Does iPXE decompress the file or does the kernel that gets loaded and uses that file do that? - Does the next command (lets say, for example, loading the initrd image file and then the kernel) wait until the previous command has completed? I would think so. Just trying to understand if the bug is inside the kernel where it does not decompress the initrd.img properly or if iPXE is slow loading and expanding the imagefile and when the kernel gets executed, it does not find the file and therefore panics. RE: RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - NiKiZe - 2017-04-07 22:41 iPXE does nothing, however, if a http server responds with a gzip stream that stream is decompressed, some http servers does send such headers for .gz which means you will have a uncompressed image in memory. Yes everything is done one thing at a time. And kernels pre 3.16 is buggy in regards to handling initrd in efi mode - it is corruption of the image itself - you could always try to decompress initrd server side and load it uncompressed in case that triggers the bug. I would look for the original patch that was added in 3.16 to fix this issue to see what exactly is going on, but I don't think there is no way to avoid it - you are just lucky if it doesn't happen. |