64bit-migration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
64bit-migration [2021/01/22 10:39] – snarg | 64bit-migration [2022/03/30 11:57] – snarg | ||
---|---|---|---|
Line 7: | Line 7: | ||
* a full up to date backup of the system is a good idea and has saved me in the past. | * a full up to date backup of the system is a good idea and has saved me in the past. | ||
* make sure you have an *identically* up to date 64bit multilib profile VM to create binary packages on. Ensure CFLAGS is going to be identical, or compatible (" | * make sure you have an *identically* up to date 64bit multilib profile VM to create binary packages on. Ensure CFLAGS is going to be identical, or compatible (" | ||
+ | * read ahead a few points (or the whole page) when starting a step - several problems may be solved in subsequent notes | ||
+ | * if problems arise with libraries and mismatched ABI binaries, scp them over from the donor VM as needed. subsequent emerge will overwrite them later. | ||
== Steps == | == Steps == | ||
Line 13: | Line 15: | ||
cp / | cp / | ||
- | | + | |
+ | | ||
+ | |||
+ | < | ||
+ | |||
+ | * convert / | ||
+ | |||
+ | < | ||
* ON THE 64bit VM (which will build ia32 emulation by default): | * ON THE 64bit VM (which will build ia32 emulation by default): | ||
Line 27: | Line 36: | ||
ldconfig | ldconfig | ||
- | mkdir /lib32 | + | mkdir / |
mkdir /lib64 | mkdir /lib64 | ||
- | mkdir /usr/lib32 | + | mkdir / |
mkdir /usr/lib64 | mkdir /usr/lib64 | ||
Line 39: | Line 48: | ||
cp -ar / | cp -ar / | ||
- | | + | |
+ | cp -ar / | ||
cp -ar / | cp -ar / | ||
Line 47: | Line 57: | ||
< | < | ||
-abi_x86_32</ | -abi_x86_32</ | ||
- | * change make.profile symlink to point to a multilib amd64 profile | + | * change make.profile symlink to point to a multilib amd64 profile. choose 17.0 or 17.1 based on Donor VM profile. be aware of the difference. |
* on donor pc or VM: | * on donor pc or VM: | ||
- | quickpkg glibc gcc zlib ncurses gmp mpfr util-linux acl attr sandbox coreutils procps binutils libcap mpc cracklib flex =db-5* glib pam pambase =python-3.6* bash readline findutils install-xattr bzip2 tar xz-utils make grep patch gawk sed libpcre dev-libs/ | + | quickpkg glibc gcc zlib ncurses gmp mpfr util-linux acl attr sandbox coreutils procps binutils libcap mpc cracklib flex =db-5* glib pam pambase =python-3.8* bash readline findutils install-xattr bzip2 tar xz-utils make grep patch gawk sed libpcre dev-libs/ |
* on source VM, scp -r / | * on source VM, scp -r / | ||
Line 58: | Line 68: | ||
** make sure busybox is functional. run this from busybox | ** make sure busybox is functional. run this from busybox | ||
** have a few shells open, in case you break the one you're working from | ** have a few shells open, in case you break the one you're working from | ||
+ | ** remember.. if the source VM is profile 17.1 then this system will need to be built using 17.1, so think about making a /lib and /usr/lib folder (and no lib32 folders) rather than symlinking. | ||
mv /lib oldlib | mv /lib oldlib | ||
- | ln -s lib64 lib | + | ln -s lib64 lib (not on 17.1 - mkdir lib) |
cd /usr | cd /usr | ||
mv lib to oldlib | mv lib to oldlib | ||
- | ln -s lib64 /lib | + | ln -s lib64 lib (not on 17.1 - mkdir lib) |
* this will get overwritten by emerge at the appropriate time, but lets the 32bit loader continue to work for now | * this will get overwritten by emerge at the appropriate time, but lets the 32bit loader continue to work for now | ||
Line 69: | Line 80: | ||
cp migration-backup/ | cp migration-backup/ | ||
ldconfig | ldconfig | ||
- | | + | |
- | * /usr/lib symlink creation will break python. The following will not create orphans as the files are in exactly the same location from portage' | + | * /usr/lib symlink creation |
cd /usr/oldlib | cd /usr/oldlib | ||
- | mv python-exec python3.6 libpython* portage gcc ../lib64 | + | mv python-exec python3.6 libpython* portage gcc ../lib/ |
- | cp -r / | + | cp -r / |
- | * disable collision detection and extract amd64 gcc | + | * disable collision detection and emerge |
- | < | + | < |
- | PATH="/ | + | |
- | * continue to deploy initial binary packages using this method (except with collision detection) donated from prebuilt VM from / | + | |
+ | | ||
- | * backup these: / | + | |
- | * to get 64bit loader and glibc working, | + | ** backup these: / |
- | * restore etc files from above backup | + | ** extract glibc tbz2 binary package directly into root of filesystem. subsequent remerge will track the files correctly later. |
+ | | ||
- | * remove crossdev packages (and crossdev) and check gcc sanity | + | * This might not be needed. Fix 32bit toolchain |
- | emerge --unmerge cross-x86_64-pc-linux-gnu/ | + | < |
- | ldconfig | + | |
- | + | ||
- | * fix 32bit toolchain and python in wrong directory by running: | + | |
- | + | ||
- | | + | |
gcc-config 1 | gcc-config 1 | ||
binutils-config 1 | binutils-config 1 | ||
- | . / | + | . / |
- | Example final binary emerge. Note obvious package version changes required based on source VM: | + | * Finally now that theres a working coreutils etc, If you manually extracted |
- | + | ||
- | PKGDIR=/ | + | |
- | + | ||
- | Finally now that theres a working coreutils etc, binary | + | |
PKGDIR=/ | PKGDIR=/ | ||
Line 108: | Line 111: | ||
Double check / | Double check / | ||
| | ||
- | | + | < |
* Emerging gcc needs to be done now, but also acts as a sanity check to see what we've missed. Repeat the quickpkg / emerge -1k steps for missing things | * Emerging gcc needs to be done now, but also acts as a sanity check to see what we've missed. Repeat the quickpkg / emerge -1k steps for missing things | ||
- | | + | < |
* leave / | * leave / | ||
Line 119: | Line 121: | ||
* @system rebuild - adjust USE as needed | * @system rebuild - adjust USE as needed | ||
- | | + | < |
* work through any problems caused by emerge ordering above. If a dependancy problem proves too hard to solve, cheat by grabbing a binary package from the donor VM prepared earier. The subsequent @world emerge will take over the package later. | * work through any problems caused by emerge ordering above. If a dependancy problem proves too hard to solve, cheat by grabbing a binary package from the donor VM prepared earier. The subsequent @world emerge will take over the package later. | ||
Line 141: | Line 143: | ||
* check for orphans in /usr/lib and all the other places. (bin sbin /usr/bin /usr/sbin). For finding orphan files after migration in /lib32, /usr/lib32, /usr/lib64 | * check for orphans in /usr/lib and all the other places. (bin sbin /usr/bin /usr/sbin). For finding orphan files after migration in /lib32, /usr/lib32, /usr/lib64 | ||
+ | < | ||
+ | and | ||
< | < | ||
64bit-migration.txt · Last modified: 2023/06/21 12:02 by snarg