LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 09-25-2022, 01:19 PM   #1
Bravo_97
Member
 
Registered: Nov 2010
Location: US-Pennsylvania
Distribution: Slackware64-15.0, Slackware-current, Slackware64-current, Slackwareaarch64-current
Posts: 32

Rep: Reputation: 12
aarch64 SLKroot as f2fs


Is anyone running f2fs on their root partiton on Slackwareaarch64-current?

I have a Raspberry Pi 4 with only a micro SD (uSD). The uSD card formatted as ext4 lasted for approximately two years as I ran slarm64 until Slackwareaarch64-current was released earlier this year. The original uSD died last week. I have a new uSD that I would like to try with f2fs to see if lasts longer than using ext4. I followed the steps listed in the wiki page, created the partitions, ran the installer, subsituting f2fs for ext4, and dropped into a shell after the install. I chroot /mnt, edited the sample load_kernel_modules.post to include:
Code:
modprobe crc32c_generic
as I read in another post this was needed in the initrd on x86 for f2fs. I ran
Code:
os-initrd-mgr --sync-loaded-kmods
and rebooted.

On boot I see the parameters appened from extlinux.conf
Code:
APPEND earlyprintk rootfstype=f2fs root=LABEL=SLKroot  console=tty1
then about 15 seconds in the boot the below message is on screen
Code:
Executing user-supplied script: /load_kernel_modules.post
and a few lines later
Code:
mount: can't find /mnt in /etc/fstab
and drops into a busybox shell.

lsblk of uSD viewed on another machine:
Code:
NAME   FSTYPE FSVER LABEL     UUID
sdb                                                                               
├─sdb1 vfat   FAT32 SLKhwm_bw FFF2-2EEE                                           
├─sdb2 ext4   1.0   SLKboot   47920534-6316-4307-adfd-11a50637e467                
├─sdb3 swap   1     SLKswap0  c6f628b3-2c8f-49c9-bd30-48b8e55a4672                
└─sdb4 f2fs   1.15  SLKroot   639d0191-2150-4ab9-bf24-7b2dfcedf7f4

/etc/fstab:
Code:
LABEL=SLKswap0   swap             swap        defaults         0   0
LABEL=SLKroot   /                f2fs        defaults         1   1
# This is the SD card that contains an ext4 file system, housing the
# Linux Kernel and Slackware OS InitRD (Operating System Initial RAM Disk).
LABEL=SLKboot    /boot            ext4        errors=remount-ro 0   1
# Hardware Model's initial Boot Loader assets:
LABEL=SLKhwm_bw  /boot/platform/hwm_bw vfat   errors=remount-ro 0   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       nosuid,nodev,noexec 0   0
Any idea what I could be missing?

I have a second RPi4 running ext4 on the root partition that was kept in the box until Slackwareaarch64 was released. I figure that uSD should have another year or so of life remaining.

Thank you!
 
Old 09-25-2022, 09:29 PM   #2
gsl
Member
 
Registered: Jun 2007
Location: Australia
Distribution: Slackware
Posts: 76

Rep: Reputation: 44
I don't think it's a problem with using f2fs for the root filesystem. I've used f2fs a bit and it just works without needing to load the crc32-generic module. I did have that problem on x86_64 back in the day, pre-15.0, but I don't know if it's still an issue there.

I am guessing you have a newer RPi4 or RPi400 and you have encountered the problem discussed here where the mmc device (SD card) doesn't show up reliably. I see the same error as you when I reboot after installing. I think the module you need to load is sdhci-iproc. See Brent's instructions for adding the module to the initrd. I also found I needed to add irqpoll to the APPEND line in extlinux.conf.

If you can get it to boot after that, you can try building the official RPi kernel and using that instead which shouldn't need the work-arounds. Or reinstall using SaRPi which has f2fs built in, not a module.

Geoff.

Last edited by gsl; 09-25-2022 at 09:30 PM. Reason: fix markup
 
Old 09-26-2022, 12:38 PM   #3
Bravo_97
Member
 
Registered: Nov 2010
Location: US-Pennsylvania
Distribution: Slackware64-15.0, Slackware-current, Slackware64-current, Slackwareaarch64-current
Posts: 32

Original Poster
Rep: Reputation: 12
Thank you, Geoff! That solved the problem - adding
Code:
irqpoll
to the APPEND line of
Code:
/boot/extlinux/extlinux.conf
in addition to the info in Brent's post.
 
1 members found this post helpful.
Old 09-29-2022, 12:37 PM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Quote:
Originally Posted by gsl View Post
I don't think it's a problem with using f2fs for the root filesystem. I've used f2fs a bit and it just works without needing to load the crc32-generic module. I did have that problem on x86_64 back in the day, pre-15.0, but I don't know if it's still an issue there.

I am guessing you have a newer RPi4 or RPi400 and you have encountered the problem discussed here where the mmc device (SD card) doesn't show up reliably. I see the same error as you when I reboot after installing. I think the module you need to load is sdhci-iproc. See Brent's instructions for adding the module to the initrd. I also found I needed to add irqpoll to the APPEND line in extlinux.conf.

If you can get it to boot after that, you can try building the official RPi kernel and using that instead which shouldn't need the work-arounds. Or reinstall using SaRPi which has f2fs built in, not a module.

Geoff.
The f2fs module is loaded automatically as a module by the load_kernel_modules scripts within the initrd. The f2fs module is automatically accounted for by the os-initrd-mgr script during a fresh install. Kernel upgrades using packages from SA64 will run the os-initrd-mgr during the kernel_armv8 post install script. The SA64 installer has the f2fs-tools package included.

The Aarch64 port was designed to boot from SD cards on the Raspberry Pi 3/4 and to use a USB connected SATA as the root file system. The SD card issues prevent the SD card from being recognized by the system during the early part of the boot process. Once the boot process reaches the ramdisk (initrd-armv8), and reaches a login prompt, the SD card should be visible with "lsblk" or "df -h" commands. A SD card as the /boot partition AND the root disk does not boot reliably.

The reference guide is useful to understand further:
SA64 Development Reference Guide
and the shell scripts used to configure which kernel modules load at boot time:
SlkOS-initrd-overlay

Raspberry Pi 3 and Raspberry Pi 4 kernel module lists loaded by the initrd-armv8 at boot.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Initial F2FS File-System Results Are Impressive LXer Syndicated Linux News 0 10-21-2012 03:50 PM
LXer: Open-source Flash file system F2FS released by Samsung LXer Syndicated Linux News 0 10-09-2012 12:10 PM
LXer: Samsung contributes F2FS NAND filesystem to Linux LXer Syndicated Linux News 0 10-08-2012 12:30 PM
LXer: Samsung Introduces New Linux File-System: F2FS LXer Syndicated Linux News 0 10-05-2012 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration