[Solved] Dirty Ext2 FS every time on FireBee...what's the issue??

All things related to the Atari Coldfire Project

Moderators: Mathias, Mug UK, moondog/.tSCc., [ProToS], Galvez, Moderator Team

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Sat Sep 20, 2014 1:51 pm

helmut wrote:Why don't you use Alans builds?

http://gentoo.atariforge.org/files/sys-fs/

Oh, I didn't notice that Alan had upgraded e2fsprogs to 1.42.9.
Thanks for the hint.

BTW: Where are the sources?

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby helmut » Sat Sep 20, 2014 2:31 pm

http://e2fsprogs.sourceforge.net, mentioned in the README.

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Sat Sep 20, 2014 2:40 pm

helmut wrote:http://e2fsprogs.sourceforge.net, mentioned in the README.

As said previously, mass storage software needs to be patched for FreeMiNT (support for drive letters, XHDI...) and I don't see that in the official sources (i.e. lib/ext2fs/mint_io.c). So I suspect that the patch is missing.

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11993
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby wongck » Sat Sep 20, 2014 2:42 pm

What I don't get it is why my HDD from my Falcon with ext2 fs suddenly went bad and using e2fsck on it made it worst.

My CF ext2 fs can be answered by this wrong version, since it was created using Gparted.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby helmut » Sat Sep 20, 2014 2:43 pm

You can try the patch from the sparemint-rpm. Unfortunately Alan does not provide his patches.

BTW: Maybe this is for you firebee-users:

E2fsck will now automatically fix a last mount time or last write time which is in the future in preen mode, instead of aborting the fsck check.

See:

http://e2fsprogs.sourceforge.net/e2fspr ... ml#1.42.12

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby helmut » Sat Sep 20, 2014 2:46 pm

wongck wrote:What I don't get it is why my HDD from my Falcon with ext2 fs suddenly went bad and using e2fsck on it made it worst.



That I don't know. But I remember when I used an MO-drive with 1024-byte-sector-size that ext2 destroyed one medium after the other. I ended up using a patched minix-fs which worked. These things are expensive to debug ...

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Mon Sep 22, 2014 7:43 am

helmut wrote:There is a tool dumpe2fs which displays all relevant parameters of a drive. No need for a diskeditor I guess.


Thanks, I did not know about this tool.

helmut wrote:Maybe you have Maximum mount count set 0?


No. And e2fsck is very specific - "Not cleanly unmounted". If the maximum mount count was hit e2fsck would tell me that.

helmut wrote:Third the versions of mke2fs and e2fsck should match.


I think you're on to something here. I did not have time this weekend to test with an ext2 partition created with Alan's port of the ext2-tools. But if I connect the SD-card to my Linux computer it says that the partition is clean. So I'm pretty sure that MiNT itself does everything correct, and that the problem is related to e2fsck. Either wrong version or a bug. When I run e2fsck on my Milan I can see that it has done some changes to the superblock, and if I run e2fsck again it reports that the filesystem is clean. But when MiNT shuts down, it updates the superblock and e2fsck thinks it's dirty again. But as I said, my Linux computer say it's OK.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11993
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby wongck » Tue Sep 23, 2014 3:04 pm

helmut wrote:Why don't you use Alans builds?
http://gentoo.atariforge.org/files/sys-fs/


I reformat my ext2 fs with the tools from Alan.
Replaced my ext2 fs tools with the tools from Alan.

So e2fsck are from the same set/versions of tools.

Only slight improvement... it does not complain about the date any more.... great! :)
However, it still complains that the filesystem was not unmounted cleanly.

I placed 2 e2fsck one after another, with 3 x sync in between.
The 2nd e2fsck says..... clean. :!:

Even if I immediately do a CTRL-Q -> reboot when the desktop comes up, I still get a dirty unmount. :(
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Tue Sep 23, 2014 5:14 pm

wongck wrote:Even if I immediately do a CTRL-Q -> reboot when the desktop comes up, I still get a dirty unmount. :(

The only method I know for clean unmount is to do Ctrl+Alt+H then OK in XaAES.
"reboot when the desktop comes up" is certainly not a clean unmount, regardless of how many "sync" you could have done before.

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Tue Sep 23, 2014 6:12 pm

Control+Alt+Del will sync all filesystems and then reset.

Anyway, my results are the same as wongck. I don't think it's a problem with the partition or with the shutdown procedure, because if you shut down MiNT and then connect the disk/CF/SD to a Linux computer it will find the ext2-filesystem clean. It looks more and more like a problem with e2fsck.

Edit: Control+Q from Teradesk will initiate a proper shutdown.
Last edited by joska on Tue Sep 23, 2014 7:25 pm, edited 1 time in total.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Tue Sep 23, 2014 7:17 pm

joska wrote:Control+Alt+Del will sync all filesystems and then reset.

I confirm, this works fine on the FireBee, with both EmuTOS and FireTOS. BUT...

joska wrote:Anyway, my results are the same as wongck. I don't think it's a problem with the partition or with the shutdown procedure, because if you shut down MiNT and then connect the disk/CF/SD to a Linux computer it will find the ext2-filesystem clean.


Correct.

Here is my experience, with the very same MiNT setup:

- With EmuTOS, everything works as expected. I can restart the system many times with Ctrl+Alt+Del, without any e2fsck, and the kernel never complains. Of course, if I push the reset button without clean shutdown/reset procedure, the partition becomes dirty and FreeMiNT complains at startup. When I manually run e2fsck, everything is fine again.

- With FireTOS, even if the partition is initially clean, the kernel says that it is dirty. It seems that FireTOS sets the dirty flag when booting... how ??

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Tue Sep 23, 2014 11:01 pm

BlankVector wrote:Oh, I didn't notice that Alan had upgraded e2fsprogs to 1.42.9.


I have just ported Alan's patch to the latest e2fsprogs 1.42.12:
http://vincent.riviere.free.fr/soft/m68 ... e2fsprogs/

Support for all recent ext2 features is included, including ext4 stuff. But of course the FreeMiNT kernel has no support for those advanced features.

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Wed Sep 24, 2014 8:39 am

BlankVector wrote:- With EmuTOS, everything works as expected. I can restart the system many times with Ctrl+Alt+Del, without any e2fsck, and the kernel never complains. Of course, if I push the reset button without clean shutdown/reset procedure, the partition becomes dirty and FreeMiNT complains at startup. When I manually run e2fsck, everything is fine again.

- With FireTOS, even if the partition is initially clean, the kernel says that it is dirty. It seems that FireTOS sets the dirty flag when booting... how ??


I'm not sure if we're talking about the same issue. I don't see any complaints from the kernel in my case. Only e2fsck complains. I find the following string in ext2.xfs: "Ext2-FS [%c]: WARNING: mounting fs with errors, running e2fsck is recommended"". I guess this is the one you see, which suggests that the partition really is dirty.

Hmm... I would have to look at the debug settings. Maybe I have this error too, but it's not getting printed to the console.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Wed Sep 24, 2014 9:18 am

joska wrote:I'm not sure if we're talking about the same issue. I don't see any complaints from the kernel in my case. Only e2fsck complains.

I don't run automatically e2fsck at startup, so I don't see its messages (unless I run it manually afterwards).

When I say that the kernel complains, it is an alert window which pops up when the desktop shows up.
It may appear or not depending of the settings of "alert_windows" in xaaes.cnf.
On my system, it is commented out (default):
#alert_windows = 0x0000

That kernel alert seems to be consistent with the e2fsck diagnostic, when I run it afterwards.

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Wed Sep 24, 2014 10:58 am

I don't think FireTOS mess with the ext2-partition directly.

MiNT should clear the EXT2_VALID_FS flag at some point. I don't know when. Maybe something with FireTOS cause MiNT to do this earlier than with EmuTOS. Maybe some XHDI issue. I'm just guessing :)
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 11993
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby wongck » Wed Sep 24, 2014 1:47 pm

joska wrote:I'm not sure if we're talking about the same issue. I don't see any complaints from the kernel in my case. Only e2fsck complains. I find the following string in ext2.xfs: "Ext2-FS [%c]: WARNING: mounting fs with errors, running e2fsck is recommended"". I guess this is the one you see, which suggests that the partition really is dirty.


Joska... same here.
Only e2fsck complains.
The above alert message is not showing up during the boot up.
My debug/trace level (mint.ini) is set to 3.
Alert windows in XaAES is also turned on.

So the ext2 fs should be looking clean as Mint it self seems not complaining.

So may be I will just remove e2fsck from the bootup sequence like Vincent, and rely on experience (or lack of :lol: ) to run e2fsck manually.
My Stuff: FB/Falcon CT63+CTPCI_ATI_RTL8139 14+512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Wed Sep 24, 2014 7:26 pm

joska wrote:Hmm... I would have to look at the debug settings. Maybe I have this error too, but it's not getting printed to the console.


And I do. I raised debug-level by one and now MiNT itself is complaining about the ext2-partition. But it's definitely clean after shut-down. So something happens during boot.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Wed Sep 24, 2014 8:46 pm

joska wrote:So something happens during boot.

We agree.

I know that FireTOS tries to create some files on C: at boot (IIRC, an accessory, maybe TFTP folder...). Maybe something similar happens on the ext2 D: ? That's improbable, since FireTOS does not know ext2...

Faucon2001
Atari Super Hero
Atari Super Hero
Posts: 647
Joined: Sat Oct 26, 2013 11:19 pm
Location: Brasil
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby Faucon2001 » Wed Sep 24, 2014 11:48 pm

Would'nt it have something to see with the "i don't know what it's for" CT60TEMP.APP which is automatically installed at boot with accessories?
Philippe

Firebee, Falcon, STE, Aranym Box, Hatari Pi Box.
My music http://www.philippeworld.net/
My photography http://phil-67.deviantart.com/
EasyAraMint, BeeKey and BeePi https://sites.google.com/site/emaappsarch/home

BlankVector
Captain Atari
Captain Atari
Posts: 408
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby BlankVector » Thu Sep 25, 2014 7:08 am

Faucon2001 wrote:Would'nt it have something to see with the "i don't know what it's for" CT60TEMP.APP which is automatically installed at boot with accessories?

Yes, that's that one.
It is the proof that FireTOS dirties C: at boot.

But what about D:, formatted with ext2?? I know that EmuTOS carefully avoids to prevent "mounting" unknown filesystems, maybe FireTOS behaves differently?

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Thu Sep 25, 2014 7:26 am

BlankVector wrote:It is the proof that FireTOS dirties C: at boot.


Yes, incredibly annoying. But I think this file is created before MiNT is started, so it should not affect ext2 partitions at all. I just wish that Didier would drop this acc completely. It's completely irrelevant and of no use at all on the Firebee.

BlankVector wrote:But what about D:, formatted with ext2?? I know that EmuTOS carefully avoids to prevent "mounting" unknown filesystems, maybe FireTOS behaves differently?


The s_state flag in the superblock is set by ext2.xfs. The key to figure out this problem is to find out exactly *when* this happens. My guess is that something in FireTOS cause MiNT to set this flag immediately after mounting.

I see that there are lots of debug messages inside ext2.xfs. Booting with a debug kernel/xfs would probably shed more light on this issue.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1445
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby frank.lukas » Mon Nov 17, 2014 11:14 am

I use Extfs for Mac OSX from Paragon to mount the ext2 Partition from my Firebee. A Windows Version (for free) go there -> http://www.paragon-software.com/home/ex ... index.html

I must use the "e2fsck d:" before I Shutdown the Firebee and put the CF Card in the CardReader from the Mac, so that the Medium is Clean. I think MiNT on the Firebee not unmount the ext2 Partition correctly ...

I use the e2fsprogs from Vincent ...
Last edited by frank.lukas on Mon Nov 17, 2014 11:28 am, edited 1 time in total.
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Mon Nov 17, 2014 11:25 am

I think shutdown is OK, because if I shut down my Firebee normally and then mount the SD-card on my Linux PC, the filesystem is clean.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1445
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby frank.lukas » Tue Nov 18, 2014 11:43 am

OSX seems to be a little more sensitive than Linux, I think ...

I have no Idea !

I have a new Version from Extfs for OSX, so I must test it again ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Dirty Ext2 FS every time on FireBee...what's the issue??

Postby joska » Tue Nov 18, 2014 12:23 pm

I've not had much time or motivation to work on this lately so I'm not any closer to a solution. However, I have tried to reproduce this problem on my Milan without success. So it does suggest that this is a Firebee-specific problem. Or maybe even a FireTOS-specific problem, it would be interesting to test this on a CT6x.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64


Social Media

     

Return to “FireBee”

Who is online

Users browsing this forum: No registered users and 1 guest