UEFI boot + 2nd partition

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
tmsg
Black ninja
Black ninja
Posts: 44
Joined: 15 Sep 2015, 14:29
Distribution: arch, mx, porteus
Location: York, UK

UEFI boot + 2nd partition

Post#1 by tmsg » 24 Nov 2015, 12:37

I am building a USB stick to boot Porteus 64 and then run VirtualBox VMs off it. This setup works and it will be used with a number of different computers.

In another thread Ed_P brought up the idea that I should put Porteus on a FAT32 partition and make the stick bootable also on UEFI systems. I've tested that and it does work. However, FAT32 partitions support only files up to 4GB so I would have to put the VM .vdi files (some of which are much bigger) on a second partition (which could be any filesystem that supports big files, say ext3).

In theory that's no big deal but in practice I see a problem: VirtualBox seems to store the locations of .vdi files as absolute paths. As long as those files reside in a folder on the same partition as Porteus (say sdb1) that's fine because then the partition is not really necessary and is not stored. However, if they are on a different partition (say sdb2), then VirtualBox will store the path with sdb2 in it, I think. If I boot the stick now on a different machine where Porteus is, say, on sdc1 and the .vdi files are on sdc2, VirtualBox won't find them.

I could edit the VirtualBox configuration if necessary but surely there's a more elegant solution?! Perhaps a tiny FAT32 partition only for /boot and then a second partition with the rest of Porteus and VirtualBox and the .vdi files? (The fact that Windows normally can't access more than one partition on USB sticks is of no importance here.)

Or perhaps there's something even better?

User avatar
Ed_P
Contributor
Contributor
Posts: 3070
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: UEFI boot + 2nd partition

Post#2 by Ed_P » 24 Nov 2015, 15:34

exFAT supports files larger than 4 GB, without journaling. Whether UEFI supports exFAT for booting is the question. Are you able to boot with the EFI folder on a NTFS partition?
Ed

User avatar
tmsg
Black ninja
Black ninja
Posts: 44
Joined: 15 Sep 2015, 14:29
Distribution: arch, mx, porteus
Location: York, UK

Re: UEFI boot + 2nd partition

Post#3 by tmsg » 24 Nov 2015, 16:04

As far as I know, UEFI supports just FAT32/16/12. I am pretty sure it doesn't support NTFS or exFAT. If anyone has a reliable source that demonstrates that it does I'd love to see it.

(Even if some implementations do support NTFS or exFAT, I'd rather stick with FAT32 as this USB stick is supposed to boot (almost) everywhere. Adding UEFI boot capabilities but then using a non-standard FS is probably not a terrific idea.)

So the boot partition has to live with the 4GB limitation, which means Idefinitely need a second partition that supports big files. Or else I have to skip UEFI support:-(

The question then is how best to arrange things such that all bits and pieces find their respective files...:-)

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: UEFI boot + 2nd partition

Post#4 by brokenman » 24 Nov 2015, 16:26

First partition fat32 (has to be)
Second partition ext4

Put EFI and boot folder on 1st and porteus folder on second.
Use from=UUID cheatcode in refind.conf
Don't run the porteus installer.

Also use changes to save the vm path. Hopefully that works.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
tmsg
Black ninja
Black ninja
Posts: 44
Joined: 15 Sep 2015, 14:29
Distribution: arch, mx, porteus
Location: York, UK

Re: UEFI boot + 2nd partition

Post#5 by tmsg » 24 Nov 2015, 16:59

Yeah, something along those lines should do the trick. Since the stick will also be used to boot via old-style BIOS, I'd also have to put a from=UUID cheatcode into porteus.cfg, I think?

I can't try that right now, but I'll reserve a time slot tomorrow:-)

Post Reply