Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-05 Thread Matt Kraai

On Mon, Mar 04, 2002 at 05:37:17PM -0500, Colin Walters wrote:
 On Mon, 2002-03-04 at 16:19, Matt Kraai wrote:
 
  No  The file system must be mounted for is_fstype, and hence
  verify_powerpc_mount, to work correctly  Since it isn't
  mounted, is_fstype always returns false, so verify_powerpc_mount
  always decides that the /boot partition file system is not
  supported
 
 Ah, right  That's rather a bummer  I think I see how to solve this
 though; we just pass verify_powerpc_mount the type of the partition we
 want to mount it as  Maybe this will work:

It worked in my testing (an iBook2)  I say commit it

Matt



msg16676/pgp0.pgp
Description: PGP signature


Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-05 Thread Colin Walters

On Tue, 2002-03-05 at 11:55, Matt Kraai wrote:
 It worked in my testing (an iBook2).  I say commit it.

Done.  Thanks for testing this.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Bug#136818: [powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Matt Kraai

Package: boot-floppies
Version: N/A; reported 2002-03-04

The boot-floppies do not permit a /boot partition to be
mounted  They complain that its file system is not supported by
the boot loader

Matt



msg16593/pgp0.pgp
Description: PGP signature


Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Colin Walters

On Mon, 2002-03-04 at 13:57, Matt Kraai wrote:
 Package: boot-floppies
 Version: N/A; reported 2002-03-04
 
 The boot-floppies do not permit a /boot partition to be
 mounted  They complain that its file system is not supported by
 the boot loader

Ok  Here's my suggested patch  It is not yet tested, but it *should*
work  I think






