grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix when installing on pationless but partionable medium


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [PATCH] Fix when installing on pationless but partionable medium
Date: Sat, 18 Jul 2009 21:00:36 +0200

On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan<address@hidden> wrote:
> On Fri, Jul 17, 2009 at 06:41:59PM +0200, Vladimir 'phcoder' Serbinenko wrote:
>> Sometimes a media that can be partioned isn't really partioned. E.g.
>> usb sticks. This is a patch to handle this situation.
>
> But we had a check for this already, is it not working?
>
>  if (! dest_dev->disk->has_partitions)
>    {
>      grub_util_warn ("Attempting to install GRUB to a partitionless disk.  
> This is a BAD idea.");
>      goto unable_to_embed;
>    }
has_partitions is set by driver and has_partitions is a misnomer and
it should be really can_be_partitioned. As a matter of fact this is
even more problematic since whether has_partition is set or no often
depends whether author know about partitioned media of given kind. I
think this field should be ditched altogether
>
> I'm not sure there's much we can do about this.  Using heuristics sounds like
> it will make the solution worse than the problem.  I don't care much about
> Microsoft filesystems, but I'd hate to see GRUB fail on a completely sane
> ext3 inside msdos label because it happened to look like FAT in raw disk at
> the same time.
The approach proposed by Collin avoids such problems since correct
pc_partition_map is always detected as such. Also if fs is misdetected
as pc_partition_map it's still acessible by it's name (e.g. use (hd0)
even if (hd0,1) is present). With current misdetection problem
grub-setup may embed in internal FS structures corrupting it in the
passage
>
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git




reply via email to

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