Linux PARISC architecture development
 help / color / mirror / Atom feed
* palo not working on ext2/ext3 partitions
@ 2019-07-01 19:54 James Bottomley
  2019-07-01 20:05 ` Helge Deller
  0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2019-07-01 19:54 UTC (permalink / raw)
  To: linux-parisc

I recently had the pleasure of a complete reinstall and found that I
can't set up palo on the new system (at least not palo that loads from
an ext2/ext3 filesystem).  The problem doesn't seem to be within palo
itself, but the fact that mke2fs is no longer working for us.  The
symptom I see is that after a couple of uses the palo partition
corrupts itself and then e2fsck destroys the iplboot stored in the
badblocks list.

The problem seems to be with the badblock list because if I do

palo -I /dev/sdb

Followed by a fsck -f on the palo partition, it finds errors and wants
to clear the badblock inode.

I can reproduce this simply by doing

dd if=/dev/zero of=bbtest.img bs=1M count=100
losetup /dev/loop0 bbtest.img
a=237; while [ $a -le 450 ]; do echo $a >> bblist.txt; a=$[$a+1]; done
mke2fs -b 1024 -l /home/jejb/bblist.txt  /dev/loop0
e2fsck -f /dev/loop0

With no palo involvement, so I don't think it's our fault.

I'll take this to the ext2 tools development list.  Whatever it is
seems to be really old because I unearthed an mke2fs from 2011 that
still has the problem.

James


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: palo not working on ext2/ext3 partitions
  2019-07-01 19:54 palo not working on ext2/ext3 partitions James Bottomley
@ 2019-07-01 20:05 ` Helge Deller
  2019-07-01 21:32   ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Deller @ 2019-07-01 20:05 UTC (permalink / raw)
  To: James Bottomley, linux-parisc

On 01.07.19 21:54, James Bottomley wrote:
> I recently had the pleasure of a complete reinstall and found that I
> can't set up palo on the new system (at least not palo that loads from
> an ext2/ext3 filesystem).  The problem doesn't seem to be within palo
> itself, but the fact that mke2fs is no longer working for us.  The
> symptom I see is that after a couple of uses the palo partition
> corrupts itself and then e2fsck destroys the iplboot stored in the
> badblocks list.
>
> The problem seems to be with the badblock list because if I do
>
> palo -I /dev/sdb
>
> Followed by a fsck -f on the palo partition, it finds errors and wants
> to clear the badblock inode.
>
> I can reproduce this simply by doing
>
> dd if=/dev/zero of=bbtest.img bs=1M count=100
> losetup /dev/loop0 bbtest.img
> a=237; while [ $a -le 450 ]; do echo $a >> bblist.txt; a=$[$a+1]; done
> mke2fs -b 1024 -l /home/jejb/bblist.txt  /dev/loop0
> e2fsck -f /dev/loop0
>
> With no palo involvement, so I don't think it's our fault.
>
> I'll take this to the ext2 tools development list.  Whatever it is
> seems to be really old because I unearthed an mke2fs from 2011 that
> still has the problem.

Thanks for trying to fix it.
I'm not using this boot-from-extfs feature on any of my machines.
All boot from a palo partition, so I agree, that hasn't been tested much.

Helge

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: palo not working on ext2/ext3 partitions
  2019-07-01 20:05 ` Helge Deller
@ 2019-07-01 21:32   ` James Bottomley
  2019-07-01 21:41     ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2019-07-01 21:32 UTC (permalink / raw)
  To: Helge Deller, linux-parisc

On Mon, 2019-07-01 at 22:05 +0200, Helge Deller wrote:
> On 01.07.19 21:54, James Bottomley wrote:
> > I recently had the pleasure of a complete reinstall and found that
> > I
> > can't set up palo on the new system (at least not palo that loads
> > from
> > an ext2/ext3 filesystem).  The problem doesn't seem to be within
> > palo
> > itself, but the fact that mke2fs is no longer working for us.  The
> > symptom I see is that after a couple of uses the palo partition
> > corrupts itself and then e2fsck destroys the iplboot stored in the
> > badblocks list.
> > 
> > The problem seems to be with the badblock list because if I do
> > 
> > palo -I /dev/sdb
> > 
> > Followed by a fsck -f on the palo partition, it finds errors and
> > wants
> > to clear the badblock inode.
> > 
> > I can reproduce this simply by doing
> > 
> > dd if=/dev/zero of=bbtest.img bs=1M count=100
> > losetup /dev/loop0 bbtest.img
> > a=237; while [ $a -le 450 ]; do echo $a >> bblist.txt; a=$[$a+1];
> > done
> > mke2fs -b 1024 -l /home/jejb/bblist.txt  /dev/loop0
> > e2fsck -f /dev/loop0
> > 
> > With no palo involvement, so I don't think it's our fault.
> > 
> > I'll take this to the ext2 tools development list.  Whatever it is
> > seems to be really old because I unearthed an mke2fs from 2011 that
> > still has the problem.
> 
> Thanks for trying to fix it.
> I'm not using this boot-from-extfs feature on any of my machines.
> All boot from a palo partition, so I agree, that hasn't been tested
> much.

Heh, I suppose I'm the only one who keeps tons of kernels in the boot
partition and needs a filesystem to select them.  I suppose I did write
the feature, it makes sense I'm the only one using it.

Empirically, I've found that as long as the badblocks don't include any
block from 0-250 ext2/3 seems to be happy creating a valid filesystem. 
Unfortunately with the label being 64k (so even if the palo partition
is first it starts at an offset of 64k) and our alignment being on 256k
 absolute, we usually end up starting the badblocks at around block
224.

I also dumped an older functional palo partition and found that even
there the bad blocks start at 224, so it definitely is something that
changed in mke2fs.

James


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: palo not working on ext2/ext3 partitions
  2019-07-01 21:32   ` James Bottomley
@ 2019-07-01 21:41     ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2019-07-01 21:41 UTC (permalink / raw)
  To: Helge Deller, linux-parisc

On Mon, 2019-07-01 at 14:32 -0700, James Bottomley wrote:
[...]
> Empirically, I've found that as long as the badblocks don't include
> any block from 0-250 ext2/3 seems to be happy creating a valid
> filesystem.  Unfortunately with the label being 64k (so even if the
> palo partition is first it starts at an offset of 64k) and our
> alignment being on 256k  absolute, we usually end up starting the
> badblocks at around block 224.

Based on this observation, this fixes palo for me ... at least I can
create and check a palo ext2 partition after this.

James

---

diff --git a/palo/palo.c b/palo/palo.c
index 68b85cf..ce36612 100644
--- a/palo/palo.c
+++ b/palo/palo.c
@@ -443,8 +443,9 @@ do_cdrom(int media, int kernel32, int kernel64,
 #define EXT2_HOLE	((MAXBLSIZE + 1) / EXT2_BLOCKSIZE)
 
 /* offset in bytes before start of hole,  ext2 doesn't allow holes at
- * to cover the first four blocks of the filesystem */
-#define EXT2_OFFSET	(4*EXT2_BLOCKSIZE)
+ * to cover the first four blocks of the filesystem
+ * FIXME: a problem in mke2fs doesn't allow bad block under 250 */
+#define EXT2_OFFSET	(251*EXT2_BLOCKSIZE)
 
 int
 do_formatted(int init, int media, const char *medianame, int partition,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-01 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-01 19:54 palo not working on ext2/ext3 partitions James Bottomley
2019-07-01 20:05 ` Helge Deller
2019-07-01 21:32   ` James Bottomley
2019-07-01 21:41     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox