/** * Constructor for GrubFatFormatter. * * @param bootSectorOffset * @param stage1ResourceName * @param stage2ResourceName */ public GrubFatFormatter( int bootSectorOffset, String stage1ResourceName, String stage2ResourceName) { GrubBootSector bs = (GrubBootSector) createBootSector(stage1ResourceName, stage2ResourceName); bs.setOemName("JNode1.0"); formatter = FatFormatter.fat144FloppyFormatter(calculateReservedSectors(512), bs); this.bootSectorOffset = bootSectorOffset; }
/** * @param bps * @param spc * @param geom * @param fatSize */ public GrubFatFormatter( int bps, int spc, Geometry geom, FatType fatSize, int bootSectorOffset, String stage1ResourceName, String stage2ResourceName) { GrubBootSector bs = (GrubBootSector) createBootSector(stage1ResourceName, stage2ResourceName); bs.setOemName("JNode1.0"); formatter = FatFormatter.HDFormatter( bps, (int) geom.getTotalSectors(), geom.getSectors(), geom.getHeads(), fatSize, 0, calculateReservedSectors(512), bs); this.bootSectorOffset = bootSectorOffset; }