Cannot update Archlinux HF 2012-09-18


16 posts
by jpmonette » Fri Dec 21, 2012 5:26 am
Hello,

I recently received a Raspberry Pi. Since I'm a big fan of Archlinux, I decided to install Arch as my first OS on the RPi. I got the "archlinux-hf-2012-09-18", flashed it on my SDHC Kingston 8GB Class 4. I'm using my Android Nexus S USB power cord to get the 5V & 700mA.

I'm able to boot, log in using SSH. After that, my first guess is to update everything to the latest Archlinux and package. I did a couple of "sync" (after reading this in many tutorials), executed "pacman -S linux-raspberrypi raspberrypi-firmware".

During the process, I always end up waiting for some time for one package updating (this time, it was the linux-raspberrypi package). I then receive a bunch of error:

Code: Select all
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/nilfs2/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/nilfs2')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/cifs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/cifs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/btrfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/btrfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/hfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/hfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/jfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/jfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/xfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/xfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/fuse/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/fuse')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/gfs2/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/gfs2')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/squashfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/squashfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/reiserfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/reiserfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/nls/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/nls')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ecryptfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ecryptfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/hfsplus/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/hfsplus')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ntfs/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ntfs')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ocfs2/ (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/ocfs2')
warning: warning given when extracting usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/binfmt_misc.ko.gz (Can't create '/usr/lib/modules/3.2.27-17-ARCH+/kernel/fs/binfmt_.ko.gz')


And then that:

Code: Select all
error: could not open file /var/lib/pacman/local/linux-raspberrypi-3.2.27-17/desc: Read-only file system
error: could not update database entry linux-raspberrypi-3.2.27-17
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
warning: could not remove lock file /var/lib/pacman/db.lck


Then, no way to do any operation with Pacman anymore. If I try to remove the db.lock, i receive this error:

Code: Select all
rm: cannot remove '/var/lib/pacman/db.lck': Read-only file system


Since I don't know else what to do to be able to update with pacman, I finaly reboot with the command "reboot". Then, the Pi doesn't seem to be able to boot back up. The ethernet leds are not opening up either, just a black screen. The only way to leave this is to reflash & getting stuck again in the process.

Any idea how to fix that? I have a RPi Model B.

Thanks.
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by sdjf » Fri Dec 21, 2012 8:19 am
Someone else will know more than me, but I believe you have to do a full system update rather than just select two packages, especially as there also is a third firmware package that I think needs updating as well, linux-headers-raspberrypi. Partial updates are frowned on, likely to result in things breaking.

Also, I have seen people using pacman -Syyu or pacman -Syu (rather than just -S) in order to update (my system is not far enough along to have done it yet)

Also, a new image is coming out very shortly (Pepedog says he is working on it today), you may want to wait to get that rather than reflash the 18 September image.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by drirr » Fri Dec 21, 2012 12:45 pm
When updating the system you really should run:
Code: Select all
pacman -Syu

This will synchronize your repositories with the mirror and then update all packages were a newer version is available.

As for your problem, it seems like somehome your root partition has been mounted read-only. What does "df -h" and "mount" give back for results?
Raspberry Pi (rev 000f, 512MB RAM) with heatsinks and a modmypi case running Arch Linux ARM (armv6h) hooked up to a 750GB 2.5" USB-harddrive
Posts: 54
Joined: Sun Sep 09, 2012 8:06 am
by jpmonette » Fri Dec 21, 2012 11:29 pm
drirr wrote:When updating the system you really should run:
Code: Select all
pacman -Syu

This will synchronize your repositories with the mirror and then update all packages were a newer version is available.

As for your problem, it seems like somehome your root partition has been mounted read-only. What does "df -h" and "mount" give back for results?

I already tried to make to get the rep up to date and get the updates, but I also get a couple of errors:

Code: Select all
error: failed retrieving file 'util-linux-2.22.1-3-armv6h.pkg.tar.xz' from mirror.archlinuxarm.org : Operation too slow. Less than 1024 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'krb5-1.11-1-armv6h.pkg.tar.xz' from mirror.archlinuxarm.org : Failed writing body (2560 != 16384)  323K/s 00:01 [###############################################----------------------------------------]  55%
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
warning: failed to retrieve some files from core
:: Retrieving packages from extra...
warning: failed to retrieve some files from extra
warning: failed to retrieve some files from extra
warning: failed to retrieve some files from extra
warning: failed to retrieve some files from extra
:: Retrieving packages from community...
warning: failed to retrieve some files from community
:: Retrieving packages from alarm...
warning: failed to retrieve some files from alarm
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
warning: could not remove lock file /var/lib/pacman/db.lck


Pretty much the same kind of errors...
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by jpmonette » Fri Dec 21, 2012 11:30 pm
Here's the output of a
Code: Select all
df -h


Code: Select all
Filesystem      Size  Used Avail Use% Mounted on
rootfs          1.8G  431M  1.3G  26% /
/dev/root       1.8G  431M  1.3G  26% /
devtmpfs         92M     0   92M   0% /dev
tmpfs            92M     0   92M   0% /dev/shm
tmpfs            92M  256K   92M   1% /run
tmpfs            92M     0   92M   0% /sys/fs/cgroup
tmpfs            92M     0   92M   0% /tmp
/dev/mmcblk0p1   94M   36M   59M  38% /boot
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by sdjf » Fri Dec 21, 2012 11:33 pm
run the mount command, too.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by jpmonette » Sat Dec 22, 2012 12:12 am
Output of the mount command:

Code: Select all
[root@alarmpi ~]# mount
/dev/root on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=93960k,nr_inodes=23490,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by jpmonette » Sat Dec 22, 2012 2:19 am
Could this be related to a bad USB power cord?
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by pepedog » Sat Dec 22, 2012 10:25 am
Could be, looks like corruption
Posts: 966
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Sun Dec 23, 2012 7:11 pm
when issue of corruption occurs, is there any way we can run file system checks on an entire partition to make sure it isn't something that can be checked with the fsck command? I know we can do that with Linux boxes, but can Windows and DOS folks run fsck on Linux file systems?

I have a sense that when a system is acting up, whether due to power issues or lack of memory, it can give misleading output in dmesg, fsck and other commands that check the system. It would seem that before reflashing the card again, we should run fsck to make sure it isn't something simple that fsck can fix, huh? Of course, this demands having another system that can run the appropriate fsck.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Sun Dec 23, 2012 8:38 pm
Edit /boot/config.txt and put this line in
kernel=kernel_emergency.img
sync and reboot, that is a busybox system, there you can
e2fsck -f -y /dev/mmcblk0p2
Comment out that line to boot into archlinuxarm
Posts: 966
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Mon Dec 24, 2012 11:48 pm
can booting into the emergency image be used to run scripts?
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by pepedog » Tue Dec 25, 2012 12:44 am
Yes, it's a busybox system. No pacman or ability to install packages. Don't expect to auto run things or every driver being there.
Posts: 966
Joined: Fri Oct 07, 2011 9:55 am
by sdjf » Tue Dec 25, 2012 12:51 am
oh well, there goes that idea for a way to get in and do some things. without the zaurus driver, not much use to me at this point.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California
by jpmonette » Sun Jan 06, 2013 6:50 pm
After buying and receiving my cord from Adafruit (the one sold for RPi), I still receive some errors related to the update to the latest firmware/kernel.

More information there viewtopic.php?f=28&t=28509&p=252593. I do not seem to be the only one with this issue (http://archlinuxarm.org/forum/viewtopic ... dd019e7ec1).
Posts: 10
Joined: Fri Dec 21, 2012 5:16 am
by sdjf » Sun Jan 06, 2013 7:10 pm
are you syncing before each update?
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || This Pi owner is running Arch on 512MB Model B.
Posts: 1292
Joined: Fri Mar 16, 2012 5:20 am
Location: California