web-dev-qa-db-fra.com

impossible d'ouvrir le fichier de sortie: système de fichiers en lecture seule

Je viens d'installer Ubuntu. Mon problème est que je tente d'écrire un fichier journal chez moi. J'utilise logcat à partir d'un module python appelé adb. Lorsque j'essaie la commande de terminal adb logcat -f <path>, je devrais être en mesure de générer ce journal dans un fichier texte sur mon disque dur, mais le message d'erreur suivant s'affiche:

couldn't open output file: Read-only file system

Ceci malgré la tentative de la commande Sudo adb logcat -f <path>. Pour <path> j'ai principalement essayé 'log' et 'log.txt'

Je suis capable d'écrire des fichiers sur le disque en utilisant cat > et je peux sauvegarder des fichiers sans problème. J'ai lu que cela pouvait être causé par un disque dur défaillant, mais jusqu'à présent, je n'ai vu aucune autre preuve de cela. Toute aide pour comprendre pourquoi cela se produit et comment la surmonter serait grandement appréciée. Au cas où quelqu'un se le demanderait, il est nécessaire de sortir ce fichier sur le disque.

EDIT:

Je dois mentionner que j’ai eu un problème avec ma partition d’échange. Je recevais une erreur sur l'air de /dev/mapper/cryptswap1 is not ready yet or not present (libellé pas exact) sur l'écran de démarrage lors du démarrage, mais j'ai reformaté et créé une nouvelle partition de swap qui a permis d'éliminer l'erreur. Cependant, avant de résoudre le problème, et toujours maintenant, gparted attribue à la partition de swap la mention "inconnu". free -m ne montre aucun problème, ni swapon -s

EDIT: sortie de Sudo mount

/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/Fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda7 on /home type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
/home/me/.Private on /home/me type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=cbb0ed41b9f457c5,ecryptfs_fnek_sig=9e985b7d47d6e940)
gvfsd-Fuse on /run/user/1000/gvfs type Fuse.gvfsd-Fuse (rw,nosuid,nodev,user=me)

sortie de apt-cache policy 'sytemd*':

Version table:
 *** 204-0ubuntu19.1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        100 /var/lib/dpkg/status
     204-0ubuntu18 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
root-system-bin:
  Installed: (none)
  Candidate: 5.34.09-1
  Version table:
     5.34.09-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libboost-filesystem1.50-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-data4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-runtime4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-windows-forms4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qemu-system-or32:
  Installed: (none)
  Candidate: (none)
  Version table:
xen-system:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system2.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libsystemu-Ruby1.8:
  Installed: (none)
  Candidate: 2.5.1-1
  Version table:
     2.5.1-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
system-image-dev:
  Installed: (none)
  Candidate: 1.9.1-0ubuntu1
  Version table:
     1.9.1-0ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libsystemsettings1:
  Installed: (none)
  Candidate: 0.1+13.10.20131015.2-0ubuntu1
  Version table:
     0.1+13.10.20131015.2-0ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
xen-linux-system-686-pae:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-data-linq4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
ubuntu-system-service:
  Installed: 0.2.5
  Candidate: 0.2.5
  Version table:
 *** 0.2.5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
        100 /var/lib/dpkg/status
qemu-system-s390x:
  Installed: (none)
  Candidate: (none)
  Version table:
libboost-filesystem1.53.0:
  Installed: (none)
  Candidate: 1.53.0-6+exp3ubuntu8
  Version table:
     1.53.0-6+exp3ubuntu8 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-runtime-serialization4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qemu-system-ppcemb:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-ldap4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
systemc:
  Installed: (none)
  Candidate: (none)
  Version table:
system-config-printer:
  Installed: (none)
  Candidate: (none)
  Version table:
systemd:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-sh4:
  Installed: (none)
  Candidate: (none)
  Version table:
