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

Re: spontaneous partitions type changes (GRUB)



On Mon, Mar 12, 2001 at 06:52:42PM -0500, D-Man wrote:
> On Mon, Mar 12, 2001 at 03:14:57PM +0100, Carel Fellinger wrote:
...
> | I'm not much of a guru, but I suspect that in your GRUB config file ( see
> | /etc/boot/grub/menu.lst ) you'll find a "hide" command for the linux parti-
> | tion, but no corresponding "unhide" command in the linux section itself.
> 
> I saw different symptons when I tried hiding the linux partitions from
> win2k, then not unhiding them from linux.  The partition table wasn't
> messed up at all, I just couldn't boot because the partition didn't
> exist.  (That's what hiding does, it makes the partition SEEM to not
> exist)

No it doesn't, it simply changes the partition type by toggling one
bit, 0b (windows) becomes 1b (hidden windows), 83 (Linux ext) becomes
93 (amoebe), and reverse.  So indeed the partition table is not messed
up, only the type fields in the partition table are mangled, but in a
predictable *and* reversable way.  The hiding functionality comes from
osses and booters not looking into the content of a partition, but
merely looking at the partition type.  So the default Windows booter
looks for a 0b typed partition and fails to notice that the 1b typed
partition contains a valid windows filesystem.  And likewise, GRUB
doesn't even bother to look at the content of a 93 type partition as
that type of partition doesn't belong to the types it knows, again
without even looking at the content of those partitions.

So if you 'hide' a linux ext2 partition, you actually change it into
an amoebe partition.  If you use GRUB in command line mode and try
to access that partition you will be informed that GRUB can't make
sense out of that partition, but GRUB will show the exsistence of
that partition non the less.

> When I unhid the partitions it was fine.  Actually, I could still see
> the linux partions in win2k (though the disks had weird properties and
> didn't function, as expected).  As a result I just removed all the
> hide/unhide commands.  

hide/unhide is only working for osses/loaders that pay attention to
the partition type.  Linux/lilo for one, doesn't (as far as I know),
and I don't know of win2k.  I'm surprised it did recognize linux
partitions though.  Or did it only recognize the linux partitions if
they were hidden?  In that case it thought it saw amoebe partitions
and couldn't make sense out of it as it were actually linux ext
filesystems and not some amoebe file system.

-- 
groetjes, carel



Reply to: