Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:i386toamd64

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
freebsd:i386toamd64 [2015/11/15 21:53]
127.0.0.1 Externe Bearbeitung
freebsd:i386toamd64 [2015/11/15 22:00] (aktuell)
Zeile 30: Zeile 30:
 If necessary, define your kernel config file in /​etc/​make.conf,​ create and edit it (otherwise, GENERIC will be used). If necessary, define your kernel config file in /​etc/​make.conf,​ create and edit it (otherwise, GENERIC will be used).
 Build amd64 world and kernel using: Build amd64 world and kernel using:
-<script ​console>+<code console>
 make buildworld TARGET=amd64 TARGET_ARCH=amd64 make buildworld TARGET=amd64 TARGET_ARCH=amd64
  
 make buildkernel TARGET=amd64 TARGET_ARCH=amd64 make buildkernel TARGET=amd64 TARGET_ARCH=amd64
-</script>+</code>
 This is supposed to pass without any issues. If not: resolve issues, and start over.  This is supposed to pass without any issues. If not: resolve issues, and start over. 
  
 Turn your swap into a miniroot: Turn your swap into a miniroot:
-<script ​console>+<code console
 +swapinfo -h — make sure no swap is in use (if the swap is not free, reboot here) 
 +swapoff /dev/ad4s1b (or whatever your swap device is named — replace that name in the steps below if it is different) 
 +</​code>​ 
 +edit /etc/fstab to comment out the swap line 
 +<code console>​ 
 +newfs -U -n /​dev/​ad4s1b 
 +mount /dev/ad4s1b /mnt 
 +cd /usr/src && make installworld TARGET=amd64 TARGET_ARCH=amd64 DESTDIR=/​mnt 
 +file /​mnt/​bin/​echo — make sure this displays as ELF 64-bit LSB executable 
 +cd /​usr/​src/​etc && make distribution TARGET=amd64 TARGET_ARCH=amd64 DESTDIR=/​mnt 
 +cp /etc/fstab /​mnt/​etc/​fstab This completes your miniroot in the swap volume.  
 +</code>
  
-        swapinfo ​-h — make sure no swap is in use (if the swap is not freereboot here)+Prepare the /usr/obj tree for later installation:​ 
 +The 64-bit (cross) build should be in /​usr/​obj/​amd64.amd64 now, so remove any leftover 32-bit stuff: rm -rf /​usr/​obj/​usr/​src. 
 +<code console>​ 
 +cd /usr/obj && ln -s amd64.amd64/​* . — this should get symlinks for lib32 and usr (the original file location must still be retained by now)  
 +</​code>​ 
 +Copy the 64-bit kernel into a bootable place, like 
 +<code console>​ 
 +cp /​usr/​obj/​amd64.amd64/​usr/​src/​sys/​$YOURKERNEL/​kernel /​boot/​kernel.amd64 
 +</​code>​ 
 +If any further KLDs are needed that have not been statically compiled into the kernelcopy them over to some place (presumably under /boot), too.  
 +Reboot, and stop the system at the loader prompt (in the loader menu, press "​2"​ for FreeBSD 9, or press "​6"​ for FreeBSD 8) 
 +<​code>​ 
 +unload to get rid of the (automatically loaded) 32-bit kernel
  
-        swapoff ​/dev/ad4s1b (or whatever your swap device is named — replace that name in the steps below if it is different)+load /boot/kernel.amd64,​ possibly followed by loading any essential 64-bit KLDs here
  
