Creating a recovery initrd

That command is just for creating an initrd from all content in the directory the find command is run in. Are you saying you removed this and it now works?

I took a copy of the default initrd and did all the steps as per the guide without making any changes and it was not working.I assume gziping steps are causing ramdisk write error.

That could be, but I suspect it is something different. The bootloader itself does understand gzip, and so it shouldn’t have an issue if it is just gzip. The “incomplete write” error makes me wonder if perhaps something else is going on. Can you try the following instead to create the initrd? Use an actual working initrd, and see if you can unpack this and repack without error…if this is the case, then you know this method works, and can try adding it to yours (also, keep in mind that this must be done as a file in “/boot”…any flash which attempts to use this in a partition would also need signing):

sudo -s
cd /tmp
# Need a clean directory you can later delete:
mkdir test
cd test
gunzip < /where/ever/it/is/initrd > initrd.cpio
# This does the actual unpack in current directory:
cpio -vid < initrd.cpio
# You can save or delete initrd.cpio here, I just
# delete (otherwise it gets put in any cpio you
# repackage which is not what you want):
mv initrd.cpio ..
# Explore, edit, modify if desired...then repackage
# with new name:
find . -print | cpio -ov > ../initrd-modified.cpio
cd ..
gzip initrd-modified.cpio
mv initrd-modified.cpio initrd-modified
# This is the old unmodified cpio file:
rm initrd.cpio
# Renamed with "-modified" just to keep it from getting mixed up,
# this is now usable as an INITRD entry.
rm -Rf test
exit

I used another method i created a custom rd(link= “Working with Linux Initial RAM Disks”) and added drivers and some exe to it and packed it to gzip format ,changed ram size in extlinux.conf and changed “root=ram0” and gave the init path (“APPEND ${cbootargs} console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 root=/dev/ram0 rw init=/bin/bash ramdisk_size=65536”).And it’s now working i got the console.But it’s still showing EOF is missing .But it’s working.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.