Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
General advice on doing an install onto an external drive?
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
Punchcutter
Guru
Guru


Joined: 11 Feb 2007
Posts: 354

PostPosted: Wed Jan 06, 2016 5:59 am    Post subject: General advice on doing an install onto an external drive? Reply with quote

Hi.... I recently bought an SSD, and I would like to do a fresh install onto it, after which it will replace the main HDD internal to my laptop (Thinkpad X61). Ideally I would like to just hook up the SSD with an external USB enclosure, do the install while booted into my usual Gentoo system (rather than booting a separate minimal install CD image), and then do the disk swap. Oh, I should also mention that I will be doing a 64-bit (amd64) install on the SSD, whereas my current system is 32-bit x86 (mainly because I didn't realize before that my hardware supported the 64-bit system!)

Seems like this ought to be straightforward, but.... does anyone have any advice about things to be careful of? Any "gotchas" to watch out for? I'm not specifically asking for advice regarding the use of an SSD, but will be happy to receive anything along those lines as well :)

Thanks.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Wed Jan 06, 2016 6:17 am    Post subject: Reply with quote

The catch 22 you where looking for: you can't do a 64 install from a 32.

I believe you can partition, untar, copy any relevant configs being mindful of arch changes, you data, your /var/lib/portage/world file, etc. You will have to chroot from a 64 kernel like the system rescue CD to complete the install. In fact, I would recommend it instead of the Gentoo minimal CD.

As long as you copy your configs and your /var/lib/portage/world portage should rebuild your install with little or no problem.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Punchcutter
Guru
Guru


Joined: 11 Feb 2007
Posts: 354

PostPosted: Wed Jan 06, 2016 9:16 pm    Post subject: Reply with quote

The Doctor wrote:
The catch 22 you where looking for: you can't do a 64 install from a 32.
...... You will have to chroot from a 64 kernel
Thank you! Yes, I suspected there was something like this. But is there a fairly easy to understand explanation for why this is the case? I'd like to understand if possible. It doesn't seem to be entailed by pure logic :)

And now that I think some more about it, I guess the kernel config will be one of the subtle aspects of this project. Can I just take my current config and do a "make oldconfig" or something to build the new one? (presumably while booting the 64bit distro)

Thanks again.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jan 06, 2016 9:32 pm    Post subject: Reply with quote

Punchcutter,

A 32 bit kernel cannot execute 64 bit code. The other way round works if you have 32 bit support in your 64 bit kernel.

If you want to boot your SSD while its still in the USB enclosure, you will want the kernel parameter rootwait or rootdelay=<sec>
This overcomes the issue with root being mounted before USB is started.

Then you have BIOS uncertainty, about how it and the kernel enumerate drives.
That can be a whole word of pain.
_________________
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
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Fri Jan 08, 2016 8:15 pm    Post subject: Reply with quote

Quote:
Then you have BIOS uncertainty, about how it and the kernel enumerate drives.
That can be a whole word of pain.
Don't get upset, grub always reported boot drive as (hd0) At least on those few boxes I owned :)
Install it on the same drive as /boot to get rid of the first problem (loading kernel). And then mount all partitions by UUID or LABEL rather than /dev/hdaX to get rid of the second problem (root partition)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Jan 08, 2016 10:07 pm    Post subject: Reply with quote

szatox,

Its not grub, its the BIOS that determines the HDD order for grub.
I agree, most BIOSes report the boot drive as hd(0) to grub.
My present system doesn't nor did the one before that. Maybe I'm just unlucky.

Mounting partitions by UUID or LABEL is OK in fstab but to use either on the kernel command line requires an initrd to provide the userspace mount command.
PARTUUID just works there though.
_________________
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