Re: Accidentally "upgraded" i386 to amd64

Andy Ruhl <[email protected]>
Newsgroups gmane.os.netbsd.ports.x86-64
Message-ID <CAJcb3fq6WwpOkHcsXeyLaV469s0XfBssmznTAmsWS4-Bsm7h2w@mail.gmail.com>
On Wed, Dec 2, 2020 at 7:10 AM Greg Troxel <[email protected]> wrote:
>
>
> [dropped port-i386; this is only of interest to people with amd64
> hardware!]

I don't know, I would have been interested...

> I have done this successfully (intentionally).
>
> It sounds like you are running an amd64 kernel but not yet an amd64
> userland.
>
> What I did was:
>
>   install the amd64 kernel
>
>   reboot (always recommended but really really necessary for this)
>
>   install the amd64 userland
>
>   carefully merge the files in etc.  I use etcmanage, but then I went
>   over the diffs from distribution to what I had and did manual merges.
>   Takes a while, maybe an hour, but saves that tracking down things you
>   don't understand later.
>
>   re-run MAKEDEV in /dev, (the MAKEDEV and MAKEDEV.local from amd64 that
>   got updated above as I think it's part of etcdist) because some of the
>   device nodes are different
>
>   reboot again
>
>   mark every package as 'pkg_admin set rebuild=YES'
>
>   run pkg_rollling-replave -ukv, deal with issues
>
> In your case you could "pkgin export" to get a list and then remove them
> all and then add back what you need.
>
> i386 packages  will run ok, almost entirely, but if you mix i386/amd64
> you will quickly have a huge mess.  There is no advantage to running an
> emulated pkgsrc setup, so changing it to native is best.

Unfortunately it's too late for me to do this, sysinst did what it did
and I'm left with fixing what I have but if I someone needs to do it
that looks like a better idea.

> This is because you have packages that are installed that are i386 mode.
>
> I am not clear on if pkgin considers a package needing replacement if
> the arch differs.   This situation is of course unusual.

The only one I couldn't replace manually was pkg_install because it is
pesky. All of the pkg_* binaries are still 32 bit, maybe this is the
problem...

> If you had deleted and used pkgin add or import, should be ok.  Now you
> should be able to "pkgin up", munge keep flags, etc. and use pkgin.

pkgin is currently 64 bit as are all of my packages except pkg_install

> Did you unpack the n9 amd64 userland?

Nope, see above. Sysinst was used.

> Check "file /bin/sleep" and make sure it is the amd64 version.

It is.

> Note that /usr/lib/i386 has compat libs for i386, as part of the amd64 build.

Yeah and I don't want to remove i386 compatibility until I'm sure most
stuff will work.

> Hope this helps.  You may also want to purge things that are from the
> i386 install that were not overwritten from the amd64 install.   But
> make sure all packages are amd64 before you do that.

This is the "I don't know what I don't know" part. So far the machine
seems to be working. As problems pop up I will try to fix them. I'm
sure there will be 32 bit junk scattered across the system "forever",
which is OK as long as it doesn't cause a problem. Maybe some day I
will move the data to a cleanly installed system.

Thanks!

Andy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.