Changes to initrmfs.gz

User discussion and information resource forum for Image products.
Post Reply
dedeen
Posts: 3
Joined: Mon Aug 28, 2017 8:49 pm

Changes to initrmfs.gz

Post 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.
TeraByte Support(PP)
Posts: 1644
Joined: Fri Aug 12, 2011 12:51 am

Re: Changes to initrmfs.gz

Post 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.
dedeen
Posts: 3
Joined: Mon Aug 28, 2017 8:49 pm

Re: Changes to initrmfs.gz

Post 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.
TeraByte Support(PP)
Posts: 1644
Joined: Fri Aug 12, 2011 12:51 am

Re: Changes to initrmfs.gz

Post 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.
dedeen
Posts: 3
Joined: Mon Aug 28, 2017 8:49 pm

Re: Changes to initrmfs.gz

Post by dedeen »

Thanks Paul, this is exactly the info I needed. I'll try it and let you know, I appreciate the help.
TeraByte Support
Posts: 3598
Joined: Thu May 05, 2011 10:37 pm

Re: Changes to initrmfs.gz

Post 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.

Post Reply