Code Monkey home page Code Monkey logo

mkgptdrv's Introduction

mkgptdrv

Script to wipe a block device and install a gpt with multiple partitions, plus add syslinux bios and efi files.

###Usage:

This is a simple script to turn a block device into a gpt formated disk. It does require that a unique name for your Project/Brand be passed with the -t <project> argument. This name will be used to set up the EFI loaders.

Additionally, you will need to tell it where it can find a syslinux theme. This is passed as -c <directory with syslinux.cfg>. This file will be scanned for the neceassary com32 files, and those files will be copied into the appropriate locations for each loader, along with the config folder.

Multiple partitions are supported, and can be added with -p <type:size:label>. The order they are entered will be used when creating the ID. At least one partition will be made. By default, it will be an ESP partition that will fill the disk and it will be labeled 'EFI System Partition'. At least one ESP is required. Sizes can be expressed as <size>B, K, M, G and S for sectors.

###Options:

     --config,-c <dir>             : Path to syslinux.cfg folder.
        --min,-m <size>            : Minimum disk size allowed.
  --partition,-p <type:size:label> : Partition shorthand.
      --title,-t <Project/Brand>   : Will be used to label the EFI Loader Directory.
    --overlay,-o <dir>             : Additional directory to merge in at the root level.
       --sync,-s                   : Mount volumes with sync enabled.
     --device,-d <block device>    : The last argument is interpreted as the device anyways.
       --help,-h                   : Show this usage.

Partition Types:
         linux,l : Standard Ext4 Linux Volume
          home,h : Ext4 Linux Volume with gpt partition type set to home
          swap,s : Linux Swap Partition
          data,d : General Data Partition Formated Fat32
             LVM : Logical Volume Manager Partition
             ESP : EFI System Partition

Examples:
         mkgptdrv -c /sys-themes/default -t 'MyProject' -o /build  /dev/loop0
	
         mkgptdrv -c /sys-themes/menu \
                  -t 'BobsDistro' \
                  -o /build \
                  -p ESP:1g:'EFI System Partition' \
                  -p s:2g \
                  -p l:0:System \
                  /dev/sdb

mkgptdrv's People

Contributors

doncuppjr avatar

Watchers

James Cloos avatar Treha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.