OSDeploy / OSD

OSD Shared Functions
MIT License
130 stars 54 forks source link

Option to specify the OS partition size #102

Closed skyblaster closed 6 months ago

skyblaster commented 6 months ago

I totally respect the default partition sizes for the other three partitions, but would it be possible to add a parameter to specify the size of the OS partition?

I don't dual-boot many machines, but on the ones that I do, I always lay down Windows before Linux and it would be awesome not to have to shrink "OS" after the fact.

It appears this would be quite easy to do seeing how there are already switches for the other partition sizes. https://github.com/OSDeploy/OSD/blob/master/Docs/New-OSDisk.md

gwblok commented 6 months ago

I'll look into that, but might be awhile. The current option you have is to create your own format process scripts, and format your drive before triggering OSDCloud, and then set 'SkipNewOSDisk' variable to $true, and OSDCloud will skip setting up the disk.

That is how I currently have it set for deployments using ConfigMgr TS calling OSDCloud. I'll have the CM Task Sequence format the drive, then have OSDCloud pull down the OS.

gwblok commented 6 months ago

Digging in and looking at the code, it's not "quite easy", which is a bummer.

The Function New-OSDPartitionWindows.ps1 would have to be modified to support this, and currently it's using parameters like "UseMaximumSize" with the New-Partition function. This would add a lot of extra complication into this process, as several files and functions would need to be updated to support this feature request.

Being this is an edge case situation, its very low priority, and I'd fall back on my recommendation for you to do your own formatting of the partition first, then call OSDCloud.