[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partman-base && GPT



On Thu, Mar 19, 2015 at 01:50:54PM +0100, Turbo Fredriksson wrote:
>On Mar 19, 2015, at 12:55 PM, Steve McIntyre wrote:
>
>> AFAICS recent parted versions default to using the "Windows Basic
>> data partition" GUID
>
>Isn't that a bug? For those that dual-boot, windows might get … "funny"
>with that disk. ?

Apologies. Correcting myself: by default parted is using
0FC63DAF-8483-4772-8E79-3D69D8477DE4, which is "Linux filesystem
data" when we're using it in d-i. Curse this jetlag. :-(

>> For UEFI, adding "write_line esp" helped (commit
>> 7ce58763e8f1766ad5461b9be73fe961d9bbf4e3 in partman-efi). I'm not sure
>> if something similar will help you…
>
>'We're not doing anything like that. So could you catch me up
>(so I don't have to dig through EVERYTHING to find out :) what
>the SET_FLAGS does here?

Apologies, to understand this you're going to need to dig into
parted's internals. :-(

>The method is 'zfs' and running
>
>	partman-command GET_FLAGS <id>
>
>in the second console (in the device dir) gives me nothing, so
>I guess there's currently no flags set…

Right, OK.

>Primarily, it's the 'boot' and 'efi' flag I'm wondering about.
>What do they do, why are they there?

They're flags that determine behaviour inside parted. In the parted
package, look at include/parted/disk.h for the full list:

/**
 * Partition flags.
 */
enum _PedPartitionFlag {
        PED_PARTITION_BOOT=1,
        PED_PARTITION_ROOT=2,
        PED_PARTITION_SWAP=3,
        PED_PARTITION_HIDDEN=4,
        PED_PARTITION_RAID=5,
        PED_PARTITION_LVM=6,
        PED_PARTITION_LBA=7,
        PED_PARTITION_HPSERVICE=8,
        PED_PARTITION_PALO=9,
        PED_PARTITION_PREP=10,
        PED_PARTITION_MSFT_RESERVED=11,
        PED_PARTITION_BIOS_GRUB=12,
        PED_PARTITION_APPLE_TV_RECOVERY=13,
        PED_PARTITION_DIAG=14,
        PED_PARTITION_LEGACY_BOOT=15,
        PED_PARTITION_MSFT_DATA=16,
        PED_PARTITION_IRST=17,
        PED_PARTITION_ESP=18
};

In partman-efi, we need to set both PED_PARTITION_BOOT and
PED_PARTITION_ESP to create a working EFI System Partition (ESP). But
for more common needs, they shouldn't be necessary. Is a lack of flags
somehow being interpreted as PED_PARTITION_MSFT_DATA somewhere?

I'd compare and see what flags the other filesystems try to set
here...

In terms of GUIDs, libparted/labels/gpt.c contains the list that
parted knows about, and the one you mentioned
(6A898CC3-1DD2-11B2-99A6-080020736631) doesn't seem to be there at
all. But I'm not sure if that matters to be honest. Do you have one of
those on the disk already, or is that what you think you should be
creating?

>And should I set 'efi' in mine (or perhaps 'zfs' - which makes
>more sense) and create the <id>/{zfs_bootable,bootable}?
>
>From a pure guess, I guess I should ONLY set the 'zfs' flag,
>and not create the two other files… ?

There isn't a zfs flag, the flags are more for partition usage rather
than fs type. Although the usage gets quite confuding at times. :-/

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
< liw> everything I know about UK hotels I learned from "Fawlty Towers"


Reply to: