究竟哪个才是需要remount的设备名呢? 答案揭晓:)

 要在别人的一个盒子上修改脚本。 可以telnet登陆,但地方工程师说他也不知道是否能修改,不知道如何解除 readonly限制。 我自己来试试吧,看我的 :)

 

[email protected]:~#
[email protected]:~# mount -l
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
ubi0:rootfs on /dev/.static/dev type ubifs (ro,relatime)
udev on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
shmfs on /dev/shm type tmpfs (rw,relatime,mode=755)
/dev/none on /var type ramfs (rw,relatime)
/dev/none on /etc/network type ramfs (rw,relatime)
/dev/none on /media type ramfs (rw,relatime)
ubi0:app on /root type ubifs (ro,relatime)
ubi0:packet on /root/Packet type ubifs (rw,relatime)
ubi0:data on /data type ubifs (rw,relatime)
none on /UpdRam type ramfs (rw,relatime)

  要将 /root 改为 rw 属性,你觉得是怎么写mount命令? 设备名是 ubi0:app 吗(这个名字看起来也很奇怪的) ?


[email protected]:~# mount -o remount ubi0:app
mount: /root not mounted already, or bad option
[email protected]:~# mount -l                
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
ubi0:rootfs on /dev/.static/dev type ubifs (ro,relatime)
udev on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
shmfs on /dev/shm type tmpfs (rw,relatime,mode=755)
/dev/none on /var type ramfs (rw,relatime)
/dev/none on /etc/network type ramfs (rw,relatime)
/dev/none on /media type ramfs (rw,relatime)
ubi0:app on /root type ubifs (ro,relatime)
ubi0:packet on /root/Packet type ubifs (rw,relatime)
ubi0:data on /data type ubifs (rw,relatime)
none on /UpdRam type ramfs (rw,relatime)
[email protected]:~# mount -o remount /root
mount: /root not mounted already, or bad option
[email protected]:~# mount -o remount /dev/.static/dev
mount: /dev/.static/dev not mounted already, or bad option
[email protected]:~# mount -o remount /dev/.static/dev  /root/        //这个才是我们要重新挂载的设备名
[email protected]:~#
[email protected]:~# mount -l
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
ubi0:rootfs on /dev/.static/dev type ubifs (ro,relatime)
udev on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
shmfs on /dev/shm type tmpfs (rw,relatime,mode=755)
/dev/none on /var type ramfs (rw,relatime)
/dev/none on /etc/network type ramfs (rw,relatime)
/dev/none on /media type ramfs (rw,relatime)
ubi0:app on /root type ubifs (rw,relatime)                       //已经变成可读写的了,试过,可以写文件了。
ubi0:packet on /root/Packet type ubifs (rw,relatime)
ubi0:data on /data type ubifs (rw,relatime)
none on /UpdRam type ramfs (rw,relatime)
[email protected]:~/resdata#

你可能感兴趣的:(究竟哪个才是需要remount的设备名呢? 答案揭晓:))