Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cannot access Raspberry Pi Pico filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
nikbott
n00b
n00b


Joined: 04 Dec 2021
Posts: 8

PostPosted: Sat Dec 11, 2021 12:00 am    Post subject: [SOLVED] Cannot access Raspberry Pi Pico filesystem Reply with quote

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:

[   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:

sdd      8:48   1   128M  0 disk


so when trying to mount, it fails:
Code:

mount: /mnt/pico: wrong fs type, bad option, bad superblock on /dev/sdd, missing codepage or helper program, or other error.

_________________
still compiling


Last edited by nikbott on Sat Dec 11, 2021 5:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31280
Location: here

PostPosted: Sat Dec 11, 2021 8:15 am    Post subject: Reply with quote

Moved from Kernel & Hardware to Gentoo on ARM.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54579
Location: 56N 3W

PostPosted: Sat Dec 11, 2021 12:20 pm    Post subject: Reply with quote

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:
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.
Back to top
View user's profile Send private message
nikbott
n00b
n00b


Joined: 04 Dec 2021
Posts: 8

PostPosted: Sat Dec 11, 2021 4:00 pm    Post subject: Reply with quote

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

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:

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:

# 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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54579
Location: 56N 3W

PostPosted: Sat Dec 11, 2021 4:12 pm    Post subject: Reply with quote

nikbott,

What does
Code:
grep MSDOS /usr/src/linux/.config
tell?

Code:
$ 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:
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.
Back to top
View user's profile Send private message
nikbott
n00b
n00b


Joined: 04 Dec 2021
Posts: 8

PostPosted: Sat Dec 11, 2021 4:32 pm    Post subject: Reply with quote

Here is the output of the grep:
Code:

# 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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54579
Location: 56N 3W

PostPosted: Sat Dec 11, 2021 4:37 pm    Post subject: Reply with quote

nikbott,

Code:
# 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.
Back to top
View user's profile Send private message
nikbott
n00b
n00b


Joined: 04 Dec 2021
Posts: 8

PostPosted: Sat Dec 11, 2021 5:37 pm    Post subject: Reply with quote

Yeah, recompiled the kernel and now it mounts flawlessly. Thanks!
_________________
still compiling
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum