Package org.jnode.partitions.ibm

Examples of org.jnode.partitions.ibm.MasterBootRecord


                File file = new File(stage1ResourceName);
                InputStream is = new FileInputStream(file);
                byte[] buf = new byte[512];
                FileUtils.copy(is, buf);
                is.close();
                stage1 = new MasterBootRecord(buf);
            } catch (IOException e) {
                throw new GrubException("error while reading stage1", e);
            }
        }
        return stage1;
View Full Code Here


     * @throws GrubException
     */
    public void format(BlockDeviceAPI devApi) throws GrubException {

        log.info("Checking the old MBR...");
        MasterBootRecord oldMbr;
        try {
            oldMbr = new MasterBootRecord(devApi);
        } catch (IOException e) {
            throw new GrubException("error while reading MBR", e);
        }

        if (!oldMbr.containsPartitionTable()) {
            throw new GrubException("This device doesn't contain a valid MBR.");
        }
        log.info("done.");

        /*
 
View Full Code Here

    public PartitionHelper(IDEDevice device, PrintWriter out) throws DeviceNotFoundException,
            ApiNotFoundException, IOException {
        this.current = device;
        this.api = current.getAPI(BlockDeviceAPI.class);
        this.MBR = new MasterBootRecord(api);
        this.out = out;

        reloadMBR();
    }
View Full Code Here

TOP

Related Classes of org.jnode.partitions.ibm.MasterBootRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.