[SOLVED] Upgrade from Buster to Bulleye now auto mounts my Micropython pyboard as read-only!
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Upgrade from Buster to Bulleye now auto mounts my Micropython pyboard as read-only!
A few weeks ago I finally upgraded my Debian system from Buster to Bulleye. I am running Debian with the Cinnamon DE.
The upgrade went fine.
However, I find that when I plug in my Micropython pyboard (v1.1) (via USB) it now automounts read-only! This is not good and did not happen before the upgrade.
If I plug in my pyboard to an older Debian system I have it automounts correctly (as rw), so I am pretty sure the upgrade changed something that makes it automount ro.
I tried modifying /etc/udisks2/udisks2.conf but that did not work, perhaps I did that wrong? Here is the two lines line I added:
I also looked at /lib/udev/rules.d/80-udisks2.rules and /lib/udev/rules.d/99-systemd.rules but they did not contain anything I understood as relevant... I really do not understand this stuff well enough.
IF I could simply add an entry to my /etc/fstab file that would be great, but I am not certain how to properly write that entry. My pyboad has always automounted properly (rw) with no added entries in /etc/fstab or any other config file.
keith@ada:~$ mount
/dev/sdh1 on /media/keith/PYBFLASH type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
keith@ada:~$ mount
/dev/sdh1 on /media/keith/PYBFLASH type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
keith@ada:~$ ls -ahl /dev/sdh1
brw-rw---- 1 root disk 8, 113 Jun 5 21:56 /dev/sdh1
When you are creating a new system the user ids are numbers which are assigned starting at 1000 in a first come first numbered order. If you have created your users in a different order in buster and bullseye then you could be in the situation that the user id number used on the hard drive files is assigned to different user names on the two systems. That could explain what caused your problem.
Last edited by jailbait; 06-05-2022 at 10:38 PM.
Reason: typo
No idea, but it should be listed under /etc/group. Maybe a group formed for those devices?
You can change the groups using the "chgrp" command but that device is not a disk which I am more familiar with. In essence I do not know if that is a correct approach (changing the group, which can give you read/write permissions).
Maybe I'm wrong, but shouldn't /dev/sdh1 belong to the user and not root?
No, root is correct.
Code:
brw-rw---- 1 root disk 8, 0 Jun 5 09:11 /dev/sda
brw-rw---- 1 root disk 8, 1 Jun 5 09:11 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jun 5 09:11 /dev/sda2
Root is the owner and disk is the group name. Devices are given a major, minor number based on its type. The 8 is major with 8 and 65 being assigned to SCSI devices i.e. /dev/sdx. The minor is associated with the partition number.
There must be something specific with the pyboard, the kernel version and how it is being recognized.
aris@hb8DebianS:~$ ls -l /dev/sda1
brw-rw---- 1 root disk 8, 1 May 24 17:34 /dev/sda1
I had a problem about two weeks ago with the device listed above. Somehow, without any input of mine (quite sure), the ownership of the partition was taken by user and group root.
This is the fix I used
aris@hb8DebianS:~$ ls -l /media/aris/Seagate2Tc/
total 44
drwxr-xr-x 3 aris aris 4096 May 10 22:03 aris.hp2Debian
drwxr-xr-x 7 aris aris 4096 May 15 08:22 Clonezilla
drwxr-xr-x 13 aris aris 4096 May 13 12:24 Hardware
drwxr-xr-x 6 aris aris 4096 May 11 01:40 ISO.0
drwx------ 2 aris root 16384 Mar 24 20:34 lost+found
drwxrwxrwx 5 aris aris 4096 May 16 16:47 WindowsImageBackup
drwxrwxrwx 10 aris aris 4096 Jan 2 21:03 WindowsLocal_2021
I am not sure whether this can be applied to the situation described here as I do not know what the device "/dev/sdh1 on /media/keith/PYBFLASH" is. If it is flash memory it could work.
Last edited by Debian6to11; 06-06-2022 at 01:55 PM.
Reason: typo
Someone on the micropython forum (elsewhere) hinted I should check dmesg... and sure enough I had inadvertently corrupted the filesystem by disconnecting while it was still mounted. The new Debian version automounted it ro due to the corruption, while my older Debian system did not, hence my confusion.
I could not figure out how to properly mount the pyboard rw on my newer Debian system so I plugged it into my old system and ran fsck on it...
Code:
keith@e4300 ~ $ sudo fsck.vfat -a -v -V -t -p /dev/sdc1
fsck.fat 3.0.28 (2015-05-16)
Checking we can access the last sector of the filesystem
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
512 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
1 FATs, 12 bit entries
512 bytes per FAT (= 1 sectors)
Root directory starts at byte 1024 (sector 2)
512 root directory entries
Data area starts at byte 17408 (sector 34)
190 data clusters (97280 bytes)
63 sectors/track, 255 heads
256 hidden sectors
224 sectors total
Starting check/repair pass.
/main.py
Contains a free cluster (116). Assuming EOF.
/main.py
File size is 603 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
Checking for bad clusters.
Reclaiming unconnected clusters.
Starting verification pass.
Checking for unused clusters.
Performing changes.
/dev/sdc1: 23 files, 118/190 clusters
Now when I plug my pyboard into my newer Debian system it automounts properly as rw, and all is well :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.