Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: bsrdjan on September 18, 2012, 02:14:17 PM

Title: Archlinux upgrade ?
Post by: bsrdjan on September 18, 2012, 02:14:17 PM
Hello,

I installed the Arch Linux image on SD card, following the instructions on Archlinux web page.

All seem to work fine but when I try to sync Arch, using pacman -Syu, I am getting following error (at the bottom).

Any ideas what goes wrong?

:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
:: Starting full system upgrade...
:: Replace libsystemd with core/systemd? [Y/n]
:: Replace systemd-tools with core/systemd? [Y/n]
resolving dependencies...
looking for inter-conflicts...

Targets (20): binutils-2.22-10  cracklib-2.8.19-1  dhcpcd-5.6.2-1  filesystem-2012.8-1
              glibc-2.16.0-4  hwids-20120831-1  inetutils-1.9.1-4
              initscripts-2012.08.3-2  kmod-10-1  less-451-1  libedit-20120601_3.0-1
              libsystemd-188-2 [removal]  openssh-6.1p1-2  pacman-mirrorlist-20120916-1
              ppp-2.4.5-4  syslog-ng-3.3.6-1  systemd-189-4
              systemd-tools-188-2 [removal]  sysvinit-2.88-7  sysvinit-tools-2.88-7

Total Installed Size:   66.54 MiB
Net Upgrade Size:       5.02 MiB

Proceed with installation? [Y/n]
(18/18) checking package integrity                     [############################] 100%
(18/18) loading package files                          [############################] 100%
(18/18) checking for file conflicts                    [############################] 100%
error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
Errors occurred, no packages were upgraded.



Thanks and regards,
srdjan
Title: Re: Archlinux upgrade ?
Post by: bsrdjan on September 18, 2012, 09:01:48 PM
tried this and did not work, still can't upgrade glibc
https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib ....
Title: Re: Archlinux upgrade ?
Post by: davidjf2001 on September 19, 2012, 03:06:42 AM
I did not have this problem. I installed the package from the archlinuxarm website exactly as described on the site, including getting the kernel from the /boot directory. All installed fine. I installed many packages most frequently with the -Sy option. I did not use -u.
Title: Re: Archlinux upgrade ?
Post by: xxcn on September 19, 2012, 01:10:11 PM
If the glibc upgrade fails (after `pacman -Syu --ignore glibc,curl`) you must be having files under /lib which are not owned by any package. Identify them with

find /lib -exec pacman -Qo -- {} +

You can then either move those to /usr/lib or remove them if you think they are no longer needed. The upgrade should work with no problems after this.

DO NOT TRY TO FORCE THIS UPGRADE. It will break your system.

Quirks like this are a small price to pay compared with having to wait 6 months to a year for a new OS version and going through a usually painful system upgrade.
Title: Re: Archlinux upgrade ?
Post by: Kean on September 19, 2012, 02:53:05 PM
I found it was the pcmciautils package that was still a holder on /lib
I'm not sure this package is needed, so seems easiest to remove it

The following commands worked for me on 4 different OLinuXino's (Maxi & Micro)

pacman -Syu --ignore glibc
pacman -R pcmciautils
pacman -Su

Kean
Title: Re: Archlinux upgrade ?
Post by: bsrdjan on September 19, 2012, 10:05:23 PM
Kean, thanks a lot! I created SD card following Archlinuxarm.org instructions and all steps worked as you described but the problem occurc during glibc installation (the last step).

I am getting "memory exausted" error, like below. Any ideas how to solve that?

[root@alarm ~]# pacman -Su
:: Starting full system upgrade...
resolving dependencies...
looking for inter-conflicts...

Targets (1): glibc-2.16.0-4

Total Download Size:    7.63 MiB
Total Installed Size:   33.75 MiB
Net Upgrade Size:       0.10 MiB

Proceed with installation? [Y/n]
:: Retrieving packages from core...
glibc-2.16.0-4-arm                            7.6 MiB   688K/s 00:11 [######################################] 100%
(1/1) checking package integrity                                      [######################################] 100%
(1/1) loading package files                                           [######################################] 100%
(1/1) checking for file conflicts                                     [######################################] 100%
(1/1) checking available disk space                                   [######################################] 100%
(1/1) upgrading glibc                                                 [######################################] 100%
Generating locales...
  en_US.UTF-8...memory exhausted
Title: Re: Archlinux upgrade ?
Post by: Kean on September 19, 2012, 10:47:15 PM
Hmmmm... not sure.
I've actually created a swap partition on my uSD for now to avoid memory exhaustion during dev.
Not ideal for longer term due to extra flash writes, but very handy during initial testing.

First I used gparted on a Ubuntu machine with a USB to uSD adapter to resize /dev/sdX2 down by 257MB
Then again using gparted I created an extra partition as Linux Swap in that free space
I found I had to leave 1MB gap between the partitions - can't remember why though
Make sure you run sync before unplugging the card

After booting again on the modified uSD, you just need to run:
echo 1 >/proc/sys/vm/swappiness
mkswap /dev/mmcblk0p3
swapon /dev/mmcblk0p3

Then run your upgrade again.

Setting swappiness to 1 reduces swap usage to only when really needed.  The default of 60 makes the system quite slow, and obviously wears out the flash quicker.

If you want to keep the swap space without running those commands after each boot
edit /etc/sysctl.conf and set vm.swappiness=1
and in /etc/fstab add the following:
/dev/mmcblk0p3  none    swap    defaults        0       0
and reboot

Kean
Title: Re: Archlinux upgrade ?
Post by: bsrdjan on September 20, 2012, 09:54:50 PM
what to say ... it works  :)
Title: Re: Archlinux upgrade ?
Post by: xxcn on September 21, 2012, 01:18:11 PM
The RAM on board is not enough to generate UTF-8 locales. When we worked on support for the board this issue was left unsolved. One possible solution is to disable the UTF-8 locale in /etc/locale.gen, which somewhat cripples the system but most people can live with it.

If you insist on UTF-8, you'll need to enable swap every time glibc is upgraded.