LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   error creating mkinitramfs (https://www.linuxquestions.org/questions/linux-from-scratch-13/error-creating-mkinitramfs-4175492758/)

dandydonh1 01-27-2014 10:56 AM

error creating mkinitramfs
 
Following the 7.4 book, I have a running system. However, I am unable to create an initrd.img file as the script errors out with the following error:

-bash-4.2# mkinitramfs 3.10.10

cp: target '/tmp/initrd-work.fTcNLwk475/lib/modules/3.10.10' is not a directory
depmod: ERROR: could not open directory /tmp/initrd-work.fTcNLwk475/lib/modules/3.10.10: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
done.


Please note that this error is from the running lfs system itself. Has anybody run into any issues with the mkinitramfs. I do not have any issues compiling and have some major servers running on my build, it is just creating an init image is causing fits.


Thanks

stoat 01-27-2014 02:20 PM

Quote:

Originally Posted by dandydonh1

Has anybody run into any issues with the mkinitramfs.

I haven't.

I suspect a typo in your script. Or, maybe cpio is not installed.

dandydonh1 01-27-2014 02:34 PM

Thanks for the reply. cpio is installed:

-bash-4.2# cpio --version
cpio (GNU cpio) 2.11
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Phil Nelson, David MacKenzie, John Oleynick,
and Sergey Poznyakoff.



The script is from the lfs book: http://http://www.linuxfromscratch.o...initramfs.html

stoat 01-27-2014 03:52 PM

My current mkinitramfs script is from the BLFS 7.4 book, but I compared it to the script you are using from the current SVN version. The differences are very minor and don't involve the section that copies files from /lib/modules. Anyway, I also ran your SVN mkinitramfs script in my BLFS system, and it created an initial ram filesystem file even more quietly than my version from the 7.4 book does (the new mkinitramfs version doesn't attempt to copy udev.conf if it doesn't exist, for example).
Code:

root [ /home/boo ]# ./mkinitramfs_test 3.10.10-1
Creating initrd.img-3.10.10-1... done.
root [ /home/boo ]#

So, I guess I still suspect a typo in the script you created. Did you hand type it or copy & paste? I recommend copy & paste for such a big script. If you did copy & paste, it's still possible to botch that or cut off the ends of long lines. Anyway, it happens all the time...to all of us.

P.S.: Even the link in your last post is busted (at this moment) because of a typo.
Quote:

Originally Posted by dandydonh1

The script is from the lfs book: http://http//www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html



All times are GMT -5. The time now is 08:35 PM.