The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error
2016-10-02, 00:31
Post: #1
RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error
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...
Initramfs unpacking failed: junk in compressed archive

How odd. I then tried a raw initrd.img cpio archive with no compression:
Quote:Unpacking initramfs...
Freeing initrd memory: 134472k freed

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
xz -d initrd.img.xz

My iPXE script file:
Code:
#!ipxe

set base http://192.168.1.20/oracle/7.2

initrd --name initramfs ${base}/images/initrd.img
kernel ${base}/images/pxeboot/vmlinuz initrd=initramfs repo=${base} ip=dhcp console=tty0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RHEL clone and UEFI booting, aka the dreaded unable to mount initrd error - zix - 2016-10-02 00:31



User(s) browsing this thread: 1 Guest(s)