aguslr / multibootusb

A collection of GRUB files and scripts that will allow you to create a pendrive capable of booting different ISO files
https://mbusb.aguslr.com
GNU General Public License v3.0
571 stars 154 forks source link

Multipartition #248

Closed firecat53 closed 5 years ago

firecat53 commented 5 years ago

Hey, great project! I made some alterations to makeUSB.sh if you're interested:

New --help:

Script to prepare multiboot USB drive. 1st Partition 'DATA'. Separate 'ISO'
    partition for grub files and ISO storage.
Usage: makeUSB.sh [options] device

 device                         Device to modify (e.g. /dev/sdb)
  -b,  --hybrid                 Create a hybrid MBR
  -c,  --clone                  Clone Git repository on the device
  -df, --data-format            Filesystem type for the DATA partition [ext3|ext4|vfat|exfat|ntfs] (Default vfat)
  -ds, --data-size              DATA partition size (e.g. 5G). Remainder of drive will be allocated to ISO partition. (Default 1G)
  -e,  --efi                    Enable EFI compatibility
  -i,  --interactive            Launch gdisk to create a hybrid MBR
  -if, --iso-format             Filesystem type for the ISO partition [ext3|ext4|vfat|exfat|ntfs] (Default vfat)
  -h,  --help                   Display this message
  -s,  --subdirectory <NAME>    Specify a data subdirectory (default: "boot")

Rationale

  1. I'm assuming a significant portion of your users are primarly Linux users. I like to have a separate Linux data partition from a Windows-readable partition. This is to keep anyone from inadvertently altering any files on my ISO partition if I hand the flash drive to them to add a file.
  2. Put the DATA partition first so it's picked up by Windows (#217)
  3. Add defaults and move some of the positional arguments to regular arguments to reduce confusion. Now the script can be run with just a device id and will create a usable drive with no other input.

Feel free to close if you're not interested in these changes! I won't be offended :smile: I made the changes for my use case and figured I'd share in case someone else finds them useful.

Thanks, Scott

aguslr commented 5 years ago

Hello, @firecat53!

Thanks for taking the time to improve the script.

My only concern, as I pointed out in #217, is the BIOS Boot partition:

On MBR disks, such boot loaders typically use the sectors immediately following the MBR for this storage; that space is usually known as the "MBR gap". No equivalent unused space exists on GPT disks, and the BIOS boot partition is a way to officially allocate such space for use by the boot loader.

Therefore, it's best to keep the most simple and backwards compatible option. More so when it's so trivial to use other partition schemes by running the commands manually.

firecat53 commented 5 years ago

Ok, no worries. Thanks again for working on this project!