grub-devel
[Top][All Lists]
Advanced

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

Re: workaround for MS Windows' insanity (ignores partition types / hidde


From: Vladimir 'phcoder' Serbinenko
Subject: Re: workaround for MS Windows' insanity (ignores partition types / hidden flag since 2018)
Date: Wed, 13 Nov 2019 17:49:47 -0800



On Wed, 13 Nov 2019, 17:12 Marcel Partap, <address@hidden> wrote:
Dear grub devs,
as we have just last week released a hundred of our debian-based https://github.com/fsfw-dresden/usb-live-linux/ sticks .. and at the moment are rolling out a version for primary schools, I have stumbled over the pure stupidity that is Windows 10's handling of partitioned usb drives. As seems abundantly documented, windows changed its behaviour sometime last year and now blatantly ignores the hidden flag, displaying partitions regardless of type and prominently offering to format non-windows filesystems. I was somewhat shocked at this ridiculous demeanour.. After an hour of investigating this I found the very sole workaround was to set the partition type to 0 - empty/none. This was the only way to windows not show and offer to format partitions beyond the exchange FAT partition. Rejoicing, on restart I found out that grub would not proceed booting from a partition of type "empty". Now semantically, that is totally correct. However, in order to provide us with a coping mechanism for such live linux use scenarios, I propose to add a flag that overrides this code:
>   static inline int
>   grub_msdos_partition_is_empty (int type)
>   {
>     return (type == GRUB_PC_PARTITION_TYPE_NONE);
>   }
to allow booting from partitions of type 0 empty/none.
Type 0 means that entry is empty and changing this is to expose bunch of garbage partition and this is behavior followed by other consumers like Linux and BSD. 
However we can assist you in finding a better solution. Did you already consider alternative partition maps? I'd try msdos+gpt or msdos+BSD or msdos+sunpc. Dinner other schemes might also work. Another workaround is to put some fake FAT structures that will end up as showing as a FS. You can even put some explanation files there
This should cause less confusion to the hundreds of young students atm wondering about "what the hell is formatting" ..

Best Regards,
#marcel
_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]