You are not logged in.

#1 2011-10-09 00:13:43

spektre
Member
From: Sweden
Registered: 2009-05-24
Posts: 31

[SOLVED] Pacman hangs randomly while installing packages

It's been a while since I used Arch, but I decided to install it again. The issue I'm having is that pacman hangs randomly while installing packages. There's no specific package or specific time during installation when this occurs. The only common factor is that it's while installing, as in not downloading or checking integrity. When this occurs, other processes also seem to hang, one time I couldn't log in on any other tty, and another time pacman hanged on tty1 and top on tty2, but I could use the other ttys.

I've tried different mirrors and even tried aria2 as XferCommand, not that it would do much as the error happens in the install phase. I also did a fresh reinstall and it still occurs.

I'm using the net install form a USB stick. I can't find anything relevant in any of the logs, so I don't really know what else to say.

Any clue on what's going on?

Edit: I noticed not only pacman, but syslog too taking around 20% CPU each when this happens, then when I try to log in from another tty, the login process too takes 20%, and hangs. If I can't solve this I'm not going to be able to install Arch at all.

Last edited by spektre (2011-10-10 20:00:18)

Offline

#2 2011-10-10 14:05:08

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: [SOLVED] Pacman hangs randomly while installing packages

Sounds almost like a hardware issue more than anything. You're sure your disks are not full? And have you done anything else that does a lot of I/O to stress the disks? Pacman should never hang during the install process as it is doing nothing via the network at that point; only archive unpacking and writing to the filesystem.

Offline

#3 2011-10-10 17:57:48

spektre
Member
From: Sweden
Registered: 2009-05-24
Posts: 31

Re: [SOLVED] Pacman hangs randomly while installing packages

I tried installing from the core image instead of the netinstall I was using, works perfectly now. It might have been something with mkinitcpio failing during the system install from the netinstall image. I did it manually by something in the ways of 'mkinitcpio -g /mnt/boot/linux-image.img', and I'm not sure if this was correct. mkinitcpio worked fine like everything else with the core image so this is the only difference I can see, apart from probably version differences between core and netinstall, but pacman was updated to current straight away after core install and hasn't made a fuss.

Apart from that, I performed the install from the core image exactly the same way so it's not a hardware issue, the disk was wiped before each install too (why would I want anything else than Arch on it? wink).

If I can get a confirmation about the mkinitcpio line being wrong I can mark this solved. Otherwise I'll mark it solved in a while, as my system works, but not from the netinstall as I intended.

tl;dr: netinstall mkinitcpio problem, maybe. (?)

Offline

#4 2011-10-10 18:34:09

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Pacman hangs randomly while installing packages

Yeah, that's wrong. mkinitcpio needs to know about the root of the install. For versions 0.7.2 and later, it's sufficient to do:

# mkinitcpio -b /mnt -p linux

Prior to that, the basedir option isn't reliable enough... you'll need to chroot:

# for d in dev proc sys; do mount -B "/$f" "/mnt/$f"; done
# chroot /mnt mkinitcpio -p linux
# umount /mnt/{dev,proc,sys,}

And I suppose I have to point out this bug which you shouldn't run into if you follow this to the letter, but you should know about it because it affects the installer until mkinitcpio 0.7.4 moves out of [testing].

Offline

#5 2011-10-10 20:00:01

spektre
Member
From: Sweden
Registered: 2009-05-24
Posts: 31

Re: [SOLVED] Pacman hangs randomly while installing packages

Thanks a lot for enlightening me! It feels good not having questions like this unanswered.

Marking this solved.

Offline

Board footer

Powered by FluxBB