I compile the ramdisk as a module in the kernel.Then I want use the cmd :insmod brd rd_size = 10000 to set the capacity of the ramdisk.But it says I give the wrong parameters. Then I go to see the source code of this module. static int __init brd_init(void).There is no parameters list. If I want to set the capacity of the ramdisk,What can I do?
Try modprobe brd rd_nr=1 rd_size=1048576 max_part=0
That should give you one 1G partition at /dev/ram0.
Solution referenced from here with a code reference here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With