Ubuntu 20.04 Raspberry Pi - Ничего не могу записать, каждый файл, кажется, находится в режиме только для чтения

В настоящее время я запускаю Ubuntu 20.04 (сервер, а не рабочий стол) на моем Raspberry Pi и я замечаю, что, кажется, ничего не работает. Я в состоянии SSH в моем устройстве, и первая проблема, которую я вижу, это то, что Message of the Day (Сообщение дня) не появляется. Обычно я получаю сообщение, которое показывает мне температуру моего устройства, объем памяти, нагрузку и т.д. Но теперь, все, что я вижу, когда я SSH в моем Pi, это дату и время моего последнего входа в систему.

В моем домашнем каталоге я пытаюсь создать новый текстовый файл с помощью sudo nano . Нано открывается, но внизу написано [Каталог "..." не записывается] .

Когда я пытаюсь сделать sudo apt update, я получаю следующее:

ubuntu@ubuntu:~$ sudo apt update
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: chown to _apt:root of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: chmod 0700 of directory /var/lib/apt/lists/auxfiles failed - SetupAPTPartialDirectory (30: Read-only file system)
W: Not using locking for read only lock file /var/lib/apt/lists/lock
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.qi7Ajt - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.VGXMSt - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.GdwBDs - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.zJIneu - IsAccessibleBySandboxUser (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_focal_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_focal-updates_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_focal-backports_InRelease - PrepareFiles (30: Read-only file system)
W: Problem unlinking the file /var/lib/apt/lists/partial/ports.ubuntu.com_ubuntu-ports_dists_focal-security_InRelease - PrepareFiles (30: Read-only file system)
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-backports/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease  Temporary failure resolving 'ports.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (30: Read-only file system)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (30: Read-only file system)

Это заставило меня поверить, что вся моя система теперь доступна только для чтения. Это началось, когда я перемещал некоторые файлы на Nextcloud (размещенные на хостинге с помощью Docker) и мое устройство зависало. У меня не было выбора, кроме как выдернуть вилку, и теперь все заблокировано. Что я могу сделать, чтобы это исправить? Не уверен, что это полезно, но файлы Nextcloud хранятся на внешнем жестком диске, а Ubuntu - на микроSD.

1
задан 9 March 2021 в 03:49

1 ответ

Я смог найти решение. Оказывается, моя карта MicroSD, вероятно, повреждена. Я сделал следующее:

  1. Установите другую ОС (в моем случае, распабинскую ОС) в отдельную USB-палку
  2. Отключите поврежденный Microsd и подключите USB-накопитель, которая имела Raspbian OS
  3. Boot My Raspberry Pi из USB
  4. Подключите мое поврежденное MicroSD
  5. Run Sudo FDISK -L , чтобы найти мое microSD (в моем случае, это было / dev / mmcblk0p1 и / dev / dev / MMCBLK0P2
  6. RUN SUDO FSCK -Y / DEV / MMCBLK0P1 и sudo fsck -y / dev / mmcblk0p2 Так что он пытается исправить любую коррупцию на моем MicroSD Отказ
  7. Подключите MicroSD обратно и вещи должны вернуться к обычному.
1
ответ дан 18 March 2021 в 23:28

Другие вопросы по тегам:

Похожие вопросы: