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

2009-07-31 Thread Robert Millan
On Tue, Jul 28, 2009 at 11:42:07PM +0200, Vladimir 'phcoder' Serbinenko wrote: > diff --git a/ChangeLog b/ChangeLog > index 23c288e..74b9247 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,5 +1,10 @@ > 2009-07-28 Vladimir Serbinenko > > + * partmap/pc.c (pc_partition_map_iterate): Chec

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

2009-07-28 Thread Vladimir 'phcoder' Serbinenko
On Tue, Jul 28, 2009 at 7:33 PM, Robert Millan wrote: > On Sun, Jul 26, 2009 at 03:54:41PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> +      for (i = 0; i < 4; i++) >> +     if (mbr.entries[i].flag & 0x7f) >> +       break; >> + >> +      if (i != 4) >> +     return grub_error (GRUB_ERR_BAD_PAR

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

2009-07-28 Thread Robert Millan
On Sun, Jul 26, 2009 at 03:54:41PM +0200, Vladimir 'phcoder' Serbinenko wrote: > + for (i = 0; i < 4; i++) > + if (mbr.entries[i].flag & 0x7f) > + break; > + > + if (i != 4) > + return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag"); Why not just return directly? --

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

2009-07-26 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:22 PM, Robert Millan wrote: > On Sat, Jul 18, 2009 at 11:28:58PM +0200, Vladimir 'phcoder' Serbinenko wrote: >> > I don't understand what you mean here. >> Let's take a common example of cdrom. Most of the users and developers >> are accustomed to a cdrom holding one files

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

2009-07-26 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:46 PM, Pavel Roskin wrote: > On Wed, 2009-07-22 at 19:43 +0200, Vladimir 'phcoder' Serbinenko wrote: >> On Wed, Jul 22, 2009 at 7:36 PM, Pavel Roskin wrote: >> > On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: >> > boot.img has holes for FAT and PC MBR.  That's two

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

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:43 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Wed, Jul 22, 2009 at 7:36 PM, Pavel Roskin wrote: > > On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > > boot.img has holes for FAT and PC MBR. That's two configurations we > > support. No other partition tables

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

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:22 +0200, Robert Millan wrote: > On Sat, Jul 18, 2009 at 11:28:58PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > > I don't understand what you mean here. > > Let's take a common example of cdrom. Most of the users and developers > > are accustomed to a cdrom holding one

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

2009-07-22 Thread Vladimir 'phcoder' Serbinenko
On Wed, Jul 22, 2009 at 7:36 PM, Pavel Roskin wrote: > On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > boot.img has holes for FAT and PC MBR.  That's two configurations we > support.  No other partition tables or filesystems are supported. Many filesystems leave first block free. These ar

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

2009-07-22 Thread Pavel Roskin
On Wed, 2009-07-22 at 19:16 +0200, Robert Millan wrote: > As a bootloader, most of the decisions GRUB takes have a critical effect. We > can't make GRUB take those decisions based on heuristic. Agreed. Sorry for being late in joining this discussion. It's not enough to make sure that there is s

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

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 11:02:05AM +0100, Colin Watson wrote: > On Sat, Jul 18, 2009 at 09:22:11PM +0200, Robert Millan wrote: > > On Sat, Jul 18, 2009 at 09:00:36PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > > > On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan wrote: > > > > I'm not sure the

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

2009-07-22 Thread Robert Millan
On Sat, Jul 18, 2009 at 11:28:58PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > I don't understand what you mean here. > Let's take a common example of cdrom. Most of the users and developers > are accustomed to a cdrom holding one filesystem. On macs however cds > are partitioned and not being

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

2009-07-22 Thread Robert Millan
On Sun, Jul 19, 2009 at 11:07:41AM +0100, Colin Watson wrote: > On Sat, Jul 18, 2009 at 09:17:41PM +0200, Robert Millan wrote: > > On Sat, Jul 18, 2009 at 09:01:38PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > > > On Sat, Jul 18, 2009 at 8:45 PM, Robert Millan wrote: > > > > I might be missi

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

2009-07-19 Thread Colin Watson
On Sat, Jul 18, 2009 at 09:17:41PM +0200, Robert Millan wrote: > On Sat, Jul 18, 2009 at 09:01:38PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > On Sat, Jul 18, 2009 at 8:45 PM, Robert Millan wrote: > > > I might be missing something about this check, but GRUB doesn't require > > > that > > > t

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

2009-07-19 Thread Colin Watson
On Sat, Jul 18, 2009 at 09:22:11PM +0200, Robert Millan wrote: > On Sat, Jul 18, 2009 at 09:00:36PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan wrote: > > > I'm not sure there's much we can do about this.  Using heuristics sounds > > > like > > >

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

2009-07-18 Thread Vladimir 'phcoder' Serbinenko
> I don't understand what you mean here. Let's take a common example of cdrom. Most of the users and developers are accustomed to a cdrom holding one filesystem. On macs however cds are partitioned and not being able to access all the partitions is a problem for end user. Such situations are probab

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

2009-07-18 Thread Robert Millan
On Sat, Jul 18, 2009 at 09:00:36PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan 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. >

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

2009-07-18 Thread Robert Millan
On Sat, Jul 18, 2009 at 09:01:38PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Sat, Jul 18, 2009 at 8:45 PM, Robert Millan wrote: > > On Fri, Jul 17, 2009 at 05:51:40PM +0100, Colin Watson wrote: > >> On Fri, Jul 17, 2009 at 06:41:59PM +0200, Vladimir 'phcoder' Serbinenko > >> wrote: > >> > S

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

2009-07-18 Thread Vladimir 'phcoder' Serbinenko
On Sat, Jul 18, 2009 at 8:45 PM, Robert Millan wrote: > On Fri, Jul 17, 2009 at 05:51:40PM +0100, Colin Watson 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

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

2009-07-18 Thread Vladimir 'phcoder' Serbinenko
On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan 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 alr

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

2009-07-18 Thread Robert Millan
On Fri, Jul 17, 2009 at 05:51:40PM +0100, Colin Watson 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. Unfortunately > > such me

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

2009-07-18 Thread Robert Millan
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_partiti

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

2009-07-17 Thread Colin Watson
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. Unfortunately > such medium is often formated with a flavour of FAT which shares its > signat