• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Change initrd size

    Scheduled Pinned Locked Moved
    General
    1
    2
    2.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Fernando Gietz Developer
      last edited by

      Hi,

      Often I make changes in the init.gz, usually in the /bin/fog script. But now I need add a few new libraries, and I can’t do it; because I don’t have free space.

      When I mount the init in one local directory, the size of the mount directory is 36MB, used 35 MB and only 937 KB of free space. I need add some new libraries, and I need 7 MB more. How can i add more space in the initrd?

      1 Reply Last reply Reply Quote 0
      • F
        Fernando Gietz Developer
        last edited by

        Auto-answer 🙂
        Source: [url]http://www.linuxquestions.org/questions/red-hat-31/increase-size-of-a-mounted-filesystem-459585/[/url]

        [QUOTE]
        what you want to do is create a new image, say existing one is initrd.img and we’ll call the new one init. To create an image with a max size of 50 megs

        dd if=/dev/zero of=/init bs=1M count=50
        mke2fs /init (answer yes to the question it asks)
        mount -o loop /init_old /mnt/img
        mount -o loop /init /mnt/img2
        cp -Rp /mnt/img/* /mnt/img2
        <now add whatever other files you want to /mnt/img2>
        umount /mnt/img
        umount /mnt/img2
        gzip init

        Now you have a new larger image as init. There are other ways to do it but this is by far the easiest/safest in my opinion (been doing it all day trying to install rhel as 2.1 to install on an unsupported SAS controller).
        [/QUOTE]

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        158

        Online

        12.1k

        Users

        17.3k

        Topics

        155.3k

        Posts
        Copyright © 2012-2024 FOG Project