Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Best Method for moving "/" to ramfs?

    Posted on

    I've a project where it would be handy to have my system boot up with "/" being memory-based. Unfortunately, doesn't seem to be a lot of people doing this, so, not a lot of useful hits from Google. Basically, I've found two approaches: one (several permutations, actually) that boots to disk then uses some pivot_root trickery; one that calls busybox from initramfs and lets busybox do the heavy-lifting (yeah, the linked doc was CO7 but was testing on that before undertaking the additional effort to make a guestfish-compatible RH7 image-file).

    The

    pivot_root
    method sorta works, but, ran into some issues with my further scripts not working exactly as expected. So I'd gone down the busybox path. Spent enough time on the busybox path that I forget what my specific sticking-point with the
    pivot_root
    method was - mighta been device-related.

    The busybox method seemed cleaner/much easier to script-out. Unfortunately, its ability to interface with block-devs is a bit "absent". Specifically, to get any of my block devices to show up (so that things like

    fdisk
    will work), I have to add a boot-script to my root.img file to create the
    /dev/sdN
    entries. Even at that point, tools like LVM don't work - can't manipulate volumes. So, that's likely a dead end.

    Any way, trying to find a good method for shoving / into RAM without provoking systemd and/or device-management. Anyone got one? Hoping I don't have to waste time chasing down how to isoboot just to get / into RAM.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat