TarjeiB
Posts: 157
Joined: Thu Jul 12, 2012 3:33 pm

systemd-fsck not working with f2fs

Wed May 10, 2017 10:47 am

I've switched to f2fs on my RP3 Jessie-installation, as it seems I get less mmc corruption with it on my off-grid machine.
However, it seems systemd-fsck passes the wrong arguments to fsck.f2fs, so it can't be run on boot.

The following is from the syslog immediately after startup:

Code: Select all

systemd-fsck[114]: fsck.f2fs: invalid option -- 'y'
systemd-fsck[114]: Error: Unknown option ?
systemd-fsck[114]: Usage: fsck.f2fs [options] device
systemd-fsck[114]: [options]:
systemd-fsck[114]: -a check/fix potential corruption, reported by f2fs
systemd-fsck[114]: -d debug level [default:0]
systemd-fsck[114]: -f check/fix entire partition
systemd-fsck[114]: -t show directory tree [-d -1]
The problem is that systemd-fsck sends -y to fsck.f2fs, but fsck.f2fs does not accept this as a parameter.
Other distributions seems to have fixed this, can anyone suggest me a fix? I've already tried f2fs-tools-git and there's no -y, so it has to be fixed from systemd-fsck.

User avatar
DougieLawson
Posts: 33342
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: systemd-fsck not working with f2fs

Thu May 11, 2017 6:56 am

Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

LeSpocky
Posts: 1
Joined: Sun Jul 22, 2018 7:11 pm

Re: systemd-fsck not working with f2fs

Sun Jul 22, 2018 7:50 pm

I found two Debian bugs on this topic:
The issue is fixed upstream with f2fs-tools 1.10.0 which is already available in buster. I just manually downloaded the availably buster package and the required library from the raspbian package server and installed it on my RPi 2B running on stretch currently. Seems to work at first sight.

hommar
Posts: 135
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: systemd-fsck not working with f2fs

Wed Aug 01, 2018 5:02 pm

The entropy increases :o

I make new release Raspbian with f2fs as rootfs for russian users every month.
And every next month fsck.f2fs found more and more errors after make realese.

I can't finish make release last time with out errors. And after reboot it do not work

But befor I make latest release, I update f2fs-tools from sources, And fsck.f2fs found no errors after make realese.

I think after update f2fs kernel part. You need update outside part - f2fs-tools.
(You update kernel from 4.9 as Debian Stretch to 4.14)

PS English is not my native language, so please be kind to my mistakes.

PPS I use Raspberry PI and Raspbian for make it, not cross-platform

hommar
Posts: 135
Joined: Sat Mar 25, 2017 1:55 pm
Location: Russia, Yekaterinburg

Re: systemd-fsck not working with f2fs

Sun Aug 05, 2018 9:08 am

Then we update kernel (from 4.9 to 4.14) need update fs-tools too.
(Old tools can kill system then you use older tools for newer FS)

1) Add next release Raspbian in sources list

Code: Select all

$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
2) Set default release as "stretch"

Code: Select all

$ cat /etc/apt/apt.conf.d/default-release
APT::Default-Release "stretch";
PS this file does not exist in default system.

3) Now we can install newer tools:

Code: Select all

sudo apt-get update
sudo apt-get -t buster install f2fs-tools
Now we have newer f2fs-tools and libs for it always.

Return to “Raspbian”

Who is online

Users browsing this forum: ejolson and 26 guests