我最近在我的 nexus 7 2013 上安装了 ubuntu touch,但在安装 Moxa Uport usb 适配器的驱动程序时遇到了问题。实际上需要编译驱动程序,这就是为什么我需要安装 linux 头文件。我发现:
apt-get install linux-headers-`uname -r`
需要向 /lib/modules 写入一些内容,并且此路径属于 /dev/loop1,它以只读方式安装。我可以将它重新安装到 rw,但是在一次尝试写入那里时,它会退回到只读状态。
与 /etc/fstab 中的 loop1 或 /lib/modules 无关
命令:
mount | grep loop1
输出:
/dev/loop1 on /android/system type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /etc/ubuntu-touch-session.d/android.conf type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/udev/rules.d/70-android.rules type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /usr/share/powerd/device_configs/config-default.xml type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/modules type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /var/lib/lxc/android/rootfs/system type ext4 (ro,relatime,data=ordered)
命令:
blockdev --report |grep loop1
输出:
ro 256 512 4096 0 126427136 /dev/loop1
然后:
blockdev --setrw /dev/loop1
blockdev --report |grep loop1
输出:
rw 256 512 4096 0 126427136 /dev/loop1
命令:
mount -o remount,rw /dev/loop1
mount | grep loop1
输出:
/dev/loop1 on /android/system type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /etc/ubuntu-touch-session.d/android.conf type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/udev/rules.d/70-android.rules type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /usr/share/powerd/device_configs/config-default.xml type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/modules type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /var/lib/lxc/android/rootfs/system type ext4 (rw,relatime,data=ordered)
奇怪,只有 /var/lib/lxc/android/rootfs/system 设置为 rw
所以:
mount -o remount,rw /lib/modules
mount | grep loop1
输出:
/dev/loop1 on /android/system type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /etc/ubuntu-touch-session.d/android.conf type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/udev/rules.d/70-android.rules type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /usr/share/powerd/device_configs/config-default.xml type ext4 (ro,relatime,data=ordered)
/dev/loop1 on /lib/modules type ext4 (rw,relatime,data=ordered)
/dev/loop1 on /var/lib/lxc/android/rootfs/system type ext4 (rw,relatime,data=ordered)
但:
mkdir /lib/modules/rrr
输出:
mkdir: cannot create directory Б─≤/lib/modules/rrrБ─≥: Read-only file system
dmesg:
[ 8280.681213] EXT4-fs (loop1): previous I/O error to superblock detected
[ 8280.681579] Buffer I/O error on device loop1, logical block 0
[ 8280.682006] lost page write due to I/O error on loop1
[ 8280.682037] EXT4-fs error (device loop1): ext4_journal_start_sb:328: Detected aborted journal
[ 8280.682891] EXT4-fs (loop1): Remounting filesystem read-only
[ 8280.683135] EXT4-fs (loop1): previous I/O error to superblock detected
[ 8280.683593] Buffer I/O error on device loop1, logical block 0
我认为abowe是以下原因:
apt-get install linux-headers-`uname -r`
失败:
Unpacking linux-headers-3.4.0-5-flo (3.4.0-5.19~15.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-3.4.0-5-flo_3.4.0-5.19~15.04.1_armhf.deb (--unpack):
error creating symbolic link `./lib/modules/3.4.0-5-flo/build': Read-only file system
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-3.4.0-5-flo_3.4.0-5.19~15.04.1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以,我被困在这个问题上,可以请任何人帮助我吗?
问候,维克多