Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I have to install gentoo x86_64 from an i386 installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
wilsonsamm
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 196

PostPosted: Wed Dec 02, 2009 9:02 pm    Post subject: I have to install gentoo x86_64 from an i386 installation Reply with quote

well as the title says, I have an amd64 computer on my hands. On my hard disc is a gentoo installation which I put in place while I still had a working CD drive. But now, you see, I want to use x86_64, installing a new gentoo system on my spare partition.

But how can I do this from a x86 userland and kernel? what do I need to do? I have been thinking I could compile a x86_64 kernel, and use it with a x86 userland (I think it's possible to compile support for 32-bit binaries into a 64-bit kernel). Then, I cross-compile my toolchain into x86_64, and then changing my CHOST to remerge system and then world.

What do we think? have I left some important thing out?
And what's the no-no surrounding changing the CHOST anyway?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Wed Dec 02, 2009 9:27 pm    Post subject: Reply with quote

wilsonsamm,

Don't even think about it.

Make a chroot and get the binaries you need from tinderbox.dev.org and untar them there, making the file system structure you need as you go. Something like this guide to unpicking the liveDVD.

The hard bit is the kernel. You either need to cross compile your kernel (if a 32 bit gcc will produce 64 bit code) or find a binary kernel. You cannot make the kernel in the chroot as you need a 64 bit kernel to be able to chroot.

Your CHOST is hard coded into the tool chain. If you change it, you must rebuild your tool chain in the right order.
Changing from 32 bit to 64 bit toolchains is not possible because at some stage you will have a mix of 32 bit and 64 bit code that won't work together. At that point you are stuck.

Do you have access to a 64 bit install that you can use to build your 64 bit kernel?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Dec 02, 2009 9:36 pm    Post subject: Reply with quote

In short, get a working CD drive or use an USB stick to boot your box into 64-bit.
Back to top
View user's profile Send private message
wilsonsamm
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 196

PostPosted: Thu Dec 03, 2009 9:06 am    Post subject: Reply with quote

NeddySeagoon wrote:

Your CHOST is hard coded into the tool chain. If you change it, you must rebuild your tool chain in the right order.
Changing from 32 bit to 64 bit toolchains is not possible because at some stage you will have a mix of 32 bit and 64 bit code that won't work together. At that point you are stuck.

That sounds interesting. Are you saying it WILL break, or that it's likely to break?

NeddySeagoon wrote:

Do you have access to a 64 bit install that you can use to build your 64 bit kernel?


No, I don't. Though, I hadn't thought about the possibility of using a usb to boot my box into AMD64. I'm going to see if my BIOS supports that.
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Thu Dec 03, 2009 9:37 am    Post subject: Reply with quote

If USB doesn't work out and you don't care how long it takes, qemu can run a 64 bit guest on a 32 bit host using slow software emulation. (hardware acceleration is not available for 64 bit guests on 32 bit hosts)

You could copy files out through the virtual network... or if you want to live dangerously have qemu use a partition as a virtual harddisk. The vm will see it as a harddisk (/dev/sda) with a filesystem instead of partitions. You'd probably still want a virtual disk in a file to give the vm a swap partition.

It would be weird and slow, but it would probably work.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Thu Dec 03, 2009 7:59 pm    Post subject: Reply with quote

wilsonsamm,

You will have a 32 bit kernel that cannot run 64 bit code. The first part of your toolchain you manage to build 64 bit will not execute - at that point its broken.

If you must do this, a 64 bit kernel is essential. The Gentoo liveDVD.ISO works from a USB key if you just dd it to the device (not to a partition).
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum