[Bug Report] 关闭磐石系统的只读保护无效 Resolved
Tofloor
poster avatar
lzipant
deepin
17 hours ago
Author
harrisonlee@deepin:~$ sudo deepin-immutable-writable enable
This operation will set the system directory to read and write permissions.
And the modification operations to these directories may be discarded or retained depending on the configuration file.
Please use with caution.
Do you want to continue? [Y/n] Y
 overlay_manager.go:429: This operation is already enabled
harrisonlee@deepin:~$ sudo deepin-immutable-writable statusStatus:
Enable: true,
Booted: false,
Whitelist: [],
ClearAfterReboot: false,
CleanData: false,
OverlayDirs: [/usr],
OverlayAllDirs: false,

harrisonlee@deepin:~$ curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg
gpg: can't create '/usr/share/keyrings/google-chrome.gpg': Read-only file system
gpg: no valid OpenPGP data found.
gpg: dearmoring failed: Read-only file system
curl: (23) Failure writing output to destination, passed 1186 returned 547
Reply Favorite View the author
All Replies
remyxo
deepin
17 hours ago
#1

关闭和开启都需要重启。

Reply View the author
deepin-流云
Moderator
Community OP
16 hours ago
#2

https://bbs.deepin.org.cn/zh/post/286633

磐石的QA里面有详细介绍,如一楼所说,开启和关闭都需要重启才生效的。

Reply View the author
lzipant
deepin
15 hours ago
#3
deepin-流云

https://bbs.deepin.org.cn/zh/post/286633

磐石的QA里面有详细介绍,如一楼所说,开启和关闭都需要重启才生效的。

正如上面帖子中有用户反复提到的,重启后也不生效,/usr还是只读。

Reply View the author
zhaohui
deepin
Community Developer
15 hours ago
#4
lzipant

正如上面帖子中有用户反复提到的,重启后也不生效,/usr还是只读。

麻烦把/var/log/boot.log发出来看看

Reply View the author
lzipant
deepin
15 hours ago
#5
zhaohui

麻烦把/var/log/boot.log发出来看看

...
------------ Mon Aug 25 11:37:04 CST 2025 ------------
Roota: clean, 227989/1966080 files, 2251802/7855360 blocks
mount -t ext4  /dev/vda5 /root/persistent
OSTREE=/ostree/data/1610c714d9f5ab0759028fb659ad069b39022582f180feae0bd71f99350ca9de.0/checkout
do data layer mount usr
do data layer mount opt
do data layer mount etc
2025/08/25 03:37:03 Failed to load config:failed to load config from /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: open /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: no such file or directory, fallback to default config.
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
 overlay_manager.go:176: Upper config file: etc/upper/deepin-immutable-ctl/writable.json
 overlay_manager.go:187: Found available config file: /root/etc/deepin-immutable-ctl/writable.json
 overlay_manager.go:256: Overlay dirs: [/root/usr]
Execute failed: failed to trigger writable: failed to mount fstab: command { /usr/bin/mount -t virtiofs -o defaults code-projects /root/home/harrisonlee/Documents/projects } failed, error: exit status 255, stderr: mount: mounting code-projects on /root/home/harrisonlee/Documents/projects failed: No such device

[  OK  ] Finished plymouth-read-write.servi…Plymouth To Write Out Runtime Data.

看起来启动时回退到了默认配置。但为什么配置文件不存在?执行disable或enable时不应该写配置文件吗?

Reply View the author
lzipant
deepin
15 hours ago
#6
lzipant
...
------------ Mon Aug 25 11:37:04 CST 2025 ------------
Roota: clean, 227989/1966080 files, 2251802/7855360 blocks
mount -t ext4  /dev/vda5 /root/persistent
OSTREE=/ostree/data/1610c714d9f5ab0759028fb659ad069b39022582f180feae0bd71f99350ca9de.0/checkout
do data layer mount usr
do data layer mount opt
do data layer mount etc
2025/08/25 03:37:03 Failed to load config:failed to load config from /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: open /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: no such file or directory, fallback to default config.
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
 overlay_manager.go:176: Upper config file: etc/upper/deepin-immutable-ctl/writable.json
 overlay_manager.go:187: Found available config file: /root/etc/deepin-immutable-ctl/writable.json
 overlay_manager.go:256: Overlay dirs: [/root/usr]
Execute failed: failed to trigger writable: failed to mount fstab: command { /usr/bin/mount -t virtiofs -o defaults code-projects /root/home/harrisonlee/Documents/projects } failed, error: exit status 255, stderr: mount: mounting code-projects on /root/home/harrisonlee/Documents/projects failed: No such device

[  OK  ] Finished plymouth-read-write.servi…Plymouth To Write Out Runtime Data.

看起来启动时回退到了默认配置。但为什么配置文件不存在?执行disable或enable时不应该写配置文件吗?

