Bootable Usb (CLI Method)
First mount the USB drive by running the command:
First mount the USB drive by running the command:
sudo mount -t $FILE_SYSTEM $DRIVE $DATA_MOUNTPOINT
Where $FILE_SYSTEM is the filesystem of the USB drive (e.g. vfat)
Where $DRIVE is the absolute path of the USB drive (e.g. /dev/sdc1)
Where $DATA_MOUNTPOINT is the mount point of USB drive (e.g. /mnt)
Next make the driectory by running the following command:
sudo mkdir -p $DATA_MOUNTPOINT/boot/grub
Make USB drive boot-able for UEFI systems by executing the the following command:
sudo grub-install --target=x86_64-efi --efi-directory=$EFI_MOUNTPOINT --boot-directory=$DATA_MOUNTPOINT/boot --removable --recheck
Make USB drive boot-able for BIOS systems by executing the the following command:
sudo grub-install --target=i386-pc --boot-directory=$DATA_MOUNTPOINT/boot --recheck $DISK
Post comments
Login to comment