Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将ramdisk编译为内核中的一个模块。然后我想使用cmd :insmod brd rd_size = 10000 来设置ramdisk的容量。但是它说我给出了错误的参数。那我去看看这个模块的源码。static int __init brd_init(void)。没有参数列表。如果我想设置ramdisk的容量,我该怎么办?
尝试modprobe brd rd_nr=1 rd_size=1048576 max_part=0
modprobe brd rd_nr=1 rd_size=1048576 max_part=0
那应该会给你一个 1G 的分区/dev/ram0。
/dev/ram0
从此处引用的解决方案与此处的代码参考