情况

情况

各位专家、各位同仁:

我在 ODROID N2+ SBC 上使用 128GB MMC 运行 Ubuntu 22.04.3,插入 USB 驱动器时重新挂载的根文件系统出现问题。

情况

“boot” 安装在 /dev/mmcblk1p1 上
“root” 安装在 /dev/mmcblk1p2 上

文件系统

# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/mmcblk1p1 /media/boot ext2 errors=continue 0 1
/dev/mmcblk1p2 / ext4 errors=remount-ro 0 1
/dev/mmcblk1p4 none swap sw 0 0
//192.168.1.1/fritz/Seagate_500G /mnt/smb/fritz.box/ cifs vers=3.0,noserverino,credentials=/var/cifscredentials_fritzbox,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
tmpfs /dev/shm tmpfs defaults,rw,nodev,nofail,noatime,nosuid 0 0
#/dev/disk/by-id/scsi-SSamsung_SSD_870_EVO_250G_4BBB38EE1A62-part1 /mnt/sda1 ext2 errors=remount-ro 0 1
#/dev/sda1 /mnt/sda1 ext2 errors=remount-ro 0 1
#/dev/sda2 /mnt/sda2 ext4 errors=remount-ro 0 1
#/dev/sda3 /mnt/sda3 ext4 errors=remount-ro 0 1
#/dev/disk/by-id/scsi-SSamsung_SSD_870_EVO_250G_4BBB38EE1A62-part2 /mnt/sda2 ext4 errors=remount-ro 0 1
#/dev/disk/by-id/scsi-SSamsung_SSD_870_EVO_250G_4BBB38EE1A62-part3 /mnt/sda3 ext4 errors=remount-ro 0 1
/dev/disk/by-id/usb-WD_Elements_25A3_56474858304D4A47-0:0-part1 /mnt/sdb1 ext4 errors=remount-ro 0 1
/dev/disk/by-id/usb-WD_Elements_25A3_56474858304D4A47-0:0-part2 /mnt/sdb2 ext4 errors=remount-ro 0 1
/dev/disk/by-id/mmc-GE4S5_0x1dd86864-part1 /mnt/mmcblk1p1 ext2 errors=remount-ro 0 1
/dev/disk/by-id/mmc-GE4S5_0x1dd86864-part2 /mnt/mmcblk1p2 ext4 errors=remount-ro 0 1
/dev/disk/by-id/mmc-GE4S5_0x1dd86864-part3 /mnt/mmcblk1p3 ext4 errors=remount-ro 0 1

SSD连接前df的结果

odroid@bonna:~$ df
Filesystem                        1K-blocks      Used  Available Use% Mounted on
tmpfs                                375432      3108     372324   1% /run
/dev/mmcblk1p2                     61017216  34021000   24468788  59% /
tmpfs                               1877144         0    1877144   0% /dev/shm
tmpfs                                  5120         4       5116   1% /run/lock
tmpfs                               1877144        20    1877124   1% /tmp
/dev/mmcblk1p1                       245728    187188      45436  81% /media/boot
/dev/mmcblk1p3                    174350364        28  165421056   1% /mnt/mmcblk1p3
//192.168.1.1/fritz/Seagate_500G  488394008 296031992  192362016  61% /mnt/smb/fritz.box
/dev/sda1                        2112647068 354410232 1650846272  18% /mnt/sdb1
/dev/sda2                        5620694080 354574192 4982778064   7% /mnt/sdb2
/dev/zram1                           738048    147536     536752  22% /opt/zram/zram1
overlay1                             738048    147536     536752  22% /var/lib/openhab/persistence
/dev/zram2                           996780     44108     883860   5% /opt/zram/zram2
overlay2                             996780     44108     883860   5% /var/log
tmpfs                                375428       124     375304   1% /run/user/1000

具有相同分区表的 SSD 驱动器被识别为 /dev/sda(x)。

问题陈述

/dev/sda2 当 USB SSD 驱动器连接时,根文件系统会立即自动重新挂载 。

odroid@bonna:~$ df
Filesystem                       1K-blocks      Used Available Use% Mounted on
tmpfs                               375432      3128    372304   1% /run
/dev/sda2                         61017216  34021016  24468772  59% /
tmpfs                              1877144         0   1877144   0% /dev/shm
tmpfs                                 5120         4      5116   1% /run/lock
tmpfs                              1877144        20   1877124   1% /tmp
/dev/mmcblk1p1                      245728    187188     45436  81% /media/boot
/dev/mmcblk1p3                   174350364        28 165421056   1% /mnt/mmcblk1p3
//192.168.1.1/fritz/Seagate_500G 488394008 296031992 192362016  61% /mnt/smb/fritz.box
/dev/zram1                          738048    147536    536752  22% /opt/zram/zram1
overlay1                            738048    147536    536752  22% /var/lib/openhab/persistence
/dev/zram2                          996780     44464    883504   5% /opt/zram/zram2
overlay2                            996780     44464    883504   5% /var/log
tmpfs                               375428       124    375304   1% /run/user/1000
/dev/sda1                           245728    187188     45436  81% /media/usb0
/dev/sda2                         61017216  23240956  35248832  40% /media/usb1
/dev/sda3                        174350364        28 165421056   1% /media/usb2

问题

什么服务/配置导致了此行为?我该怎么做才能关闭 rootfs 自动重新挂载到 /dev/sda2?

干杯

相关内容