* @see org.jnode.plugin.Plugin#startPlugin()
*/
protected void startPlugin() throws PluginException {
try {
log.info("Create initrd ramdisk on /jnode");
final DeviceManager dm = DeviceUtils.getDeviceManager();
int size = getPreferences().getInt("size", (int) NumberUtils.getSize("100K"));
final RamDiskDevice dev = new RamDiskDevice(null, "dummy", size);
dev.setDriver(new RamDiskDriver("jnode"));
dm.register(dev);
log.info("Format initrd ramdisk");
final FatFileSystemFormatter formatter = new FatFileSystemFormatter(FatType.FAT16);
final FileSystem<?> fs = formatter.format(dev);
try {
fs.getRootEntry().getDirectory().addDirectory("tmp");
} catch (IOException ex) {
log.error("Cannot create tmp on ramdisk");
}
// restart the device
log.info("Restart initrd ramdisk");
dm.stop(dev);
dm.start(dev);
log.info("/jnode ready.");
} catch (NameNotFoundException e) {
throw new PluginException(e);
} catch (DriverException e) {