Results 1 to 7 of 7

Thread: Compressing And Re-Compressing initrd.img File System

  1. #1
    Join Date
    Sep 2010
    Posts
    50

    Compressing And Re-Compressing initrd.img File System

    I am new to the Linux operating system and wanted to perfom Linux Kernel Programing. And also wanted to try to compile my first kernel. And also I have found a lots of content regrading Compilation. But I still had one question that is regarded to "initrd.img" file that is present in the boot partition. Also tell me how can I compress and re-compress the files initrd.img file system. I wanted the full details of the file system and also the above deatils. Help would be appreciated.

  2. #2
    Join Date
    Nov 2009
    Posts
    1,416

    Re: Compressing And Re-Compressing initrd.img File System

    The only solution for this is that you got to take the working example of the IS Bash. This are the type of commands that you got to run for the type of compressing and re-compressing of the files. Also check out for the various types of periods that are being used because the initrd.img is a temporary file format. And this is used to make the preparations before the real root file will be mounted to follow the procedure of the compression.

  3. #3
    Join Date
    Nov 2009
    Posts
    1,292

    Re: Compressing And Re-Compressing initrd.img File System

    But their are cases when the bash do not explain the file types, file paths and options nor the it does explain the command usage and the period. Bash may also be the answer for you,but this is not working for the file system that I have been currently using, and not without a working example would do for me. And their does not stand any chances to run this commands properly. And typically, you can try out by pasting the file path options and also the file names into commands and they will work. If their is a scenario that the bash is all I needed, I would have simply copied the file paths and options into the commands and everything would be fine.

  4. #4
    Join Date
    Nov 2009
    Posts
    1,269

    Re: Compressing And Re-Compressing initrd.img File System

    The other option is that you got to run the below file called:
    Code:
     "zcat ../initrd.gz | cpio -i -d."
    and this is the working example for you. Execute the above file and it is done for you. If it does not execute properly then atleast it can extract the contents of the initrd.gz and then it can set up a directory tree for the contents. From a shell, type the following:
    man zcat
    info cpio
    man bash
    And you will find that all of this stuff IS explained.

  5. #5
    Join Date
    Nov 2008
    Posts
    1,185

    Re: Compressing And Re-Compressing initrd.img File System

    Then you can also run the following post that is given below and run the below post as the code that will help you to know the details of the bash files:
    Code:
    gzip initrd.img
    cp initrd.img.gz TO/The/original/location/for/initrd.img
    Then you have to make a backup of the original, and the Rename that back up to initrd.img.backup.
    This will help you to see and compile the bash file that can be used for the initrd.img.

  6. #6
    Join Date
    Nov 2009
    Posts
    1,035

    Re: Compressing And Re-Compressing initrd.img File System

    If your using the Debian system then the below given commands can be used for the
    System type that you are using.

    initrd is named initrd.img that is run in the root file itself.

    Code:
    Then move the initrd into the initrd.gz
    And make the directory as the mkdir tree
    cd tree
    zcat ../initrd.gz | cpio -i -d
    edit whatever in tree and to recompress
    Code:
    find . | cpio -o -H newc | gzip -9 > ../initrd.gz
    cd ..
    mv initrd.gz initrd.img
    This is only for the Debain system only.

  7. #7
    Join Date
    May 2008
    Posts
    859

    Re: Compressing And Re-Compressing initrd.img File System

    And the directions are got to be assuming you have the initrd1.img in your home directory
    And let us assume that your going to have the initrd1.img on your Desktop, user_name yanfaun
    Open a terminal, become root, then...

    Code:
    cd /home/abc/Desktop
    mv initrd1.img initrd.gz
    mkdir tree
    cd tree
    zcat ../initrd.gz | cpio -i -d
    Then it should be written as the initrd1.img is now extracted into the folder tree, (/home/yanfaun/Desktop/tree)
    with the terminal you just used still open, after editing contents of tree, re-compress contents of tree into new initrd.gz, then rename it initrd1.img

    Code:
    find . | cpio -o -H newc | gzip -9 > ../initrd.gz
    cd ..
    mv initrd.gz initrd1.img

Similar Threads

  1. Best image Compressing software
    By Mr.Dean in forum Software Development
    Replies: 4
    Last Post: 18-10-2012, 01:27 PM
  2. Replies: 1
    Last Post: 18-06-2012, 05:38 PM
  3. I need best compressing tool for ps2
    By Jaganmayee in forum Windows Software
    Replies: 3
    Last Post: 15-09-2010, 08:00 AM
  4. Compressing a JPEG File in Java
    By samualres in forum Software Development
    Replies: 4
    Last Post: 20-02-2010, 04:29 PM
  5. HD Video compressing software
    By Moiz in forum Windows Software
    Replies: 3
    Last Post: 18-03-2009, 06:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,356,458.09932 seconds with 17 queries