setting the 'hidden' attribute on a partion from Linux (parted) isnt respected by Windows?

6,888

I am not sure which attribute bits parted uses to define a hidden partition, you would need to look at the source code. But from what you have experienced it must be different.

Microsoft defines these partition attributes for GPT: Bit 60 - Read Only, Bit 62 - Hidden, Bit 63 - Do not automount

For more information see this wiki article.

And how would you do this from Linux? Well you could check the parted documentation to see if allows you to set custom attribute bits for a partition entry; and if not then you would need to modify the source code to have it set the bit microsoft uses as well.

Share:
6,888

Related videos on Youtube

AMMA
Author by

AMMA

Updated on September 18, 2022

Comments

  • AMMA
    AMMA almost 2 years

    when I set the 'hidden' flag on a GPT partition it's not respected by Windows 8.1 (Windows attempts to mound, throws UI, etc). However if I set the 'hidden' flag from diskpart.exe it is respected - are these two 'hiddens' different?

    how can I set the bit from Linux such that it's respected from Windows?

    GNU Parted 3.0
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) print
    print
    Model: LaCie P9220 (scsi)
    Disk /dev/sda: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    Number  Start   End     Size    File system  Name         Flags
     1      1049kB  8001MB  8000MB  fat32        SD_Recovery
     2      8001MB  8101MB  101MB   ext4         SD_OS        hidden
     3      8101MB  8201MB  99.6MB               SD_Page      hidden
     4      8201MB  520GB   512GB   ext4         SD_Data0     hidden
     5      520GB   1000GB  480GB   ext4         SD_Data1     hidden
    

    and the same disk from Windows

    DISKPART> lis vol
    
      Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
      ----------  ---  -----------  -----  ----------  -------  ---------  --------
      ...
      Volume 7     E                FAT32  Partition   7629 MB  Healthy
      Volume 8     H                RAW    Partition     96 MB  Healthy
      Volume 9     I                RAW    Partition     95 MB  Healthy
      Volume 10    J                RAW    Partition    476 GB  Healthy
      Volume 11    K                RAW    Partition    447 GB  Healthy
    
    DISKPART>