Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

[SOLVED] Cannot access Raspberry Pi Pico filesystem

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
Author
Message
nikbott
n00b
n00b
User avatar
Posts: 8
Joined: Sat Dec 04, 2021 7:01 am

[SOLVED] Cannot access Raspberry Pi Pico filesystem

  • Quote

Post by nikbott » Sat Dec 11, 2021 12:00 am

Already followed the USB/Guide at the wiki and enabled all relevant kernel opts. Filesystem-wise there's few information online, but from what I found it's apparently a FAT16, which is compiled into the kernel as well.

The kernel appears to recognize the device:

Code: Select all

[   32.180625] usb 1-1.3: new full-speed USB device number 4 using ehci-pci
[   32.260729] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   32.260819] scsi host7: usb-storage 1-1.3:1.0
[   33.274668] scsi 7:0:0:0: Direct-Access     RPI      RP2              1    PQ: 0 ANSI: 2
[   33.275566] sd 7:0:0:0: [sdd] 262144 512-byte logical blocks: (134 MB/128 MiB)
[   33.276572] sd 7:0:0:0: [sdd] Write Protect is off
[   33.276574] sd 7:0:0:0: [sdd] Mode Sense: 03 00 00 00
[   33.277570] sd 7:0:0:0: [sdd] No Caching mode page found
[   33.277572] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[   33.288574] sd 7:0:0:0: [sdd] Attached SCSI removable disk
lsblk shows the block device, but ignores any partitions:

Code: Select all

sdd      8:48   1   128M  0 disk
so when trying to mount, it fails:

Code: Select all

mount: /mnt/pico: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error.
Last edited by nikbott on Sat Dec 11, 2021 5:38 pm, edited 1 time in total.
still compiling
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Sat Dec 11, 2021 8:15 am

Moved from Kernel & Hardware to Gentoo on ARM.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Dec 11, 2021 12:20 pm

nikbott,

That suggests that you don't have the right sort of partition table support in your kernel.

Is there actually a partition table on the device or is it a big floppy?
What happens if to try to mount /dev/sdd (no partition number)

What does

Code: Select all

fdisk -l /dev/sdd
say about the partition table?
Jibberish means that there is none, which I'm half expecting.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
nikbott
n00b
n00b
User avatar
Posts: 8
Joined: Sat Dec 04, 2021 7:01 am

  • Quote

Post by nikbott » Sat Dec 11, 2021 4:00 pm

The error when mounting /dev/sdd is the one i complained above, namely:

Code: Select all

mount: /mnt/pico: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error. 
Also, it really seems to have one FAT16 partition, /dev/sdd1, which is completely ignored by the kernel, as seen on lsblk.

Code: Select all

Disk /dev/sdd: 128 MiB, 134217728 bytes, 262144 sectors
Disk model: RP2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000938fc

Device     Boot Start    End Sectors  Size Id Type
/dev/sdd1           1 262143  262143  128M  e W95 FAT16 (LBA)
The kernel is compiled with these options regarding FAT filesystems:

Code: Select all

# DOS/FAT/EXFAT/NT Filesystems
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
# end of DOS/FAT/EXFAT/NT Filesystems
still compiling
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Dec 11, 2021 4:12 pm

nikbott,

What does

Code: Select all

grep MSDOS /usr/src/linux/.config
tell?

Code: Select all

$ grep MSDOS /usr/src/linux/.config
CONFIG_MSDOS_PARTITION=y
CONFIG_MSDOS_FS=m
It looks like you have a partition that starts at byte 512.

Cheat.

Code: Select all

mount -o ro,offset=512 /dev/sdd /mnt/<someplace>
That really is sdd above. The command says to mount read only the filesystem that starts 512b from the start of sdd.
That's what fdisk tells us. (No partition table required.)
The -o ro is a safety measure to get started.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
nikbott
n00b
n00b
User avatar
Posts: 8
Joined: Sat Dec 04, 2021 7:01 am

  • Quote

Post by nikbott » Sat Dec 11, 2021 4:32 pm

Here is the output of the grep:

Code: Select all

# CONFIG_MSDOS_PARTITION is not set
CONFIG_MSDOS_FS=y
Also, mounting with 512b offset seemed to work, but is there any trick to do that automatically (fstab or something)?
still compiling
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Dec 11, 2021 4:37 pm

nikbott,

Code: Select all

# CONFIG_MSDOS_PARTITION is not set
Is the problem. Your kernel cannot understand the partition table on /dev/sdd.

Fix that and you will have a /dev/sdd1 to mount.

You can probably put offset=512 into options in fstab but its not the right fix.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
nikbott
n00b
n00b
User avatar
Posts: 8
Joined: Sat Dec 04, 2021 7:01 am

  • Quote

Post by nikbott » Sat Dec 11, 2021 5:37 pm

Yeah, recompiled the kernel and now it mounts flawlessly. Thanks!
still compiling
Top
Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic