Page 1 of 1

Changes to initrmfs.gz

Posted: Mon Aug 28, 2017 9:00 pm
by dedeen
Hi,
I am trying to change some of the files within initrmfs.gz, and not sure how I can do this. Any suggestions would be appreciated.

Re: Changes to initrmfs.gz

Posted: Mon Aug 28, 2017 11:37 pm
by TeraByte Support(PP)
Could you provide some details on what you're trying to accomplish? Depending what it is there may be an easier method.

Re: Changes to initrmfs.gz

Posted: Tue Aug 29, 2017 7:38 pm
by dedeen
Hi, yes. I have an initrmfs.gz on a USB that I am booting to do a system restore. The .gz has 2 custom embedded .png files that I need to replace. I would just like to unzip/untar, replace the 2 files, and zip/tar it back up into initrmfs.gz. I've tried a couple of times but the resulting USB won't boot. Thanks for the support.

Re: Changes to initrmfs.gz

Posted: Tue Aug 29, 2017 11:39 pm
by TeraByte Support(PP)
I usually do that kind of thing in an installed Linux, but it can also be done when booted to the IFL boot media.

1. Boot to IFL UFD.

2. Open a Terminal.

3. Copy the initrmfs.gz file you want to modify to the ramdisk so it can be extracted. This may require mounting a drive or partition (e.g. the file is on the IFL UFD). Example: cp mnt1/initrmfs.gz .

4. Create a folder for the extracted files: mkdir extracted

5. Change to the new folder: cd extracted

6. Extract the files: zcat ../initrmfs.gz | cpio -idmv

7. Make changes to the files.

8. Repack the files (you should be in the folder with extracted files):
find . | cpio -H newc -o | gzip -9 > ../initrmfs_new.gz

You can rename the "new" file whatever you want. I used a different name here so it doesn't overwrite the original. You would need to adjust any paths/filenames as necessary and may want different options.

Re: Changes to initrmfs.gz

Posted: Wed Aug 30, 2017 2:52 am
by dedeen
Thanks Paul, this is exactly the info I needed. I'll try it and let you know, I appreciate the help.

Re: Changes to initrmfs.gz

Posted: Wed Aug 30, 2017 11:04 pm
by TeraByte Support
which graphics? Which license are you under? Can send to support@ email
address.

"dedeen" wrote in message news:14144@public.image...

Thanks Paul, this is exactly the info I needed. I'll try it and let you
know, I appreciate the help.