xen-linux-system-AMD64:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-xtensa:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-transactions4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libghc-system-fileio-prof-0.3.10-17c22:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-windows-forms-datavisualization4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libghc-system-filepath-prof:
  Installed: (none)
  Candidate: 0.4.7-2build1
  Version table:
     0.4.7-2build1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libqtsysteminfo1:
  Installed: (none)
  Candidate: 1.2.0-3ubuntu5
  Version table:
     1.2.0-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
system-tools-backends-dev:
  Installed: (none)
  Candidate: 2.10.2-1ubuntu1
  Version table:
     2.10.2-1ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libboost-system1.52-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
system-config-samba:
  Installed: (none)
  Candidate: 1.2.63-0ubuntu5
  Version table:
     1.2.63-0ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libmono-system-security4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libboost-filesystem1.46-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
libghc-filesystem-conduit-doc:
  Installed: (none)
  Candidate: 1.0.0-2build1
  Version table:
     1.0.0-2build1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
root-system-common:
  Installed: (none)
  Candidate: 5.34.09-1
  Version table:
     5.34.09-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
system-config-printer-gnome:
  Installed: 1.4.2+20130920-0ubuntu1.2
  Candidate: 1.4.2+20130920-0ubuntu1.2
  Version table:
 *** 1.4.2+20130920-0ubuntu1.2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        100 /var/lib/dpkg/status
     1.4.2+20130920-0ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-servicemodel-routing4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qemu-system-ppc64:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-web-abstractions4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-xaml4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
liblua5.1-filesystem0:
  Installed: (none)
  Candidate: 1.5.0+16+g84f1af5-1
  Version table:
     1.5.0+16+g84f1af5-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
system-tools-backends:
  Installed: (none)
  Candidate: 2.10.2-1ubuntu1
  Version table:
     2.10.2-1ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
qemu-system-x86:
  Installed: (none)
  Candidate: 1.5.0+dfsg-3ubuntu5.3
  Version table:
     1.5.0+dfsg-3ubuntu5.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main AMD64 Packages
     1.5.0+dfsg-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
system-config-printer-kde:
  Installed: (none)
  Candidate: (none)
  Version table:
init-system-helpers:
  Installed: 1.7
  Candidate: 1.7
  Version table:
 *** 1.7 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
        100 /var/lib/dpkg/status
systemd-shim:
  Installed: 6-0ubuntu0.13.10
  Candidate: 6-0ubuntu0.13.10
  Version table:
 *** 6-0ubuntu0.13.10 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        100 /var/lib/dpkg/status
     3+real-0ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libghc-system-fileio-doc:
  Installed: (none)
  Candidate: 0.3.10-2build1
  Version table:
     0.3.10-2build1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
systemtap-grapher:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-enterpriseservices4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libghc-system-filepath-dev-0.4.7-c7b27:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-x86-64:
  Installed: (none)
  Candidate: (none)
  Version table:
system-config-printer-udev:
  Installed: 1.4.2+20130920-0ubuntu1.2
  Candidate: 1.4.2+20130920-0ubuntu1.2
  Version table:
 *** 1.4.2+20130920-0ubuntu1.2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        100 /var/lib/dpkg/status
     1.4.2+20130920-0ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libsystem-command-Perl:
  Installed: (none)
  Candidate: 1.09-1
  Version table:
     1.09-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libboost-system1.42-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system:
  Installed: (none)
  Candidate: 1.5.0+dfsg-3ubuntu5.3
  Version table:
     1.5.0+dfsg-3ubuntu5.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main AMD64 Packages
     1.5.0+dfsg-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
systemtap-doc:
  Installed: (none)
  Candidate: 2.2.1-1ubuntu1
  Version table:
     2.2.1-1ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libboost-system1.48-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
lua5.2-filesystem-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
system-config-kickstart:
  Installed: (none)
  Candidate: 2.5.20-0ubuntu22
  Version table:
     2.5.20-0ubuntu22 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