不对,这个文件存在的啊,为什么启动时读取不到?

harrisonlee@deepin:~$ ls -ahl /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf
-rw-r--r-- 1 root root 1.2K Jun 20 14:29 /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf
harrisonlee@deepin:~$ cat /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf
# Generated by deepin-immutable-ctl
# All configurations are currently placed under the global section
#
# General configuration
# skip-system-packages-migration, type bool, default is false, this option controls whether to skip the migration of system packages to the system layer. If set to true, the migration will be bypassed.
# max-backup-deploys, type int, default is 1, the maximum number of backup deployments.
# keep-failed-boot-entry, type bool, default is false, this option controls whether to keep the boot entry for the failed upgrade system in the boot menu after rolling back the system.
# log-level, type string, default is empty, optional values are "debug", "info", "warning", "error", "fatal", "disable". The environment variable DDE_DEBUG_LEVEL can override this configuration.
# auto-rollback-on-failure, type bool, default is true, this option controls whether to automatic rollback when system upgrade fails. If set to false, automatic rollback will be disabled.
# End of Selection

[global]
#skip-system-packages-migration=
#max-backup-deploys=
#keep-failed-boot-entry=
#log-level=

Reply View the author
zhaohui
deepin
Community Developer
15 hours ago
#7
lzipant
...
------------ Mon Aug 25 11:37:04 CST 2025 ------------
Roota: clean, 227989/1966080 files, 2251802/7855360 blocks
mount -t ext4  /dev/vda5 /root/persistent
OSTREE=/ostree/data/1610c714d9f5ab0759028fb659ad069b39022582f180feae0bd71f99350ca9de.0/checkout
do data layer mount usr
do data layer mount opt
do data layer mount etc
2025/08/25 03:37:03 Failed to load config:failed to load config from /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: open /etc/deepin-immutable-ctl/deepin-immutable-ctl.conf: no such file or directory, fallback to default config.
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
backend_syslog.go:49:  syslog is not available: Unix syslog delivery error
 overlay_manager.go:176: Upper config file: etc/upper/deepin-immutable-ctl/writable.json
 overlay_manager.go:187: Found available config file: /root/etc/deepin-immutable-ctl/writable.json
 overlay_manager.go:256: Overlay dirs: [/root/usr]
Execute failed: failed to trigger writable: failed to mount fstab: command { /usr/bin/mount -t virtiofs -o defaults code-projects /root/home/harrisonlee/Documents/projects } failed, error: exit status 255, stderr: mount: mounting code-projects on /root/home/harrisonlee/Documents/projects failed: No such device

[  OK  ] Finished plymouth-read-write.servi…Plymouth To Write Out Runtime Data.

看起来启动时回退到了默认配置。但为什么配置文件不存在?执行disable或enable时不应该写配置文件吗?

Execute failed: failed to trigger writable: failed to mount fstab: command { /usr/bin/mount -t virtiofs -o defaults code-projects /root/home/harrisonlee/Documents/projects } failed, error: exit status 255, stderr: mount: mounting code-projects on /root/home/harrisonlee/Documents/projects failed: No such device

关键问题在这里,把你的/etc/fstab发出来看看,看看你的挂载顺序是怎样的

Reply View the author
lzipant
deepin
15 hours ago
#8
zhaohui
Execute failed: failed to trigger writable: failed to mount fstab: command { /usr/bin/mount -t virtiofs -o defaults code-projects /root/home/harrisonlee/Documents/projects } failed, error: exit status 255, stderr: mount: mounting code-projects on /root/home/harrisonlee/Documents/projects failed: No such device

关键问题在这里,把你的/etc/fstab发出来看看,看看你的挂载顺序是怎样的

harrisonlee@deepin:~/dev-tools/elastic/elastic-7.17.28$ sudo cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#                
# /dev/vda3 LABEL=Roota
UUID=5c9b9900-5f5e-48ce-99c8-dd942acdf344       /               ext4            rw,relatime     0 1

# /dev/vda5 LABEL=_dde_data
UUID=b96e4079-2d3b-4e3a-aad7-ca669e254b68       /persistent     ext4            rw,relatime     0 2

# /dev/vda1 LABEL=Boot
UUID=4f311aa3-c5e3-4f7c-ab14-ce9aa1fa9be7       /boot           ext4            rw,relatime     0 2

# /dev/vda2 LABEL=SWAP
UUID=1f4832ba-e997-4011-af86-76afbb8cc5b5       none            swap            defaults        0 0

/persistent/home /home none defaults,bind 0 0
/persistent/root /root none defaults,bind 0 0
code-projects /home/harrisonlee/Documents/projects virtiofs defaults 0 0

code-projects挂载应该没问题吧,文件都能找到并打开。

Reply View the author
IA
deepin
6 hours ago
#9

我参照这个下载中了

新建镜像站 – 深度科技社区

Reply View the author