Re: Anaconda RPMBUILD and KernelSPEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Essien Ita Essien a écrit :
Olivier BONHOMME wrote:
Hello Everybody,

I am writing on this mailing because I have got a problem to understand how anaconda works with initrd.

Let me explain my problem.

I build a kernel package with rpmbuild using a custom SPEC file. This kernel uses an initrd.img file in order to boot correctely. I decided to use this kernel for creating an automatic installer for Fedora Core 6 using anaconda.
I build our distro also with a custom kernel built with a custom SPEC file.

I built my CD sucessfully and tried to boot on it. Anaconda starts sucessfully and the installation is OK.
If anaconda starts successfully and installation is ok, then the problem is NOT from Anaconda's kernel installation, if it was, Anaconda would probably not boot at all.

After the installation, the system reboots and at this moment I see that the initrd line is not added in GRUB. If I try to boot, the system restarts after saying that it is impossible to open the initial console.

After investigation, I found that the initrd file was not present on the destination system and I undserstood why.
I've had a somewhat similar problem in my distro building episodes. I used to use a custom build process which I kept updating as things changed from FC3, FC4, FC5, etc, when I had this problem recently, I discovered that some rpms where NOT being installed on my target machine default installs, basically 'mkinitrd' and 'initscripts' where not being installed, at this point, after much head scratching and related staring into space (and then some more head scratching), I discovered and switched to using 'pungi', and currently, I don't have that problem anymore... My problem back then was that mkinitrd and initscripts were missing from the pkgorder file that buildinstall was creating, I still don't know what was wrong, but using pungi now, i no more have that problem.


In my RPM, I have a postinst directive which says to create the initrd file and update the GRUB entry using commands new-kernel-pkg and mkinitrd. But on the stage2 file system these commands are not present.
Can you boot into system rescue mode and try to manually install your kernel again, you'll then see any errors that are preventing your kernel from being properly installed during the CD installation or at least, you'll get a clue.

But, on a Fedora Default Install, we have a custom with an initrd.img file. So the thing I would want to understand is how and when anaconda creates the initrd file and how and when the GRUB entry is updated because I didn't find out where was done these operations.
these should happen when the kernel is being installed, but if dependencies are missing, for instance, mkinitrd is not installed, BadThings(tm) will happen.
Hello,

Thank you for your answer.

I tried the kernel on a default Fedora Installation (Rpm -i after a completed installation) and it works sucessfully.

Actually, the thing I don't understand is how anaconda generates the initrd img without the mkinitrd and new-kernel-pkg tools. Indeed, these tools don't seem to be present on the stage2.img.

Then in the buildinstall script mkinitd and new-kernel-pkg tools are not located in the KEEPFILE file. So I wonder to know how anaconda works. I tried to look on the python script but it is difficult to find where is done this operation.

I found a recreateInitrd function but didn't find out when it is called (Python is not my favourite langage)

Best Regards,
Olivier BONHOMME


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux