bug-grub
[Top][All Lists]
Advanced

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

Suggested patch for partition hiding when there are multiple Windows ins


From: Reshat Sabiq
Subject: Suggested patch for partition hiding when there are multiple Windows installs
Date: Tue, 24 May 2005 17:44:15 -0500 (EST)

Dudes and dudettes (and this is meant with a feeling of utmost respect,
and gratitude to this project, which provided FREEDOM to me in this case
:) ),

I have used the patch attached to be able to hide 2K and XP partitions
from each other. It appears treating 7 and 0 as special IDs is the only
way to accomplish this. In any case, this was my experience on 2-SCSI-disk
workstation. While there might be a more generic way to
accomplish this, such as defining a new command, like change_id(hd0, 0,
0), the patch attached is the quick fix i applied on one of the stations.
It works just fine for our purposes. + of this simple fix: doesn't let the
casual user screw up the IDs with a new command like change_id. -: marks
Empty unhidden partitions as 7, although they still shouldn't be mounted
by any decent OS that cares about 7, so i don't think the - is that
significant.

Can this patch be considered for check-in, and should i log an enhancement
request (another more formal email i suppose?) for a command like
change_id?

P.S. I'm not sure if i'd have the time to look into implementing a command
like change_id.

Thanks.

On Thu, 19 May 2005, Reshat Sabiq wrote:

> OK, it finally worked, after i changed XP partition type to 0x0. However,
> that isn't quite what's needed, cause it needs to be restorable w/
> something like the current &= ~0x10. So i'll try to analyze all the IDs,
> and find something like 0x10, different from 0x0, that would make the
> hide/unhide actions work to 2K and XP.
>
> On Thu, 19 May 2005, Reshat Sabiq wrote:
>
> > I tried manually changing the XP (sdb2) partition id to something that
> > Windows wouldn't get (i used 0x93 this time), and W2000 still mounted
> > and recognized that partition as NTFS. So what i thought might have
> > been a defect or enhancement for grub, so far hasn't worked out. I'm quite
> > puzzled by how to force Windows to ignore that partition.
> > Trying to find some other ID (and a possible replacement for |= 0x10
> > perhaps?), i will try a set of other IDs.
> >
> > On Wed, 18 May 2005, Reshat Sabiq wrote:
> >
> > > In other words, it appears Windows 2000 Pro, and XP recognize partition
> > > type of 0x17 as a valid Windows partition. So perhaps a change is needed
> > > in grub, that changes the partition id to something else?
> > >
> > >
> > > On Wed, 18 May 2005, Reshat Sabiq wrote:
> > >
> > > > The example grub.conf containts hide/unhide entries, however, when 
> > > > booting
> > > > into Windows 2000, i can still see Windows XP partition as drive F:.
> > > >
> > > > The box has 2 scsi disks, and the 2nd one is now hd0, that's where XP is
> > > > installed. Windows 2000 is on
> > > > hd1.
> > > >
> > > > Has this feature been tested when using multiple disks, or does it 
> > > > perhaps
> > > > work only when hiding a partition on the same disk? I assume hiding is
> > > > accomplished by changing partition type to something Windows doesn't
> > > > recognize. However, after booting into 2000, and then into Linux, i see
> > > > that XP partition's type is 17, Hidden HPFS/NTFS.
> > > >
> > > > I know that documentation says this should work, but trying to make
> > > > sure if this is known to work across disks.
> > > >
> > > > Thanks.
> > > >
> > >
> > >
> >
> >
>
>

Attachment: disk_io.c.diff
Description: suggested patch to stage2/disk_io.c


reply via email to

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