Custom Centos 7 ISO

General support questions
Post Reply
lodiablo
Posts: 2
Joined: 2014/11/14 11:01:39

Custom Centos 7 ISO

Post by lodiablo » 2014/11/14 11:04:52

Hello,

I getting frustrated by trying to customize a Centos install cd.
Every attempt results in a "kernel panic unable to mount root fs on unknown block(2,0)" when I try to boot from the iso.By troubleshooting I did found that the problem is linked to the initrd.img in the /isolinux folder. With the original initrd.img my customized iso boots correctly.But I also need to customize initrd.img.

This is what I do and it fails (even without modifying the content of initrd.img)... :
-copy content iso to a tmp/centos folder
-cp /tmp/centos/isolinux/initrd.img /tmp/initrd.img.xz
-cd /tmp
-xz -d initrd.img.xz
-xz (-9) initrd.img
-cp initrd.img.xz /tmp/centos/isolinux/initrd.img
-chmod 500 /tmp/centos/isolinux/initrd.img
-chgrp 502 /tmp/centos/isolinux/initrd.img

-mkisofs....

The problem happens somewhere in bold I think... . Because if I recreate my iso file without decompressing / compressing the initrd.img file, it works correctly.
I lose 2Mb of data between the original initrd.img and xz decompress/compressed version..., a diff between (lsinitrd of both files) only reveals a difference on total size. What am i missing here?

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Custom Centos 7 ISO

Post by TrevorH » 2014/11/14 11:27:26

I think you meant chown not chmod...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lodiablo
Posts: 2
Joined: 2014/11/14 11:01:39

Re: Custom Centos 7 ISO

Post by lodiablo » 2014/11/14 12:52:30

TrevorH wrote:I think you meant chown not chmod...
Yes, you are correct :oops:
Do you have a idea what the solution could be?
Cheers

spstarr
Posts: 1
Joined: 2015/11/04 05:27:26

Re: Custom Centos 7 ISO

Post by spstarr » 2015/11/04 05:28:49

Having exactly the same problem you're having, the secret is you must use -C crc32 for recompressing the initrd.img with XZ, then it should work for you :)

Thanks,
Shawn

Post Reply