Index: partition_config.c
===
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/partition_config.c,v
retrieving revision 1.146
diff -u -u -r1.146 partition_config.c
--- partition_config.c  2002/02/17 22:00:23 1.146
+++ partition_config.c  2002/03/04 20:40:55
 -119,40 +119,40 
 #if #cpu(powerpc)
 int
 verify_powerpc_mount(char *mount_point) {
-/* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
-   like hfs will break make-bootable.
-   quik can only read ext2. */
-if ((!strcmp(mount_point, /boot)) || (!strcmp(mount_point, /boot/))) {
-  if (strstr(Arch2, PowerMac)) {
-   int is_newworld = !strcmp(Arch3, NewWorld);
-   if (!is_fstype(/boot, ext2)
-   ||
-   (is_newworld ? !is_fstype(/boot, ext3)
-|| !is_fstype(/boot, xfs)
-/* Should someone WANT to lose their data...*/
- || !is_fstype(/boot, reiserfs)
-: 0))
- {
-   snprintf(prtbuf, sizeof(prtbuf),
-_(The file system type you have chosen for /boot 
-  is not compatible with the %s bootloader. Please 
-  choose one of: ext2%s%s),
-is_newworld ? yaboot : quik,
-is_ext3 ?  ext3 : ,
-is_xfs ?  xfs : );
-   problemBox(prtbuf,
-  _(Choose another file system));
-   return 1;
- }
-   else if (!(((Arch3 != NULL)  (0 == strcmp(Arch3, NewWorld))) || (0 == 
strcmp(Arch2, chrp
- if (DLG_NO == yesNoBox(_(Quik may not work correctly if a separate 
-  /boot partition is used. Do you wish to continue 
-  mounting /boot?),
-_(Quik problems with /boot not on /)))
-   return 1;
-  }
+  /* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
+ like hfs will break make-bootable.
+ quik can only read ext2. */
+  if (!strncmp(mount_point, /target/boot, 12)) {
+if (strstr(Arch2, PowerMac)) {
+  int is_newworld = !strcmp(Arch3, NewWorld);
+  if ((!is_newworld
+   !is_fstype(/boot, ext2))
+ || (is_newworld
+  !is_fstype(/boot, ext2)
+  !is_fstype(/boot, ext3)
+  !is_fstype(/boot, xfs)
+  !is_fstype(/boot, reiserfs)))
+   {
+ snprintf(prtbuf, sizeof(prtbuf),
+  _(The file system type you have chosen for /boot 
+is not compatible with the %s bootloader. Please 
+choose one of: ext2%s%s),
+  is_newworld ? yaboot : quik,
+  is_ext3 ?  ext3 : ,
+  is_xfs ?  xfs : );
+ problemBox(prtbuf, _(Choose another file system));
+ return 1;
+   }
+  else if (!(((Arch3 != NULL)  (0 == strcmp(Arch3, NewWorld)))
+|| (0 == strcmp(Arch2, chrp
+   if (DLG_NO == yesNoBox(_(Quik may not work correctly if a separate 
+/boot partition is used. Do you wish to continue 
+mounting /boot?),
+  _(Quik problems with /boot not on /)))
+ return 1;
 }
-return 0;
+  }
+  return 0;
 }
 #endif
 
 -639,16 +639,16 
 else {
   mount_point = strdup(mount_points[status].tag);
 }
-#if #cpu(powerpc)
-if (verify_powerpc_mount(mount_point))
-   return 1;
-#endif
 if (NULL == mount_point) return 1;
 real_mount_point = (char *)malloc(9 + strlen(mount_point));
 strcpy(real_mount_point, /target);
 if (mount_point[0] != '/')
strcat(real_mount_point, /);
 strcat(real_mount_point, mount_point);
+#if #cpu(powerpc)
+if (verify_powerpc_mount(real_mount_point))
+  return 1;
+#endif
   }
 
   if (! NAME_ISDIR( real_mount_point, statbuf ) ) {



Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Matt Kraai

On Mon, Mar 04, 2002 at 03:41:54PM -0500, Colin Walters wrote:
 On Mon, 2002-03-04 at 13:57, Matt Kraai wrote:
  Package: boot-floppies
  Version: N/A; reported 2002-03-04
  
  The boot-floppies do not permit a /boot partition to be
  mounted  They complain that its file system is not supported by
  the boot loader
 
 Ok  Here's my suggested patch  It is not yet tested, but it *should*
 work  I think

No  The file system must be mounted for is_fstype, and hence
verify_powerpc_mount, to work correctly  Since it isn't
mounted, is_fstype always returns false, so verify_powerpc_mount
always decides that the /boot partition file system is not
supported

Matt



msg16596/pgp0.pgp
Description: PGP signature


Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Matt Kraai

On Mon, Mar 04, 2002 at 11:20:14PM +0100, Florian Lohoff wrote:
 On Mon, Mar 04, 2002 at 01:19:45PM -0800, Matt Kraai wrote:
  No  The file system must be mounted for is_fstype, and hence
  verify_powerpc_mount, to work correctly  Since it isn't
  mounted, is_fstype always returns false, so verify_powerpc_mount
  always decides that the /boot partition file system is not
  supported
 
 Might it be that its intentional to return false if /boot is a seperate
 filesystem ? I could imageing that there are bootloaders which
 are not able to follow a interpartition symlink delo and arcboot
 the Decstation and SGI Indy/Indigo2 bootloaders definitly cant thus
 it would be a good idea not to offer a seperate /boot partition and
 to give an error that the architectures bootloader is not able
 to cope with that

The PowerPC boot loaders support a separate /boot partition (or
so the comments lead me to believe)  If your's doesn't, feel
free to add sanity checks for your architecture

Matt



msg16602/pgp0.pgp
Description: PGP signature


Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Stephen R Marenka

On Mon, Mar 04, 2002 at 02:32:31PM -0800, Matt Kraai wrote:
 On Mon, Mar 04, 2002 at 11:20:14PM +0100, Florian Lohoff wrote:
  On Mon, Mar 04, 2002 at 01:19:45PM -0800, Matt Kraai wrote:
   No.  The file system must be mounted for is_fstype, and hence
   verify_powerpc_mount, to work correctly.  Since it isn't
   mounted, is_fstype always returns false, so verify_powerpc_mount
   always decides that the /boot partition file system is not
   supported.
  
  Might it be that its intentional to return false if /boot is a seperate
  filesystem ? I could imageing that there are bootloaders which
  are not able to follow a interpartition symlink. delo and arcboot
  the Decstation and SGI Indy/Indigo2 bootloaders definitly cant thus
  it would be a good idea not to offer a seperate /boot partition and
  to give an error that the architectures bootloader is not able
  to cope with that.
 
 The PowerPC boot loaders support a separate /boot partition (or
 so the comments lead me to believe).  If your's doesn't, feel
 free to add sanity checks for your architecture.

It seems to me that quik doesn't, at least not very well.

Stephen

-- 
Stephen R. Marenka If life's not fun, you're not doing it right!
[EMAIL PROTECTED]



msg16604/pgp0.pgp
Description: PGP signature


Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Colin Walters

On Mon, 2002-03-04 at 16:19, Matt Kraai wrote:

 No  The file system must be mounted for is_fstype, and hence
 verify_powerpc_mount, to work correctly  Since it isn't
 mounted, is_fstype always returns false, so verify_powerpc_mount
 always decides that the /boot partition file system is not
 supported

Ah, right  That's rather a bummer  I think I see how to solve this
though; we just pass verify_powerpc_mount the type of the partition we
want to mount it as  Maybe this will work:






Index: partition_config.c
===
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/partition_config.c,v
retrieving revision 1.146
diff -u -u -r1.146 partition_config.c
--- partition_config.c  2002/02/17 22:00:23 1.146
+++ partition_config.c  2002/03/04 22:35:09
 -118,41 +118,41 
 
 #if #cpu(powerpc)
 int
-verify_powerpc_mount(char *mount_point) {
-/* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
-   like hfs will break make-bootable.
-   quik can only read ext2. */
-if ((!strcmp(mount_point, /boot)) || (!strcmp(mount_point, /boot/))) {
-  if (strstr(Arch2, PowerMac)) {
-   int is_newworld = !strcmp(Arch3, NewWorld);
-   if (!is_fstype(/boot, ext2)
-   ||
-   (is_newworld ? !is_fstype(/boot, ext3)
-|| !is_fstype(/boot, xfs)
-/* Should someone WANT to lose their data...*/
- || !is_fstype(/boot, reiserfs)
-: 0))
- {
-   snprintf(prtbuf, sizeof(prtbuf),
-_(The file system type you have chosen for /boot 
-  is not compatible with the %s bootloader. Please 
-  choose one of: ext2%s%s),
-is_newworld ? yaboot : quik,
-is_ext3 ?  ext3 : ,
-is_xfs ?  xfs : );
-   problemBox(prtbuf,
-  _(Choose another file system));
-   return 1;
- }
-   else if (!(((Arch3 != NULL)  (0 == strcmp(Arch3, NewWorld))) || (0 == 
strcmp(Arch2, chrp
- if (DLG_NO == yesNoBox(_(Quik may not work correctly if a separate 
-  /boot partition is used. Do you wish to continue 
-  mounting /boot?),
-_(Quik problems with /boot not on /)))
-   return 1;
-  }
+verify_powerpc_mount(char *mount_point, char *type) {
+  /* yaboot can read ext2,ext3,xfs,reiserfs, but crippleware filesystems
+ like hfs will break make-bootable.
+ quik can only read ext2. */
+  if (!strncmp(mount_point, /target/boot, 12)) {
+if (strstr(Arch2, PowerMac)) {
+  int is_newworld = !strcmp(Arch3, NewWorld);
+  if ((!is_newworld
+   strcmp(type, ext2))
+ || (is_newworld
+  strcmp(type, ext2)
+  strcmp(type, ext3)
+  strcmp(type, xfs)
+  strcmp(type, reiserfs)))
+   {
+ snprintf(prtbuf, sizeof(prtbuf),
+  _(The file system type you have chosen for /boot 
+is not compatible with the %s bootloader. Please 
+choose one of: ext2%s%s),
+  is_newworld ? yaboot : quik,
+  is_ext3 ?  ext3 : ,
+  is_xfs ?  xfs : );
+ problemBox(prtbuf, _(Choose another file system));
+ return 1;
+   }
+  else if (!(((Arch3 != NULL)  (0 == strcmp(Arch3, NewWorld)))
+|| (0 == strcmp(Arch2, chrp
+   if (DLG_NO == yesNoBox(_(Quik may not work correctly if a separate 
+/boot partition is used. Do you wish to continue 
+mounting /boot?),
+  _(Quik problems with /boot not on /)))
+ return 1;
 }
-return 0;
+  }
+  return 0;
 }
 #endif
 
 -639,10 +639,6 
 else {
   mount_point = strdup(mount_points[status].tag);
 }
-#if #cpu(powerpc)
-if (verify_powerpc_mount(mount_point))
-   return 1;
-#endif
 if (NULL == mount_point) return 1;
 real_mount_point = (char *)malloc(9 + strlen(mount_point));
 strcpy(real_mount_point, /target);
 -710,7 +706,7 
 
   if (!(strcmp(xfsmagic, XFSB))) { /* XFS */
 #if #cpu(powerpc)
-   if (verify_powerpc_mount(mount_point))
+   if (verify_powerpc_mount(mount_point, xfs))
  return 1;
 #endif
INFOMSG(Mounting XFS partition %s on %s, partition-name, mount_point);
 -722,7 +718,7 
   else if (!(strcmp(shfsmagic, ReIsErFs)  strcmp(shfsmagic, ReIsEr2Fs))) /* 
reiserfs */
{
 #if #cpu (powerpc)
-   if (verify_powerpc_mount(mount_point))
+   if (verify_powerpc_mount(mount_point, reiserfs))
  return 1;
 #endif
  snprintf(prtbuf, sizeof(prtbuf), _(The \notail\ option is required on the 
/boot 



Bug#136818: powerpc/new-powermac] will not mount /boot partition

2002-03-04 Thread Matt Kraai

On Mon, Mar 04, 2002 at 05:37:17PM -0500, Colin Walters wrote:
 On Mon, 2002-03-04 at 16:19, Matt Kraai wrote:
 
  No  The file system must be mounted for is_fstype, and hence
  verify_powerpc_mount, to work correctly  Since it isn't
  mounted, is_fstype always returns false, so verify_powerpc_mount
  always decides that the /boot partition file system is not
  supported
 
 Ah, right  That's rather a bummer  I think I see how to solve this
 though; we just pass verify_powerpc_mount the type of the partition we
 want to mount it as  Maybe this will work:

This looks good  I'll test it tomorrow unless someone beats me
to it

Matt



msg16608/pgp0.pgp
Description: PGP signature