Hello,
On Sun, Nov 03, 2019 at 08:59:08PM -0000, Ian Jeffray wrote:
From what you've said here, the Xen "arch
x86_64" option would NOT be able
to boot an existing 32bit OS, which is what surprises me.
I don't understand what the issue is. If you booted a 32-bit kernel
it would be a 32-bit operating system and thus a pointless thing to
do. So no, you cannot do a pointless thing. If you tried to do the
pointless thing by accident and found it didn't work, you would go
back and switch it to boot 32-bit and then it would work. Is it not
better that it explicitly does not work?
Therefore, if I was to attempt to undertake an
in-place migrate an OS
running on Xen, I'd need to install a new bootloader in synchronisation with
changing the arch via the Xen console.
No, you would need to install a new (64-bit) kernel. In the normal
way of things the bootloader installed in your VM is never actually
used. Only its configuration file is (typically found at
/boot/grub/grub.cfg). The only reason it is installed inside your VM
at all is to provide the scripts and other machinery to keep
/boot/grub/grub.cfg updated.
BitFolk's bootloader, which is currently a version of Grub compiled
with special options, reads your config file at /boot/grub/grub.cfg
and does what it says.
So if you are going to cross-grade from 32-bit to 64-bit on Debian
or Ubuntu, you'd follow instructions like those at:
https://wiki.debian.org/CrossGrading
up to and including the part where it says:
# apt install linux-image-amd64:amd64
Then instead of "reboot" you would do "halt" and then in the Xen
Shell type:
xen-shell> arch x86_64
xen-shell> boot
watching as it hopefully offers you the 64-bit kernel you just
installed, you pick that and it works. If it does not work you back
out by typing:
xen-shell> arch i686
xen-shell> boot
and pick the 32-bit kernel.
But once it has booted with the 64-bit kernel properly and
everything is still working, you are then running a 64-bit VM with a
32-bit userland.
At this point though your dpkg and apt packages are still 32-bit (as
is every other package) so they would only ever install 32-bit
updates. So you do need to do up to and including the part entitled:
Crossgrade `dpkg` `tar` and `apt`
in which you would forcibly overwrite dpkg, apt and tar with the
64-bit versions. That would turn your system into a 64-bit system
with mostly 32-bit packages, and you can safely stop there.
Going further than that, where you force-reinstall every package on
the system, is really tricky and danger-prone.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting