LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-14-2014, 04:57 AM   #1
lodiablo99
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Rep: Reputation: 0
Angry Custom Centos 7 ISO


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)... :
  1. copy content iso to a tmp/centos folder
  1. cp /tmp/centos/isolinux/initrd.img /tmp/initrd.img.xz
  1. cd /tmp
  1. xz -d initrd.img.xz
  1. xz (-9) initrd.img
  1. cp initrd.img.xz /tmp/centos/isolinux/initrd.img
  1. chown 500 /tmp/centos/isolinux/initrd.img
  1. chgrp 502 /tmp/centos/isolinux/initrd.img
  1. 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?

Last edited by lodiablo99; 11-14-2014 at 06:54 AM.
 
Old 11-16-2014, 10:11 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Why are you modifying the initrd.img? You should only need to modify the squashfs and not touch the initrd.
 
1 members found this post helpful.
Old 11-17-2014, 02:32 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
what are you trying to do ?
what is being changed in the "initrd.img" ?
 
Old 11-18-2014, 01:21 AM   #4
lodiablo99
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hello,

Thanks Sag47, I was a confused and you are right, the correct approach is to only modify the squachfs.img .

I'm modifying the "rootfs.img/initrd.img(centos6)" to add some scripts that are needed for a kickstart install. These scripts are called in the %pre section of the ks.cfg.

Thanks all for the help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up custom CentOS minimal ISO 007stealth Linux - Newbie 3 10-03-2013 07:21 AM
livecd-creator centos 5.4 some errors while creating ISO and on boot of the ISO niteshadw Linux - Distributions 3 02-21-2013 10:33 PM
Creating Custom LiveOS ISO with Custom Files and RPMs niteshadw Red Hat 1 11-06-2012 10:44 AM
Custom ISO glennbtn Linux - Software 5 11-08-2011 08:53 PM
Custom CentOS 5 Install with ks.cfg file and centOS all in one linux_newb Linux - Server 1 01-14-2010 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration