0

Environment: I have a bunch of partitions across several drives. A precise, a wheezy, an arch, a windows 7 -install and multiple partitions with stuff.

What? So how can I hide the linux-world partitions from windows7? Especially if it complicates the task when there are encrypted volumes.

Why? Because everytime someone from my family starts windows and browses through "My Computer", clicking on one of the drives that it cant read, they are asked to format that partition. If someone did that to my stuff partitions, I'd go full insane.

1 Answers1

0

I'm guessing you are using GPT instead of the msdos partition table. It seems that for some time parted followed Microsoft's lead and used their GPT partition type code when creating partitions, and Ubuntu has not yet updated to a version that no longer does that. This causes Windows to assign the partition a drive letter, and when you try to open it, and it doesn't recognize the filesystem, it offers to format it. You need to change the partition type code to get Windows to ignore it.

sudo apt-get install gdisk
sudo gdisk /dev/sda
t
1
8300
w

Use the gdisk command to change the type of the partition ( 1 in this example ) to the Linux type ( 8300 ).

psusi
  • 37,551
  • Screenshots? Step by step? – Seth May 16 '13 at 02:57
  • @psusi it shouldn't have drive letters by default if it's ext4, should it? – Thomas Ward May 16 '13 at 03:08
  • @TheLordofTime, iirc, Windows automatically assigns it a drive letter based on the partition table type code, so either creating the partition with a non windows type code it won't get a drive letter, otherwise, you have to manually remove it. – psusi May 16 '13 at 03:18
  • @Seth, I haven't run Windows in a few years, so no can do. – psusi May 16 '13 at 03:18
  • @psusi then allow me to use a case-in-point: I have a dual-boot setup with Ubuntu 12.04 64bit as primary, and Windows 7 64bit OS as secondary. Windows 7 *does not* see the ext4 partition as readable, and doesn't assign a letter, because it sees the ext4 partitions as "Unknown" type, and doesn't assign a drive letter because it can't recognize the partition as readable (standard MS-DOS partition table format). (a professional partition editor, in windows, though, can see the Linux ext4 as ext4 but it still can't read/write to it) – Thomas Ward May 16 '13 at 03:22
  • Hmm. My ext4 partition doesn't have a drive letter by default either. Nor can Windows disk management do anything with it. (cc @TheLordofTime) – Seth May 16 '13 at 03:42
  • @TheLordofTime, that would be because it has the correct partition type code (83), not because of the filesystem it contains. – psusi May 16 '13 at 13:30
  • @Seth, if it doesn't have a drive letter, then there's nothing to show up in my computer. Are you using the DOS partition table or GPT? – psusi May 16 '13 at 13:37
  • @psusi hmm. I'm not sure. I'll have to boot into Windows and check ;) – Seth May 16 '13 at 16:58