You are not logged in.

#1 2011-12-08 20:18:53

myrlin
Member
Registered: 2010-06-11
Posts: 297

Broken System after recent upgrade

Something went disasterously  wrong during a recent upgrade, and my EeePC no longer recongnises the kernel!

I have managed to boot from a PartedMagic rescue USB, and am trying to re-install the kernel from the pacman cache.

This is failing with the messages:

 error: database path is undefined
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already running, you can remove (null)

I haven't got a clue what to do now, and I'm desperate for some help! PLEASE!

**edit** I solved the database path error - I had not mounted the drive containing /var.  The other errors remain.

Last edited by myrlin (2011-12-08 20:31:25)

Offline

#2 2011-12-08 20:34:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Broken System after recent upgrade

Are the messages exactly the same now?
I think you should get

error: failed to init transaction (unable to lock database)
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

If that's the case, have you tried removing /var/lib/pacman/db.lck ? You may need to run 'sudo chattr -i /var/lib/pacman/db.lck' to be able to remove the offending file.

Offline

#3 2011-12-08 21:01:05

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

I'm still getting  "...you can remove (null)"

My /var directory is on a different drive from the root directory, symlinked from it. I did this to save wear on the SSD. Could that be a problem?

Offline

#4 2011-12-12 11:50:31

Shark
Member
From: /dev/zero
Registered: 2011-02-28
Posts: 686

Re: Broken System after recent upgrade

Check the last entry(pacman is completely broken! How do I reinstall it?):
https://wiki.archlinux.org/index.php/Pa … tall_it.3F


If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau

Registered Linux User: #559057

Offline

#5 2011-12-12 11:56:10

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

That's was my next task, when I get the time!

Many thanks, Shark

Offline

#6 2011-12-12 16:42:20

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Broken System after recent upgrade

myrlin wrote:

That's was my next task, when I get the time!

Many thanks, Shark

That would be completely unnecessary, because your pacman isn't broken, your DB is.

Question: what do you exactly meant by "symlinked" when referring to /var? For now show us your fstab, output of "mount" and the content of /var/lib/pacman.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#7 2011-12-12 19:54:47

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

Symlinks:

My laptop is an eeepc 901, with a 4Gb fixed SSD (sda), and a 16GB removable one (sdb). When I set it up, due to lack of experience and/or knowledge, I did the following to try to reduce wear on the 4GB drive, and to use space more efficiently. I probably should not have done things this way, but it has worked perfectly for several years and so I took the approach of "if it ain't broke, don't fix it".

I created a /boot and a / partition on 4Gb SSD, and installed to that, then moved /home, /var, and /tmp to the 16Gb SSD, and replaced them with symlinks on the 4Gb SSD.

I subsequently did various tweaks suggested on the EeePC forum to further reduce read/write cycles, which can be seen from my fstab.

Here is my fstab:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

#/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
#/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
#/dev/fd0               /media/fl   auto    user,noauto             0      0

/dev/sda1 /boot ext4 defaults 0 1
/dev/sda2 / ext4 defaults 0 1
/dev/sdb1 /media/sdb1 ext4 noatime,journal_async_commit,data=writeback,barrier=0,nobh,commit=60,errors=remount-ro 0 1
tmpfs	/tmp	tmpfs	defaults,mode=1777 0 0
tmpfs /var/lock tmpfs defaults,size=10M,mode=1777 0 0
tmpfs /var/run tmpfs defaults,size=10M,mode=0755 0 0 
none	/var/log tmpfs	defaults,size=20M 0 0

/var/lib/pacman contains 2 folders, local and sync. Please let me know if I should post the contents. It did have db.lck, which I deleted in an attempt to make pacman work, but without success.

Please feel free to say that this is such a mess it would be better to start again anyway smile

Offline

#8 2011-12-12 21:18:15

ethail
Member
From: Spain
Registered: 2011-02-10
Posts: 225

Re: Broken System after recent upgrade

I wonder, why instead of symlink, you don't mount, for example, /dev/sdb1 assuming that's your home, as /home?


My GitHub Page

Best Testing Repo Warning: [testing] means it can eat you hamster, catch fire and you should keep it away from children. And I'm serious here, it's not an April 1st joke.

Offline

#9 2011-12-12 22:09:11

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

Not sure that I can remember the logic myself now!

I think I wanted to have /var, /home and /tmp all on sdb1 without separate partitions, so that that all the space would be available to whichever directory needed it. There could well be a personal logic fault here!!

Offline

#10 2011-12-13 16:02:20

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Broken System after recent upgrade

There should be no problem with symlinking unless pacman handles symlinks in a strange way. Could you make sure that your sdb1 is mounted and run "pacman -Syyu --debug"?

On a side note, symlinking has no advantages over usual mounting. I also would suggest using UUID instead of /dev/sd* in fstab, like:

UUID=dd4fc69d-d052-45e1-a9f5-c512f58d80fe / ext4 defaults 0 1

as well as in grub menu. Because sd* names may change depending on udev/kernel, while UUIDs are unique. Just run blkid(8) as root to find the current correspondence between sd* and UUIDs.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#11 2011-12-13 16:18:31

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

Many thanks, Leonid.

I will be unable to try this out until next week at the earliest, but I will report back as soon as possible.

Thanks again for all your help.

Offline

#12 2011-12-28 11:31:22

myrlin
Member
Registered: 2010-06-11
Posts: 297

Re: Broken System after recent upgrade

I have now done some more work on this, and found that if I move the contents of /var from the synlink to the root directory, pacman works.

BUT... when I try to upgrade all seems to go well at first, then I get a whole load of ldconfig errors. Looks like my system got well and truly zapped, so I have decided that a clean re-install will be the best solution.

Many thanks for everyone's help.

Last edited by myrlin (2011-12-28 11:31:45)

Offline

Board footer

Powered by FluxBB