-        edit /​etc/​fstab ​to comment out the swap line+boot -as to boot into single-user mode, with the loader asking for the location of the root filesystem (rather than figuring it out from /etc/fstab
 +</​code>​ 
 +At the loader prompt asking for the root filesytem, enter ufs:, followed by the name of the swap volume/​partition;​ e.g. ufs:/​dev/​ad4s1b
  
-        newfs -U -n /dev/ad4s1b+Press Enter to get the single-user shell
  
-        ​mount /dev/ad4s1b ​/mnt+Mount (at least) the /, /var and /usr filesystems under /mnt; examine /etc/fstab to know which resources to mount 
 +Bootstrap the system libraries and utilities from the miniroot: 
 +<code console>​ 
 +chflags -R noschg ​/mnt/*bin /mnt/lib* /​mnt/​usr/​*bin /​mnt/​usr/​lib*
  
-        ​cd /usr/​src ​&& ​make installworld TARGET=amd64 TARGET_ARCH=amd64 DESTDIR=/mnt+cd / && ​find *bin lib* usr/*bin usr/lib* | cpio -dumpv ​/mnt
  
-        file /mnt/bin/echo — make sure this displays as ELF 64-bit LSB executable+mount -t devfs devfs /mnt/dev 
  
-        cd /​usr/​src/​etc && make distribution TARGET=amd64 TARGET_ARCH=amd64 DESTDIR=/mnt+chroot ​/mnt so you can pretend living in the final target filesystem space
  
-        cp /etc/fstab /​mnt/​etc/​fstab This completes your miniroot in the swap volume.  +cd /usr/src && make installkernel installworld — this should work without any issues
-</​script>​+
  
-    Prepare ​the /usr/obj tree for later installation:​+exit so you're back in the miniroot environment
  
-        The 64-bit (cross) build should be in /usr/​obj/​amd64.amd64 now, so remove any leftover 32-bit stuff: rm -rf /​usr/​obj/​usr/​src.+reboot 
 +</code>
  
-        cd /usr/obj && ln -s amd64.amd64/​* . — this should get symlinks for lib32 and usr (the original file location must still be retained by now)  +Boot into single-user mode (in the loader menupress "​6"​ then Enter for FreeBSD 9, or press "​4"​ for FreeBSD 8)
-    Copy the 64-bit kernel into a bootable placelike+
  
-        cp /​usr/​obj/​amd64.amd64/​usr/​src/​sys/​$YOURKERNEL/​kernel /​boot/​kernel.amd64+<code console>​ 
 +fsck -p (just make sure all filesystems are allright)
  
-        If any further KLDs are needed that have not been statically compiled into the kernel, copy them over to some place (presumably under /boot), too.  +mount -a -t ufs 
-    ​Reboot,​ and stop the system at the loader prompt ​(in the loader menu, press "​2"​ for FreeBSD 9, or press "​6"​ for FreeBSD 8)+</code> 
 +Edit /etc/fstab to re-enable ​the swap 
 +To give any existing ​(32-bitports a chance to work, do the following:​ 
 +<code console>​ 
 +mkdir /​usr/​local/​lib32
  
-    unload to get rid of the (automatically loaded32-bit kernel+cd /​usr/​local/​lib && find . -type f \-name "​*.so*"​ -o -name "​*.a"​ \| cpio -dumpv ../lib32 
 +</​code>​ 
 +add the following line to /​etc/​rc.conf:​ 
 +<​code>​ 
 +ldconfig32_paths="/​usr/​lib32 /​usr/​local/​lib32"​  
 +</​code>​ 
 +Turn /usr/obj into its canonical form (optional):​ 
 +<code console>​ 
 +cd /usr/obj
  
-    load /​boot/​kernel.amd64, possibly followed by loading any essential 64-bit KLDs here+rm * — just to remove the lib32 and usr symlinks (it will complain and not remove the amd64.amd64 ​directory)
  
-    boot -as to boot into single-user mode, with the loader asking for the location of the root filesystem (rather than figuring it out from /​etc/​fstab) +mv amd64.amd64/​* . && rmdir amd64.amd64  
- +</​code>​ 
-    At the loader prompt asking for the root filesytem, enter ufs:, followed by the name of the swap volume/​partition;​ e.g. ufs:/​dev/​ad4s1b +Remove the temporary kernel (optional): rm /​boot/​kernel.amd64 
- +Exit the single-user shell, bringing the system into multiuser ​
-    Press Enter to get the single-user shell +
- +
-    Mount (at least) the /, /var and /usr filesystems under /mnt; examine /etc/fstab to know which resources to mount +
-    Bootstrap the system libraries and utilities from the miniroot: +
- +
-        chflags -R noschg /mnt/*bin /mnt/lib* /​mnt/​usr/​*bin /​mnt/​usr/​lib* +
- +
-        cd / && find *bin lib* usr/*bin usr/lib* | cpio -dumpv /mnt +
- +
-        mount -t devfs devfs /mnt/dev  +
- +
-    chroot /mnt so you can pretend living in the final target filesystem space +
- +
-    cd /usr/src && make installkernel installworld — this should work without any issues +
- +
-    exit so you're back in the miniroot environment +
- +
-    reboot +
-    Boot into single-user mode (in the loader menu, press "​6"​ then Enter for FreeBSD 9, or press "​4"​ for FreeBSD 8) +
- +
-    fsck -p (just make sure all filesystems are allright) +
- +
-    mount -a -t ufs +
- +
-    Edit /etc/fstab to re-enable the swap +
-    To give any existing (32-bit) ports a chance to work, do the following:​ +
- +
-        mkdir /​usr/​local/​lib32 +
- +
-        cd /​usr/​local/​lib && find . -type f \( -name "​*.so*"​ -o -name "​*.a"​ \) | cpio -dumpv ../lib32 +
- +
-        add the following line to /​etc/​rc.conf:​ +
- +
-            ldconfig32_paths="/​usr/​lib32 /​usr/​local/​lib32"​  +
- +
-    Turn /usr/obj into its canonical form (optional):​ +
- +
-        cd /usr/obj +
- +
-        rm * — just to remove the lib32 and usr symlinks (it will complain and not remove the amd64.amd64 directory) +
- +
-        ​mv amd64.amd64/​* . && rmdir amd64.amd64  +
- +
-    Remove the temporary kernel (optional): rm /​boot/​kernel.amd64 +
-    Exit the single-user shell, bringing the system into multiuser ​+
  
 Now the basic migration has been done. Now the basic migration has been done.
  
 Some 32-bit ports might not work, despite of the hackery to save their shared libs in a separate place. It's probably best to reinstall all ports. portupgrade -af doesn'​t work as it clobbers its own package database in the course of this operation (when reinstalling ruby and/or ruby-bdb). ​ Some 32-bit ports might not work, despite of the hackery to save their shared libs in a separate place. It's probably best to reinstall all ports. portupgrade -af doesn'​t work as it clobbers its own package database in the course of this operation (when reinstalling ruby and/or ruby-bdb). ​
freebsd/i386toamd64.1447620835.txt.gz · Zuletzt geändert: 2015/11/15 22:00 (Externe Bearbeitung)