User:Immolo/Sandbox/About thyme
This article is a WIP wiki migration document for migrating a 32bit system to the experimental time64 profiles. Here be dragons! there will be issues with your system, so only proceed if you are happy to debug and report what you find.
The year 2038 problem (also known as Y2038, Y2K38, Y2K38 superbug or the Epochalypse) is a time computing problem that leaves some computer systems unable to represent times after 03:14:07 UTC on 19 January 2038. This affects all 32bit systems.
New installs
If a user is planning on fresh installing a new Gentoo system, then just select a time64 stage3 tarball such as https://distfiles.gentoo.org/releases/x86/autobuilds/current-stage3-i686-ssemath-t64-openrc/stage3-i686-ssemath-t64-openrc-20241118T170330Z.tar.xz and then complete an install as per normal in the Handbook.
musl users
Nothing to see here, the system is already set.
Migrating a glibc system
The system needs to be updated in steps to help provided a working system as the end result.
It is recommended to update before attempting this, however this has been tested with a GCC as low as version 13.
For now all testing is happening in ~ARCH (i.e. ~x86) DO NOT expect or report bugs for a stable system!
Backup the system
Choose the preferred method to backup the system.
As a suggestion:
- Boot into installcd
- Mount the system partitions as normal to /mnt/gentoo
- Insert USB flash drive with enough free space and mount to /mnt/usb
- Run:
root #
cd /mnt/gentoo
root #
tar cvJf /mnt/usb/pre-t64-system-backup.tar.xz *
Prepare system
Install the app-portage/time64-prep package:
root #
emerge --ask app-portage/time64-prep
Run a test run to check for issues:
root #
time64-prep
If everything looks good, then proceed with real run:
root #
time64-prep --update
Open /etc/portage/make.conf and comment out any CHOST line.
Select correct profile
Chose the correct profile for the migration, so default/linux/x86/23.0/desktop would migrate to default/linux/x86/23.0/t64/desktop/ as an example.
Upgrade the toolchain
It's is highly recommend to use the binhost for the upgrade steps where possible, but at the time of reading these may not be available for your profile.
root #
emerge --ask --verbose --oneshot sys-devel/gcc
Next, make sure the GCC version just built is selected:
root #
eselect gcc list
root #
eselect gcc set X
root #
. /etc/profile
Now, binutils:
root #
emerge --ask --verbose --oneshot sys-devel/binutils
Next, make sure the binutils version just built is selected:
root #
eselect binutils list
root #
eselect binutils set X
root #
. /etc/profile
Then, glibc:
root #
emerge --ask --verbose --oneshot sys-libs/glibc
Finally, libtool
root #
emerge --ask --verbose --oneshot dev-build/libtool
Update world
Now the toolchain has been prepared, it is time to rebuild the entire system with time64 support:
root #
emerge -e @world
Cleanup system
After completing emerge -e @world
, clean up files from /usr/libt32
:
Ensure the rebuild is complete and the system is stable before running this command.
root #
rm -rf /usr/libt32