Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing from inside a VM to bare metal
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
Screenager
n00b
n00b


Joined: 26 Nov 2023
Posts: 37

PostPosted: Mon Jan 08, 2024 9:30 pm    Post subject: Installing from inside a VM to bare metal Reply with quote

Hello,

my workstation is currently still running Win10 on a NVMe. There is only one M.2 slot on the mainboard, so I got a new NVMe drive and an external USB case for it. I did my homework and there should be no problem to do a full UEFI install there and once everything works I can just exchange the NVMe drives and then the gentoo install will be on the internal drive.
So in order to reduce my downtime I thought about creating a new VM, boot a minimal gentoo image in there and install from there to the external drive. I would then switch to a bare metal gentoo image to install the kernel and then back to the VM, chroot back in and just keep emerging and configuring until I have enough software installed to start working with it.
So my big question is... only the kernel needs to see the real hardware for driver configuration, right?
Back to top
View user's profile Send private message
jb1277976_
n00b
n00b


Joined: 30 Oct 2023
Posts: 29

PostPosted: Mon Jan 08, 2024 10:14 pm    Post subject: Re: Installing from inside a VM to bare metal Reply with quote

Screenager wrote:
Hello,

my workstation is currently still running Win10 on a NVMe. There is only one M.2 slot on the mainboard, so I got a new NVMe drive and an external USB case for it. I did my homework and there should be no problem to do a full UEFI install there and once everything works I can just exchange the NVMe drives and then the gentoo install will be on the internal drive.
So in order to reduce my downtime I thought about creating a new VM, boot a minimal gentoo image in there and install from there to the external drive. I would then switch to a bare metal gentoo image to install the kernel and then back to the VM, chroot back in and just keep emerging and configuring until I have enough software installed to start working with it.
So my big question is... only the kernel needs to see the real hardware for driver configuration, right?


I'm no expert seriously like 5 days strong on gentoo.

That sounds like a lot of work ? installing gentoo is very easy. You actually learn about your system by installing. The hardest part of gentoo (Easiest) is just compiling and thats it

1. Prepare Disk

2. Install firmware and kernel

3. Fstab

4. Bootloader

The longest thing for me thats takes about 1 hour is llvme but i haven't seen that in some of my installs

Choose a close mirror and add it to your make.conf so packages download faster When installing or emerging add --quiet at the end and you won't see all that compiling it will just show what number you are in during the compile. ( I actually think its faster) Maybe not but thats just me

As far as a vm i don't know anything about that. I would wait for somebody else to chime in.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1584

PostPosted: Tue Jan 09, 2024 5:26 am    Post subject: Re: Installing from inside a VM to bare metal Reply with quote

Screenager wrote:

So my big question is... only the kernel needs to see the real hardware for driver configuration, right?


Emerge gentoo-kernel-bin and you should at least have a bootable installation without too much work about it.

jb1277976_ wrote:
That sounds like a lot of work ?


Why do you think so? Most of the work is source compilation which happens only once unless you make a major change afterwards.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Screenager
n00b
n00b


Joined: 26 Nov 2023
Posts: 37

PostPosted: Tue Jan 09, 2024 9:01 pm    Post subject: Reply with quote

I guess I will just try it out.
As the 'computer guy' I just figured it might be easier to convince people to switch if I can tell them that they don't even need to reboot to start an installation. Just get a new drive, start this VM, open your SSH port and let me go to town.
I might also be a little bit shell shocked from compiling QtWebEngine twice on an old 2nd gen i5, I guess it will be a little bit faster on a Ryzen 9. Well, my workstation is also my entertainment center, so I could throw plex on the beamer while gentoo compiles in a VM :lol:

Hmm.... I guess I could also just go full bare metal install, I just need flatpak to get the plex desktop app, should be ready to go in a reasonable time.

logrusx wrote:

Emerge gentoo-kernel-bin and you should at least have a bootable installation without too much work about it.

This is also a great idea, should be capable of compiling and setting up a DE and then switch to a compiled gentoo-kernel once inside the new enviroment.

That's the best thing about gentoo: endless possibilities to achieve your goal.
Thank you all for your input.
Back to top
View user's profile Send private message
Screenager
n00b
n00b


Joined: 26 Nov 2023
Posts: 37

PostPosted: Thu Jan 18, 2024 2:09 am    Post subject: Reply with quote

To give an update:
If you are switching from windows you can comfortably start the installation in a VM. I used VMware and created a machine without a virtual disk, instead I passed my new ssd in the external case through as a physical drive. Then just load an install image and started the installation. I booted into a 'real' environment to emerge the firmware and kernel, then went back into the VM and compiled lot's of packages. By the time I booted into the fresh install for the first time I already went straight to a desktop environment with a browser installed.

So between kernel compilation and finally setting up fan curves in the UEFI, I had a downtime of around 20 min by doing it that way. Once I'll figure out all the emulation layers around wine, proton and all that stuff I'll probably write a more comprehensive guide for windows power users and gamers that intend to switch to gentoo.
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