Cannot upgrade readonly filesystem

Hello, friend have problem with readonly filesystem. He cannot upgrade or install packages.

garuda-inxi:

System:
  Kernel: 6.6.17-1-lts arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-lts
    root=UUID=cdb66a28-00ec-4e1e-9735-549a53824101 rw rootflags=subvol=@
    quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    ibt=off
  Desktop: GNOME v: 45.4 tk: GTK v: 3.24.41 wm: gnome-shell
    tools: gsd-screensaver-proxy dm: GDM v: 45.0.1 Distro: Garuda
    base: Arch Linux
Machine:
  Type: Desktop Mobo: MSI model: P67A-G45 (MS-7673) v: 2.0
    serial: <superuser required> uuid: <superuser required>
    BIOS: American Megatrends v: 1.11 date: 04/14/2011
CPU:
  Info: model: Intel Core i5-2500K bits: 64 type: MCP arch: Sandy Bridge
    gen: core 2 level: v2 built: 2010-12 process: Intel 32nm family: 6
    model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
    desc: 1x6 MiB
  Speed (MHz): avg: 2404 high: 3912 min/max: 1600/6000 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 2383 2: 1668 3: 1653
    4: 3912 bogomips: 26349
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: ASUSTeK driver: nvidia
    v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current
    (as of 2024-02; EOL~2026-12-xx) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-2019 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 2 speed: 5 GT/s ports: active: none off: DVI-I-1,HDMI-A-1
    empty: DP-1,DVI-D-1 bus-ID: 01:00.0 chip-ID: 10de:13c2 class-ID: 0300
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
    compositor: gnome-shell driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    display-ID: :1 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x286mm (40.00x11.26")
    s-diag: 1055mm (41.55")
  Monitor-1: DVI-I-1 note: disabled pos: primary,right model: HP S2331
    serial: <filter> built: 2011 res: 1920x1080 hz: 60 dpi: 96 gamma: 1.2
    size: 509x286mm (20.04x11.26") diag: 584mm (23") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: left
    model: Acer K242HQL serial: <filter> built: 2015 res: 1920x1080 hz: 60
    dpi: 96 gamma: 1.2 size: 509x286mm (20.04x11.26") diag: 595mm (23.4")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia gbm:
    drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia inactive: wayland
  API: OpenGL v: 4.6.0 vendor: nvidia v: 545.29.06 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce GTX 970/PCIe/SSE2
    memory: 3.91 GiB
  API: Vulkan v: 1.3.276 layers: 7 device: 0 type: discrete-gpu
    name: NVIDIA GeForce GTX 970 driver: nvidia v: 545.29.06
    device-ID: 10de:13c2 surfaces: xcb,xlib
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: Micro-Star MSI 6 driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1c20 class-ID: 0403
  Device-2: NVIDIA GM204 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:0fbb class-ID: 0403
  API: ALSA v: k6.6.17-1-lts status: kernel-api tools: N/A
  Server-1: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI RTL8111/8168/8411 driver: r8169 v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 07:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Info: services: NetworkManager, smbd, systemd-timesyncd, wpa_supplicant
Drives:
  Local Storage: total: 476.94 GiB used: 464.13 GiB (97.3%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sdb maj-min: 8:16 vendor: Kingfast model: N/A size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: <unknown> tech: SSD
    serial: <filter> fw-rev: 8B0 scheme: MBR
Partition:
  ID-1: / raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
    used: 464.13 GiB (97.3%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-2: /home raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
    used: 464.13 GiB (97.3%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-3: /var/log raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
    used: 464.13 GiB (97.3%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-4: /var/tmp raw-size: 476.93 GiB size: 476.93 GiB (100.00%)
    used: 464.13 GiB (97.3%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 7.73 GiB used: 435.5 MiB (5.5%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A gpu: nvidia temp: 60 C
  Fan Speeds (rpm): N/A gpu: nvidia fan: 25%
Info:
  Memory: total: 8 GiB available: 7.73 GiB used: 4.73 GiB (61.2%)
  Processes: 245 Power: uptime: 23h 20m states: freeze,standby,mem,disk
    suspend: deep avail: s2idle,shallow wakeups: 0 hibernate: platform
    avail: shutdown, reboot, suspend, test_resume image: 3.05 GiB
    services: gsd-power, power-profiles-daemon, upowerd Init: systemd v: 255
    default: graphical tool: systemctl
  Packages: 1508 pm: pacman pkgs: 1495 libs: 497 tools: pamac,paru
    pm: flatpak pkgs: 13 Compilers: clang: 16 gcc: 13.2.1 alt: 12
    Shell: garuda-inxi default: Zsh v: 5.9 running-in: gnome-terminal
    inxi: 3.3.33
Garuda (2.6.23-1):
  System install date:     2022-11-08
  Last full system update: 2024-02-20
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
  Windows dual boot:       <superuser required>
  Failed units:            logrotate.service updatedb.service 
thread 'main' panicked at src/history/history.rs:176:17:
McFly error: DELETE from selected_commands to work (attempt to write a readonly database)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

/etc/fstab

sudo cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /              btrfs   subvol=/@,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /home          btrfs   subvol=/@home,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /root          btrfs   subvol=/@root,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /srv           btrfs   subvol=/@srv,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /var/cache     btrfs   subvol=/@cache,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /var/log       btrfs   subvol=/@log,defaults,noatime,compress=zstd,discard=async,ssd 0 0
UUID=cdb66a28-00ec-4e1e-9735-549a53824101 /var/tmp       btrfs   subvol=/@tmp,defaults,noatime,compress=zstd,discard=async,ssd 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
/dev/disk/by-uuid/489464F29464E3C2 /mnt/489464F29464E3C2 auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=S1 0 0
/dev/disk/by-uuid/E472FE9072FE66A8 /mnt/E472FE9072FE66A8 auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=S2 0 0
/dev/disk/by-id/usb-SanDisk_Cruzer_Edge_2006016453078C127771-0:0-part1 /mnt/usb-SanDisk_Cruzer_Edge_2006016453078C127771-0:0-part1 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
thread 'main' panicked at src/history/history.rs:176:17:
McFly error: DELETE from selected_commands to work (attempt to write a readonly database)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Installing:

sudo pacman -S caprine
error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system
thread 'main' panicked at src/history/history.rs:176:17:
McFly error: DELETE from selected_commands to work (attempt to write a readonly database)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Remove lock don’t work.

Regards.

Maybe you could boot from a live USB, try mounting your system drive (it should not be necessary to chroot for this), backup your fstab and try deleting these lines:

And try again.
Careful here:

You’re almost running out of space: this shouldn’t be causing your issue, but there is a big update to Gnome 46 just behind the corner for you.

4 Likes

Readonly filesystem or readonly database :thinking:

As @filo says: The first thing you should do is create more free space on your drive.

Try start the updatedb.service

sudo systemctl start updatedb.service

and the logrotate.service

sudo systemctl start logrotate.service

Try again.

2 Likes

Hi, cannot download new Garuda iso. Can I just remove those lines from fstab?

You should not be able to do that if file system is read only.
That’s why you need a live USB. Also an old one…

1 Like

Update db also don’t work.


[đź”´] Ă— sudo systemctl start updatedb.service
Job for updatedb.service failed because the control process exited with error code.
See "systemctl status updatedb.service" and "journalctl -xeu updatedb.service" for details.
thread 'main' panicked at src/history/history.rs:176:17:
McFly error: DELETE from selected_commands to work (attempt to write a readonly database)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

:arrow_up:

1 Like

You aren’t booting a snapshot though? Read-only smells just like that :thinking:

1 Like

That was the issue first but then restore oldest snapshot and reboot.

What was the problem first? Are you in a snapshot now or not? Please answer all questions clearly and precisely.

The whole thing smells like corrupt Pacman.

As I say in first it’s my friend PC. He told me that he restore snapshot and use system, make upgrades don’t remember how long. Then restore different snapshots :confused:

At some point something went wrong… and no one knows what or when…right?

Can you boot garuda normally (w/o a snapshot)?

Why is the drive so full? Are these personal files (videos, music, pictures, etc.)? Are those tons of snapshots? Or is /var/log/ full?
Find out what takes up so much space.

1 Like

Then your “friend” should take responsibility for repairing his own mess. It is not fair that you should have to do so. :slight_smile:

1 Like

I install Garuda on his PC so I want to help him.

First try to free up at least 20GB of free space on the drive.

Then delete the lock file:

sudo rm /var/lib/pacman/db.lck

Btw, there is an alias in config.fish you can use in terminal

fixpacman

and @nepti , db.lck is not a folder :wink:

2 Likes

Thanks for the tip, I’ve corrected it.

I shouldn’t type anything while half asleep :upside_down_face:


@MarianKoniuszko post the output from

findmnt --target /var/lib/pacman/

and

sudo cat /etc/mtab
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.