On Tue, 25 Jul 2000, OKUJI Yoshinori wrote:

Hello,

Thanks for your reply.

> > I invented one dirty trick which will allow me to do so. The idea is to
> > map logical disks from extended partion to one entry in primary partition.
> > It should make some partitioning programs unhappy because of overlapping
> > partitions on a disk, but is working perfectly.
> 
>   I don't like your idea, since you break the rule that no extended
> partition should overlap any primary paritition. Boot loaders are
> bound to follow a lot of historical convention and numerous rules,
> because it is so difficult to maintain compatibilities with other
> software and hardware, such as BIOS and operating systems. Thus, I
> don't apply anything that is possible to spoil the effort.

I understand your rules. I agree that this is not clean way of handling
partitions, and can break some software components of your system. However
nobody forces you to use the "partmap" command in your configuration. Such
feature is not breaking partion tables of people who don't use it. And
people who will use it should be informed that it is bit dangerous to use
this option in some cases.

>   However, on the other hand, I can see why you want such a
> feature. So, let's think of another way to satisfy your wish.

:-) Ok.

>   Considering what's bad with your idea, I realize that there is no
> reason why the information on a mapped partition should be in an
> extended partition. It can be either in an ordinary file or in a GRUB
> configuration file. Here is a virtual example:

This is the solution which is used in Ranish partiton manager 
(http://www.users.intercom.com/~ranish/part/) . It is combined programm
for creating partions/resizing some filesystems and chainloading
opereating systems. It maintains shadow entries for 31 primary partitions.
The problem with this solution is that if you don't have currently mapped
some of those shadow partions, you are not able to access it. For example
I am often mounting BSD/FAT partitons from linux. Other problem is that
this solution is also possible dangerous when you are using some
partitoning programs which don't allows you to specify exact position of
your partion, so you can accidently overwrite your partiton with new one.
I don't said it is bad idea, but have also its pros/cons as have my
solution. With my solution is good, that the partion is always allocated
and accessible. Bad on my solution is that your partions overlap.
With your solutions is good that rules are not broken. The bad is that the
partion when is not mapped in partiton table is unaccessible, and all
partioning programs handles it as unalloccated space.

> # Note that GRUB can calculate the starting CHS and the ending CHS!
> grub> partset (hd0,2) START LEN
> # If you want to change the partition type
> grub> parttype (hd0,2) 0x83
> # If you want to set the active flag
> grub> root (hd0,2)
> grub> makeactive
> 
> # If you want to replace the entire partition table
> grub> partcopy (hd0) (fd0)/mbr_image
> 
> What do you think?

Looks quite good. If nothing from this is implemented, I can try to
implement it when I will find some spare time. 
However, I think both solutions should leave together while user have the
freedom to choose if he will use it or not.
I know, I am not authorized to push grub maintainers to include any line
of my code to grub. I just wanted to share my idea which can help people
to get more from their computers.

Btw. The command "parttype" is implemented in grub yet ? If I remember
well, I don't saw its definicion in builtin.c. If it is, I am duno, that I
spent time writing my own "partid" with same functionality.

Thanks for your time and for your response.

With best regards,
Stevo.

-- 
Stefan Ondrejicka <[EMAIL PROTECTED]>
Beethovenova 11, 917 08 Trnava, Slovakia
http://www.idata.sk/~ondrej/


Reply via email to