rhel6下:
在/boot/grub/grub.conf 修改
kernel /vmlinuz-3.18.22 ro root=UUID=29fde3d1-22e9-41d6-9f2e-0ca7ce5da066 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet ramdisk_size=2048000
这里的单位是KB,故上面的是2G
rhel7下:
modprobe brd rd_nr=1 rd_size=2048000 max_part=0
模块参数如下:
rd_nr:Maximum number of brd devices"
rd_size: Size of each RAM disk in kbytes
max_part:Maximum number of partitions per RAM disk