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
578 stars 156 forks source link

makeUSB.sh: allow installs to relative directories other than /boot #192

Closed mmirate closed 6 years ago

mmirate commented 6 years ago

As long as grub-install is given the correct path, installing the GRUB files to "$DATA_MOUNTPOINT/boot/grub" is no different than installing to "$DATA_MOUNTPOINT/$SOMETHING/grub" even in the special case that SOMETHING=.. This patch to makeUSB.sh allows for using values of $SOMETHING other than "boot".

Indeed, putting the "grub" directory directly under the flash-drive data-partition's root is my primary motivation for this flexibility: I desire a multiboot USB drive that can also serve as the bootloader for a Linux install on the internal disk-drive. Most distros's "rerun grub-mkconfig when grub is updated" functionalities assume that when the boot partition (in my case, the USB drive's data partition) is mounted at /boot then the bootloader files are available at the absolute path /boot/grub (so "grub" is at the root of the filesystem mounted at "/boot") rather than at /boot/boot/grub (which is what results from running makeUSB as-is).

However, I'm not entirely certain on the naming of the new command-line option that this patch adds.

aguslr commented 6 years ago

@mmirate, this is a very interesting concept that I never thought. However, before merging it, I think we should make boot the default and allow for users to change it if they so choose.

BTW, I think that --subdirectory as the command-line option is fine, although it's better if we sort them alphabetically.

mmirate commented 6 years ago

@aguslr I believe that dd7552d addresses those items.