The officially official Devuan Forum!

You are not logged in.

#1 2023-11-28 16:13:01

tlathm
Member
Registered: 2017-11-25
Posts: 91  

[SOLVED] Creating a VM using GPT partitions

I'm looking to create a VM using VMware workstation player that initially will have a 250 GB disk, but I'd like to force it to use GPT partitions. The reason is that there can be cases where at some point there's a need to increase a partition to more than 2 TB. From what I've read I don't think that GPT partitions would get used in that case by default(?).

I found an interesting post related to Debian here:

https://unix.stackexchange.com/question … mbr-vs-gpt

That is, to add this to the end of the boot command line:

d-i:partman-partitioning/default_label=gpt

Can anyone confirm whether or not that works, and most importantly, if the resulting install would actually boot correctly?

Thanks in advance!
Tom

Offline

#2 2023-11-28 17:41:32

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,427  

Re: [SOLVED] Creating a VM using GPT partitions

I can't check that, but I can suggest that you partition the disk manually as gpt using gdisk or gparted. Then when you run the installer, you can select the partitions you created.

If you use gpt with legacy bios boot, you need a special partition, at least 1MB size, with no filesystem on it ("unformatted" in gparted) and with a flag of ef02 (in gdisk) or bios_grub (in gparted).

Offline

#3 2023-11-28 18:49:52

tlathm
Member
Registered: 2017-11-25
Posts: 91  

Re: [SOLVED] Creating a VM using GPT partitions

Actually that gets into several things that get very confusing about all this.

For example, if I'm creating a new VM that I plan on installing Devuan, I'm actually unclear as to how I even could partition it ahead of time. On real hardware I'd just boot from some removable drive, mount the disk, and format it. I have no idea how to do that in this case.

Things get even more confusing regarding the boot. I'm unclear as to what VM even does for a new VM regarding legacy BIOS boot vs EFI. Maybe there are some options there though I don't recall any. Very confusing.

I may just try the approach in that link and see if it works.

Tom

Offline

#4 2023-11-28 19:18:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,427  

Re: [SOLVED] Creating a VM using GPT partitions

On virtual hardware, you would boot from a virtual optical disk by attaching a bootable iso file (probably a live-iso). Then you could do whatever you need to do to the virtual hard disk. That's how it works with virtualbox and qemu. I haven't used vmware since debian etch, but I assume it will let you do the same.

I think you're worrying about a non-existent problem. If you ever need more than 2T of space, you could just attach a larger virtual disk and move part of the filesystem onto it. You don't need 2T for the operating system.

Offline

#5 2023-11-28 20:01:03

tlathm
Member
Registered: 2017-11-25
Posts: 91  

Re: [SOLVED] Creating a VM using GPT partitions

Thanks for that! If I decide to even do this I might try that.

You're correct that this really isn't really an issue. When a customer of ours ends up needing that much space we have them add a new disk and just add it to our LVM logical volume as a raw disk with no partitions at all. We did however have one customer that increased the existing disk to well over 2 TB which we were not able to fully use due to the DOS partitions, and VM doesn't let you get it back.

I was hoping to avoid that but I'm starting to think it's not worth it...especially if it gets into changing stuff to use EFI etc. That could even end up causing worse issues.

Thanks again!
Tom

Offline

Board footer