devdoc:devdoc_switch_i586_x86_64

This is an old revision of the document!


Switching Images between i586 and x86_64

Beginning with SVN r7353 and officially with AstLinux 1.2.5, two new board types were added: genx86_64 and genx86_64-serial. These boards are x86_64 builds using a 64-bit toolchain, initrd and Linux kernel.

In general, users will be advised to choose either a geni586[-serial] or genx86_64[-serial] install image and stick with that board type, but developers may want to take a shortcut and switch between i586 and x86_64.

Switching images requires using the CLI and SVN r7353 or later. You must see the trailing [32|64] with the following:

pbx ~ # upgrade-run-image 
Usage: upgrade-run-image check|upgrade|show|revert firmware_repository_url [32|64]

Example 1 - currently using geni586 or geni586-serial image, switch to 64-bit:

upgrade-run-image check http://bla-bla.tld/beta-firmware-1.x 64
(if it looks good, then)
upgrade-run-image upgrade http://bla-bla.tld/beta-firmware-1.x 64

Example 2 - currently using genx86_64 or genx86_64-serial image, switch to 32-bit:

upgrade-run-image check http://bla-bla.tld/beta-firmware-1.x 32
(if it looks good, then)
upgrade-run-image upgrade http://bla-bla.tld/beta-firmware-1.x 32

Tip -> You many need to first do a upgrade-run-image revert (no reboot) to be able to upgrade.

Somewhat surprisingly, almost everything works as expected when switching between i586 and x86_64, but there are a couple exceptions:

  • LDAP-AB using slapd, the /mnt/kd/ldap/data/data.mdb database is specific to 32 or 64 bits and needs to be rebuilt.
  • Asterisk FOP2 uses a binary blob for either 32 or 64 bit systems, so a new version must be installed.
  • The initrd.img file that accompanies the run image is specific to 32 or 64 bits, usually not a problem. Do not revert to a different architecture and reboot.

1) To be safe, first export the the database in LDIF format via the LDAP-AB tab. (should not be needed, just a backup)

2) Before you make an architecture switch…

service slapd stop
slapd -T cat > /mnt/kd/ldap/save.ldif
rm /mnt/kd/ldap/data/data.mdb

3) After you have made an architecture switch and rebooted…

service slapd stop
rm /mnt/kd/ldap/data/data.mdb
slapd -T add -l /mnt/kd/ldap/save.ldif
service slapd init

You could just use the LDAP-AB tab for the backup/restore, but using cat/add also restores the passwords.

  • devdoc/devdoc_switch_i586_x86_64.1448554778.txt.gz
  • Last modified: 2015/11/26 10:19
  • by abelbeck