fix ramdisk compiling issues