解决问题 chmod: changing permissions of 'transmission-daemon/': Read-only file system和mount: /media/pi/hdd: /dev/sda1 is write-protected but explicit read-write mode requested.

此文首发于我的个人博客:zhang0peter的个人博客


我在树莓派的Linux系统里想要改变系统权限时出现了报错:

chmod: changing permissions of 'transmission-daemon/': Read-only file system

我当时已经是root权限

解决方法:

1.系统文件

如果是系统文件出现这个问题,重新挂载根目录即可:

mount -rw -o remount /

2.移动硬盘或者U盘

mount -o remount,rw /dev/sda1 #换成自己的

一般来说这样就可以解决问题了,但今天我遇到了另一个问题:

-> # mount -rw -o remount /dev/sda1
mount: /media/pi/hdd: /dev/sda1 is write-protected but explicit read-write mode requested.
-> # mount -o remount,rw /dev/sda1
mount: /media/pi/hdd: cannot remount /dev/sda1 read-write, is write-protected.

先查看内核:

dmesg | tail

报错如下:

[2729746.711394] Voltage normalised (0x00000000)
[2729746.727522] blk_partition_remap: fail for partition 1
[2729747.231468] blk_partition_remap: fail for partition 1
[2729747.735843] blk_partition_remap: fail for partition 1
[2729748.239946] blk_partition_remap: fail for partition 1
[2729748.727407] Under-voltage detected! (0x00050005)
[2729748.743830] blk_partition_remap: fail for partition 1
[2729749.247843] blk_partition_remap: fail for partition 1
[2729749.752383] blk_partition_remap: fail for partition 1
[2729749.752542] blk_partition_remap: fail for partition 1
[2729752.759449] Voltage normalised (0x00000000)
[2729759.843123] blk_partition_remap: fail for partition 1
[2729759.843141] blk_partition_remap: fail for partition 1
[2729759.843158] blk_partition_remap: fail for partition 1
[2729760.336301] blk_partition_remap: fail for partition 1
[2729760.840189] blk_partition_remap: fail for partition 1

这个报错意思是电压不够,需要补足电压就可以了。