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.
Changes to initrmfs.gz
-
- Posts: 1649
- Joined: Fri Aug 12, 2011 12:51 am
Re: Changes to initrmfs.gz
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
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.
-
- Posts: 1649
- Joined: Fri Aug 12, 2011 12:51 am
Re: Changes to initrmfs.gz
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.
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
Thanks Paul, this is exactly the info I needed. I'll try it and let you know, I appreciate the help.
-
- Posts: 3641
- Joined: Thu May 05, 2011 10:37 pm
Re: Changes to initrmfs.gz
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.
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.