You are not logged in.

#1 2019-03-06 20:57:53

promitheas
Member
Registered: 2019-02-24
Posts: 39

[SOLVED] Pacman unable to load database error

Hello all,
Tonight i read a post somewhere that if i have problems playing videos on youtube from google chrome i should go through the graphical settings and disable hardware acceleration. I did so, and after i clicked on the relaunch button, GC never started again. It outputs an error, but i dont know if you want to see it, because i decided as chromium has the same sync features as GC i would just install that and be done with it. Ive been thinking of moving over anyway. However, running

sudo pacman -S chromium

Outputs the following 2 lines:

error: failed to init transaction (unable to lock database)
error: could not lock database: Read-only file system

Reading as much material as i could find, it was clear that i would need to remove /var/lib/pacman/db.lck
However, that file is non existent, and if it does exist it should be in that directory because my /etc/pacman.conf has it listed as such.

I hope i havent forgotten to include any important info, if i have please do ask for it.
Thanks in advance

Last edited by promitheas (2019-03-07 19:48:13)

Offline

#2 2019-03-06 21:01:40

loqs
Member
Registered: 2014-03-06
Posts: 18,646

Re: [SOLVED] Pacman unable to load database error

error: could not lock database: Read-only file system

Why is the filesystem read only?

findmnt --target /var/lib/pacman/

Offline

#3 2019-03-06 21:01:42

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: [SOLVED] Pacman unable to load database error

Hello there,

error: could not lock database: Read-only file system

Seems to me your file system is read-only mode?

What is the output of the following commands?

mount
dmesg --facility kern

Regards

Offline

#4 2019-03-07 17:45:26

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

loqs wrote:
error: could not lock database: Read-only file system

Why is the filesystem read only?

findmnt --target /var/lib/pacman/

findmnt --target /var/lib/pacman
TARGET    SOURCE         FSTYPE    OPTIONS
/                 /dev/sda6      ext4           ro,relatime

Edit: after poking a look at the manual for findmnt, i ran this:
findmnt --fstab --target /
Amd got the same output, but the source had a long uuid, and under the options, it was rw,relatime. I assume then that ro means read-only and rw read-write?

Last edited by promitheas (2019-03-07 17:49:07)

Offline

#5 2019-03-07 17:54:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,940

Re: [SOLVED] Pacman unable to load database error

So the root FS is read-only.
Unless this is deliberate (what you ought to know, this doesn't just happen) it was likely remounted ro for filesysteme errors.
=> Check dmesg and the disk, https://wiki.archlinux.org/index.php/SMART

Online

#6 2019-03-07 18:01:18

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

bugsmanagement wrote:

Hello there,

error: could not lock database: Read-only file system

Seems to me your file system is read-only mode?

What is the output of the following commands?

mount
dmesg --facility kern

Regards

Mount outputs a massive list of stuff. The lines i think are the most relevant are:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4024788k,nr_inodes=1006197,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda6 on / type ext4 (ro,relatime)
... MORE STUFF I THINK IS IRRELEVANT...
/dev/sda7 on /home type ext4 (ro,relatime)
/dev/sda3 on /boot type ext4 (ro,relatime,stripe=4)
tempfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=806472k, mode=700,uid=1000,gid=998)

Thanks

Offline

#7 2019-03-07 18:02:43

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

seth wrote:

So the root FS is read-only.
Unless this is deliberate (what you ought to know, this doesn't just happen) it was likely remounted ro for filesysteme errors.
=> Check dmesg and the disk, https://wiki.archlinux.org/index.php/SMART

It is definitely not something i wanted. Everything worked fine until i disabled HwA for google chrome. Ill read the link you provided and get back to you.

Edit:
Unfortunately, i dont have smartctl installed and cant install it. That means i cant run smartctl --info /dev/sda to see whether my drive supports SMART

Last edited by promitheas (2019-03-07 18:07:03)

Offline

#8 2019-03-07 18:07:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,417
Website

Re: [SOLVED] Pacman unable to load database error

Are you using a very old / problematic disk?  Your previous thread from 4 days ago was about a failing fsck of your home partition, now your root partition is having issues.

Either the disk is very close to being totally dead (and you should stop using it now) or something else is really wrong with your set up.

Can you reboot and get the root mounted rw?  If not, you'll need a live medium to boot to to run a SMART check.

Last edited by Trilby (2019-03-07 18:09:58)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2019-03-07 18:10:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,940

Re: [SOLVED] Pacman unable to load database error

https://grml.org/
Given Trilby's comment you should not touch that disk too much anyway. Before running any checks, BACKUP YOUR PERSONAL DATA.

Online

#10 2019-03-07 18:11:08

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

Trilby wrote:

Are you using a very old / problematic disk?  Your previous thread from 4 days ago was about a failing fsck of your home partition, now your root partition is having issues.

Either the disk is very close to being totally dead (and you should stop using it now) or something else is really wrong with your set up.

Well its old, vut not ancient. Its a laptop i bought about 4-5 years ago. I dont know if that qualifies. If not, then what could be wrong with my setup causing this issue? I installed arch following the instructions, and havent had any problems until i disabled hardware acceleration on google chrome, something that in my opinion shouldnt affect my filesystem in such a way. But im the newbie, so i dont know.

Offline

#11 2019-03-07 18:16:21

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

seth wrote:

https://grml.org/
Given Trilby's comment you should not touch that disk too much anyway. Before running any checks, BACKUP YOUR PERSONAL DATA.

Its going to be a bit challenging getting that onto a usb, but thanks anyway

Offline

#12 2019-03-07 18:20:37

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

Ok, i found a thread with a similar issue (root mounted ro),

https://bbs.archlinux.org/viewtopic.php?id=133376

but the symptoms, dont seem to match my own. My /etc/fstab is not empty, and my / /home and /boot partitions are mounted rw.

Does this definately mean a bad drive, and that i should backup and replace it sharpish?

Thanks

Offline

#13 2019-03-07 19:33:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Pacman unable to load database error

1. Learn to use the edit button and stop bumping the thread.

2. Yes, your disk should be considered volatile at this point.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2019-03-07 19:46:35

promitheas
Member
Registered: 2019-02-24
Posts: 39

Re: [SOLVED] Pacman unable to load database error

jasonwryan wrote:

1. Learn to use the edit button and stop bumping the thread.

2. Yes, your disk should be considered volatile at this point.

Alright, ill mark as solved and see what to do. Thx

Offline

Board footer

Powered by FluxBB