Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Multipartition #248

Closed
wants to merge 3 commits into from
Closed

Multipartition #248

wants to merge 3 commits into from

Conversation

firecat53
Copy link

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

  • Make 2 data partitions - one for DATA (part 1, Fixes Use first partition for data so that it can be used on windows #217), one for boot/ISOs
  • Set size for DATA partition. ISO part will take up remainder of drive.
  • Set filesystem type separately for DATA and ISO partitions.
  • Change command line arguments/parameters. Set defaults for everything.

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 (Use first partition for data so that it can be used on 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 😄 I made the changes for my use case and figured I'd share in case someone else finds them useful.

Thanks,
Scott

@aguslr
Copy link
Owner

aguslr commented Mar 2, 2019

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.

* Make 2 data partitions - one for DATA (part 1, Fixes #217), one for boot/ISOs
* Set size for DATA partition. ISO part will take up remainder of drive.
* Set filesystem type separately for DATA and ISO partitions.
* Change command line arguments/parameters. Set defaults for everything.
@firecat53
Copy link
Author

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

@firecat53 firecat53 closed this Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use first partition for data so that it can be used on windows
2 participants