Changes to initrmfs.gz

User discussion and information resource forum for Image products.

Changes to initrmfs.gz

Postby dedeen » Mon Aug 28, 2017 2:00 pm

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

Re: Changes to initrmfs.gz

Postby TeraByte Support(PP) » Mon Aug 28, 2017 4:37 pm

Could you provide some details on what you're trying to accomplish? Depending what it is there may be an easier method.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1099
Joined: Thu Aug 11, 2011 5:51 pm

Re: Changes to initrmfs.gz

Postby dedeen » Tue Aug 29, 2017 12:38 pm

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

Re: Changes to initrmfs.gz

Postby TeraByte Support(PP) » Tue Aug 29, 2017 4:39 pm

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.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1099
Joined: Thu Aug 11, 2011 5:51 pm

Re: Changes to initrmfs.gz

Postby dedeen » Tue Aug 29, 2017 7:52 pm

Thanks Paul, this is exactly the info I needed. I'll try it and let you know, I appreciate the help.
dedeen
 
Posts: 3
Joined: Mon Aug 28, 2017 1:49 pm

Re: Changes to initrmfs.gz

Postby TeraByte Support » Wed Aug 30, 2017 4:04 pm

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.

TeraByte Support
 
Posts: 2310
Joined: Thu May 05, 2011 3:37 pm


Return to Image for DOS/Linux/Windows