live-config-systemd:
  Installed: (none)
  Candidate: 3.0.23-1
  Version table:
     3.0.23-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
systemtap:
  Installed: (none)
  Candidate: 2.2.1-1ubuntu1
  Version table:
     2.2.1-1ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libsystemd-login-dev:
  Installed: (none)
  Candidate: 204-0ubuntu19.1
  Version table:
     204-0ubuntu19.1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
     204-0ubuntu18 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
x-window-system:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-mips64el:
  Installed: (none)
  Candidate: (none)
  Version table:
libsystemu-Ruby-doc:
  Installed: (none)
  Candidate: 2.5.1-1
  Version table:
     2.5.1-1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
xen-system-AMD64:
  Installed: (none)
  Candidate: 4.3.0-1ubuntu1.3
  Version table:
     4.3.0-1ubuntu1.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/universe AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/universe AMD64 Packages
     4.3.0-1ubuntu1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
qemu-system-sparc:
  Installed: (none)
  Candidate: 1.5.0+dfsg-3ubuntu5.3
  Version table:
     1.5.0+dfsg-3ubuntu5.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main AMD64 Packages
     1.5.0+dfsg-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
xen-linux-system-686:
  Installed: (none)
  Candidate: (none)
  Version table:
gnome-system-log:
  Installed: 3.8.1-1svn1
  Candidate: 3.8.1-1svn1
  Version table:
 *** 3.8.1-1svn1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
        100 /var/lib/dpkg/status
libmono-system4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libqt5systeminfo5:
  Installed: (none)
  Candidate: 5.0~git20130712-0ubuntu3
  Version table:
     5.0~git20130712-0ubuntu3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
libmono-system-xml-linq4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qtdeclarative5-systeminfo-plugin:
  Installed: (none)
  Candidate: 5.0~git20130712-0ubuntu3
  Version table:
     5.0~git20130712-0ubuntu3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
xen-system-i386:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-configuration4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libboost-system1.53-dev:
  Installed: (none)
  Candidate: 1.53.0-6+exp3ubuntu8
  Version table:
     1.53.0-6+exp3ubuntu8 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qemu-system-m68k:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-mips:
  Installed: (none)
  Candidate: 1.5.0+dfsg-3ubuntu5.3
  Version table:
     1.5.0+dfsg-3ubuntu5.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main AMD64 Packages
     1.5.0+dfsg-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libfsosystem-dbg:
  Installed: (none)
  Candidate: (none)
  Version table:
libmono-system-numerics4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libmono-system-data-services4.0-cil:
  Installed: (none)
  Candidate: 2.10.8.1-5ubuntu2
  Version table:
     2.10.8.1-5ubuntu2 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
qemu-system-i386:
  Installed: (none)
  Candidate: (none)
  Version table:
qemu-system-misc:
  Installed: (none)
  Candidate: 1.5.0+dfsg-3ubuntu5.3
  Version table:
     1.5.0+dfsg-3ubuntu5.3 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy-updates/main AMD64 Packages
        500 http://security.ubuntu.com/ubuntu/ saucy-security/main AMD64 Packages
     1.5.0+dfsg-3ubuntu5 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/main AMD64 Packages
libghc-system-filepath-dev:
  Installed: (none)
  Candidate: 0.4.7-2build1
  Version table:
     0.4.7-2build1 0
        500 http://ie.archive.ubuntu.com/ubuntu/ saucy/universe AMD64 Packages
3
Totem

Pour contourner le problème, vous pouvez simplement rediriger vous-même la sortie au lieu d'utiliser l'option -f:

adb logcat > log

Je suppose que le programme pourrait changer de répertoire de travail, il essaie donc de créer log quelque part où vous n’avez pas accès en écriture. Si c'est le cas, vous devriez également pouvoir le faire fonctionner en utilisant un chemin absolu:

adb logcat > /home/username/log
2
terdon