I'm installing a CentOS 7 VM, and I would like to create a RAM disk inside the %pre section of a Kickstart file.

However, doing so via

mkfs -q /dev/ram1 8192

is not possible as the mkfs binary is not present in the Kickstart environment, and all other mkfs.* filesystem-specific commands return an error "/dev/ram1: no such file or directory".

Is there any other way to do so?


It turns out that the device node needed to be created with

mknod /dev/ram1 b 1 1

Once this is done, it can be formatted via e.g. mkfs.ext2:

mkfs.ext2 /dev/ram1 8192

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.