I gave it another try and I managed to install grub on the USB. Thanks for pointing out my mistake, Combuster.
Testing the USB with Qemu using
Code: Select all
sudo qemu-system-x86_64 -hda /dev/sdf
Loads the OS like it should.
However, when I try to boot from the USB using an actual computer a black screen with a blinking cursor is shown. Could this mean the USB is not detected as bootable by the BIOS?
More details:
I first format the USB with:
Code: Select all
sudo mkfs.vfat -F 32 -n TicTacTOS -I /dev/sde
I then mount the USB to my own custom location with:
Code: Select all
sudo mount /dev/sde /mnt/TicTacTOS
Next I install Grub:
Code: Select all
sudo grub-install --target=i386-pc --root-directory=/mnt/TicTacTOS --no-floppy --recheck --force /dev/sde
The following is displayed in the console:
Code: Select all
Installing for i386-pc platform.
grub-install: warning: File system `fat' doesn't support embedding.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
I am not sure what these warnings mean, can anyone explain these to me?
Another thing I noted is that when I use:
it displays the following in the terminal:
Code: Select all
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 252.0 GB, 252000000000 bytes
255 heads, 63 sectors/track, 30637 cylinders, total 492187500 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc14cbd8d
Device Boot Start End Blocks Id System
/dev/sda1 1 492187499 246093749+ ee GPT
Disk /dev/sdf: 2002 MB, 2002780160 bytes
62 heads, 62 sectors/track, 1017 cylinders, total 3911680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
My HDD does show a device boot row but the USB does not. Does this mean the USB is not bootable?