You are not logged in.

#1 2012-09-18 11:59:30

Pimmmo
Member
Registered: 2012-09-18
Posts: 5

Can't write to pacman.conf --> Read only file

Hello everybody,

I'm a complete noob when it comes to installing (arch) linux. I just installed (a part of) arch linux to my old computer, but I'm stuck now.

I used the Arch Linux beginners guide and now I'm at the part where I need to configure pacman.
But once I'm trying to adjust something in pacman.conf the computer tells me it's a read only file.

I also can't udate the system when I use pacman -Syu I get: error: failed to update core/extra/community (unable to lock database)

Btw I installed syslinux and I'm logged in as root.

I hope you can help me with this and that i'm not asking a really dumb question.

Thanks in advance!

Offline

#2 2012-09-18 12:02:51

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

Re: Can't write to pacman.conf --> Read only file

If you are in fact logged in as root, it sounds like your root partition may be mounted read-only.

What is in your fstab, and what is the output of `mount`?


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

Offline

#3 2012-09-18 12:02:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: Can't write to pacman.conf --> Read only file

Your root may be mounted ro, which would explain both the 'unable to lock database' and read-only nature of pacman.conf. Have a search round the forums, some people were complaining about that. You should be able to remount root as rw.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2012-09-18 12:25:46

Pimmmo
Member
Registered: 2012-09-18
Posts: 5

Re: Can't write to pacman.conf --> Read only file

I can only take pictures, because my arch linux is on an other computer.

here is my fstab (btw it's read only as well)
And here is my mount output

Offline

#5 2012-09-18 12:30:30

Pimmmo
Member
Registered: 2012-09-18
Posts: 5

Re: Can't write to pacman.conf --> Read only file

ngoonee, I can see that my root is mounted to ro, I will take a look on the forums and see if I can find a solution for my problem

Trilby and ngoonee thanks for you very fast replies!

I will post it here once I've found the solution.

Offline

#6 2012-09-18 12:32:39

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Can't write to pacman.conf --> Read only file


ᶘ ᵒᴥᵒᶅ

Offline

#7 2012-09-18 13:19:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Can't write to pacman.conf --> Read only file

Pimmmo wrote:

I can only take pictures, because my arch linux is on an other computer.

here is my fstab (btw it's read only as well)
And here is my mount output

That's not even the full /etc/fstab. It's horrible.


Add a tmpfs like in the fstab wiki entry. It's probably because you used one ">" when using genfstab (my bad, sorry).

https://wiki.archlinux.org/index.php/Fstab



PS: Which bootloader do you use? Syslinux? Don't remove "ro" then. Keep it, just like in the examples.

Last edited by DSpider (2012-09-18 13:22:25)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#8 2012-09-18 13:45:15

Pimmmo
Member
Registered: 2012-09-18
Posts: 5

Re: Can't write to pacman.conf --> Read only file

I just tried the mount -o remount / command but with no succes

I also tried the command pacman -S systemd in chroot, but also with no succes  part 1 and part 2...

I will see if what dspider said will work wink

Offline

#9 2012-09-18 14:04:12

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

Re: Can't write to pacman.conf --> Read only file

DSpider is right.  That is not a proper fstab.  This most likely leads to the remount during init to fail which would lead to your exact sitatuon.

You'll most likely need to fix your fstab from an alternate boot media (eg live cd/usb).


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

Offline

#10 2012-09-18 15:15:50

dstruck
Member
Registered: 2012-09-06
Posts: 3

Re: Can't write to pacman.conf --> Read only file

Pimmmo wrote:

I just tried the mount -o remount / command but with no succes

Try out

mount -o remount,rw /

instead of

mount -o remount,rw /dev/sda1

Could you also show the output of

lsblk

It will show the block devices intalled in you system.

Offline

#11 2012-09-18 15:33:43

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Can't write to pacman.conf --> Read only file

dstruck wrote:

Could you also show the output of

lsblk

Not the best command to run from a choort. Everything would be blank.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB