Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to initialize F2FS segment manager #17

Open
langfingaz opened this issue Jun 9, 2022 · 0 comments
Open

Failed to initialize F2FS segment manager #17

langfingaz opened this issue Jun 9, 2022 · 0 comments

Comments

@langfingaz
Copy link

Creating an encrypted micro-SD-card for the PinePhone with F2FS failed for me: The encrypted partition could not be mounted.

I'm not sure where this error comes from. Maybe just a bad SD card (even if it is quite new)? I thought I'll report this here in case some others have a similar error.

The script did continue after the failed mount command and did not report the error back. I'll create a merge-request to address that in a second.


Output from dmesg:

[ 1791.977711] F2FS-fs (dm-1): Mismatch valid blocks 872 vs. 237
[ 1791.977722] F2FS-fs (dm-1): Failed to initialize F2FS segment manager (-117)

Output from the script:

Which image do you want to create?
1) PinePhone
2) PineTab
#? 1
Which environment would you like to install?
1) Phosh
2) Plasma
3) Sxmo
4) Barebone
#? 3
Which filesystem would you like to use?
1) ext4
2) f2fs
#? 2
Which SD card do you want to flash?
NAME        MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
mmcblk0     179:0    0 59,2G  0 disk  
├─mmcblk0p1 179:1    0 59,2G  0 part  
└─mmcblk0p2 179:2    0    1M  0 part  
nvme0n1     259:0    0  1,9T  0 disk  
├─nvme0n1p1 259:1    0  600M  0 part  /boot
├─nvme0n1p2 259:2    0    1G  0 part  
└─nvme0n1p3 259:3    0  1,9T  0 part  
  └─crypt   254:0    0  1,9T  0 crypt /var/lib/docker/btrfs
                                      /home
                                      /
Device node (/dev/sdX): /dev/mmcblk0
Flashing image to: /dev/mmcblk0
WARNING: All data will be erased! You have been warned!
Some commands require root permissions, you might be asked to enter your sudo password.

ARE YOU SURE /dev/mmcblk0 IS WHAT YOU PICKED?
Confirm device node: /dev/mmcblk0

Downloading images...
archlinux-pinephone 100%[===================>] 924,73M  1,49MB/s    in 11m 4s  
archlinux-pinephone-sxmo-20220501.sqfs: OK
arch-install-script 100%[===================>]  14,09K  --.-KB/s    in 0s      
You'll now be asked to type in a new encryption key. DO NOT LOSE THIS!
Enter passphrase for /dev/mmcblk0p2: 
Verify passphrase: 
Key slot 0 created.
Command successful.
Enter passphrase for /dev/mmcblk0p2: 
mkfs.fat 4.2 (2021-01-31)

    F2FS-tools: mkfs.f2fs Ver: 1.15.0 (2022-05-13)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 123678720 (60390 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 5.15.45-1-lts (linux-lts@archlinux) (gcc (GCC) 12.1.0, GNU ld (GNU Binutils) 2.38) #1 SMP Mon, 06 Jun 2022 09:19:52 +0000"
Info: [/dev/mapper/tmp.d17tGUYimm] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: This device doesn't support BLKDISCARD
Info: Overprovision ratio = 0.820%
Info: Overprovision segments = 495 (GC reserved = 251)
Info: format successful
mount: /home/yoda/Downloads/archarm-mobile-fde-installer/tmp.lbrRbZ4GVy: mount(2) system call failed: Structure needs cleaning.
       dmesg(1) may have more information after failed mount system call.
Parallel unsquashfs: Using 16 processors
75292 inodes (76110 blocks) to write

[=========================================================|] 151402/151402 100%

created 61321 files
created 5517 directories
created 7707 symlinks
created 0 devices
created 0 fifos
created 0 sockets
created 6264 hardlinks
==> ERROR: /home/yoda/Downloads/archarm-mobile-fde-installer/tmp.lbrRbZ4GVy is not a mountpoint
90+1 records in
90+1 records out
745359 bytes (745 kB, 728 KiB) copied, 0,00142721 s, 522 MB/s
umount: ./tmp.lbrRbZ4GVy: not mounted
Cleaning up working directory...
rm: cannot remove './tmp.lbrRbZ4GVy/boot': Device or resource busy
All done! Please insert the card to your device and power on.
langfingaz added a commit to langfingaz/archarm-mobile-fde-installer that referenced this issue Jun 9, 2022
See dreemurrs-embedded#17 where `mount` has failed. In that case the script should exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant