# Dual booting 9front with GRUB on UEFI
Many people are using 9front on VMs (Virtual Machine) or on some server and using drawterm to access it, but few are running it natively. The lack of information about dual booting is probably one reason, at least it was the one for me.
I wondered how to do this but found not much help on the Internet. Finally I was able to do something. Hopefully this may help you.
* Find the partition of your 9fat partition on Linux. For me it is located at /dev/sda6. Check by mounting it:
```
$ mount /dev/sda6 /mnt
$ ls /mnt
9bootfat efi pbs.bak
9pc64 oldplan9.ini plan9.ini
```
What you have in this partition may not match the output above, but you should at least have a plan9.ini file.
* Add a menuentry to /etc/grub.d/40_custom like this:
```
menuentry "9front" {
set root='hd0,gpt6'
chainloader /efi/boot/bootx64.efi
}
```
Where, you guessed it, the 6 of gpt6 comes from sda6. I'm unsure about how exactly grub refers to devices, you might have to do research if hd0,gptX (with X some number) doesn't work for you.
If you are referring to the right device at the "set root=..." part, then it should work and you should be booting in your 9front system when selecting it at the GRUB menu !
This is working because the line "chainloader /efi/boot/bootx64.efi" tells GRUB to use 9front's bootloader and let it continue the boot. And that bootloader is in the 9fat partition, at exactly that path /efi/boot/bootx64.efi .
In fact, on 9front:
```
% 9fs 9fat
% lc /n/9fat/efi/boot/bootx64.efi
bootx64.efi
```
This may work on Plan 9 and other forks if you point GRUB to the right bootloader, but I don't know if every Plan 9 fork has a bootloader in 9fat at /efi/boot/bootx64.efi or not.
This only works on UEFI. Maybe it also works on legacy BIOS if you point to the correct bootloader instead of /efi/boot/bootx64.efi which is obviously UEFI specific.