Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing Gentoo on Generation 2 Hyper-V VM
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
Leonastas
n00b
n00b


Joined: 28 Dec 2016
Posts: 3

PostPosted: Wed Dec 28, 2016 8:41 pm    Post subject: Installing Gentoo on Generation 2 Hyper-V VM Reply with quote

I'm trying to setup Gentoo on a Hyper-V VM and have tried to use both the LiveDVD and the RescueCD and both fail to find the media during the startup process. I think it is likely due to the SCSI adapter the VM uses for the DVD drive, but there is no way to change that (and yes, I am intentionally and specifically wanting a Generation 2 VM). Is there some boot parameter or other feature I can use to get this going?
Here is a screengrab of the error:
http://i67.tinypic.com/2lv1nia.png

Thanks in advance for any advice.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Thu Dec 29, 2016 1:35 am    Post subject: Reply with quote

Hello,

For some reason Gentoo is failing to mount the squashfs and copy it to /newroot. I suspect this is because the CD is inaccessible. This is most often the case when populating udev is slow - if there is another cause, I am not aware of it. An indirect solution is mounting the squashfs manually and proceeding with startup of the operating system. Unfortunately, I can't remember the steps to do this. It would be useful to mount the LiveCD and inspect the contents, specifically the startup scripts (which might be hard to do without a working Linux system...).

EDIT: See https://forums.gentoo.org/viewtopic-t-244837.html, "Creating the initrd image," step 6. I am not sure if this is exactly the same as what happens on the LiveCD but it is close. Unfortunately I can't reproduce your problem or I would get it working for you.

I invite you to search for some combination of "gentoo livecd mount squashfs" - not because I think one could obviously solve the problem by searching this, and that you should have done this, but because I can't find the precise answer I need to give you (what you will find is people wanting to create a GRUB entry that boots a Gentoo LiveCD) and this is the best I can do to acquaint you with the terminology of the problem.

Example: https://forums.gentoo.org/viewtopic-p-6527390.html

A direct solution might be had by modifying the parameters given to Hyper-V if there are any that change device availability on boot. You could also try VirtualBox, but I understand your preference for Hyper-V.
Back to top
View user's profile Send private message
Leonastas
n00b
n00b


Joined: 28 Dec 2016
Posts: 3

PostPosted: Thu Dec 29, 2016 3:08 pm    Post subject: Reply with quote

R0b0t1 wrote:
Hello,

For some reason Gentoo is failing to mount the squashfs and copy it to /newroot. I suspect this is because the CD is inaccessible. This is most often the case when populating udev is slow - if there is another cause, I am not aware of it. An indirect solution is mounting the squashfs manually and proceeding with startup of the operating system. Unfortunately, I can't remember the steps to do this. It would be useful to mount the LiveCD and inspect the contents, specifically the startup scripts (which might be hard to do without a working Linux system...).


Firstly, thanks for taking the time to respond. In regards to the error, I figured inability to see the DVD device was likely the issue. And when it gets to the point of failure there, the keyboard also no longer works - though it does work fine at GRUB prompts on the RescueCD. That's why I was hoping for an edit I could make to the boot parameters at the grub prompt to see if I could make it load the Hyper-V modules.


R0b0t1 wrote:
EDIT: See https://forums.gentoo.org/viewtopic-t-244837.html, "Creating the initrd image," step 6. I am not sure if this is exactly the same as what happens on the LiveCD but it is close. Unfortunately I can't reproduce your problem or I would get it working for you.

I invite you to search for some combination of "gentoo livecd mount squashfs" - not because I think one could obviously solve the problem by searching this, and that you should have done this, but because I can't find the precise answer I need to give you (what you will find is people wanting to create a GRUB entry that boots a Gentoo LiveCD) and this is the best I can do to acquaint you with the terminology of the problem.

Example: https://forums.gentoo.org/viewtopic-p-6527390.html

A direct solution might be had by modifying the parameters given to Hyper-V if there are any that change device availability on boot. You could also try VirtualBox, but I understand your preference for Hyper-V.


I've done quite a bit of thorough searching before turning to the forum, but hadn't tried that one, so thanks for the suggestion. You're right that VirtualBox would be insufficient for my requirements, but it may work as an intermediary to get started. My next step at the moment is to use a different, but hopefully more supported, LiveDVD (openSuSE) and try and either install Gentoo from it's environment or rebuild the ISO using the instructions from the link you provided. Failing that, I may launch VirtualBox and boot up in there and rework the LiveDVD from a Gentoo environment there. A little bit roundabout compared to what I was hoping, but there you go. I'll report back on whether or not I'm successful and what steps I took. Hopefully, down the road, Gentoo will include the modules for Hyper-V Generation 2 VM's in the LiveDVD builds.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Thu Dec 29, 2016 3:49 pm    Post subject: Reply with quote

Hi again,

I just happened to remember the direct solution. When booting the LiveCD, type "gentoo scandelay[=10]" or some higher number. The CD prints a boot message similar to "Hint: Use scandelay[=seconds] if populating devices is slow."

If you are able to diagnose which Hyper-V modules are missing, please mention them; I would expect the LiveCD to simply work. Enabling the scandelay may solve your issue. I only used Hyper-V sparingly last I was able as other things came up, but I remember booting a LiveCD properly.

Reference: https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#Booting_the_installation_media

It must have been the case I got caught up in the details of how the boot process is implemented, probably having to do with the last time I had to go digging through all of this stuff.
Back to top
View user's profile Send private message
Leonastas
n00b
n00b


Joined: 28 Dec 2016
Posts: 3

PostPosted: Mon Jan 09, 2017 3:11 pm    Post subject: Reply with quote

R0b0t1 wrote:
Hi again,

I just happened to remember the direct solution. When booting the LiveCD, type "gentoo scandelay[=10]" or some higher number. The CD prints a boot message similar to "Hint: Use scandelay[=seconds] if populating devices is slow."


Sorry for the slow response, been dealing with a home move and such. I didn't try the scan delay this time, so not sure if that would help.

R0b0t1 wrote:
If you are able to diagnose which Hyper-V modules are missing, please mention them; I would expect the LiveCD to simply work. Enabling the scandelay may solve your issue. I only used Hyper-V sparingly last I was able as other things came up, but I remember booting a LiveCD properly.

Reference: https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#Booting_the_installation_media

It must have been the case I got caught up in the details of how the boot process is implemented, probably having to do with the last time I had to go digging through all of this stuff.


The hyper-v storage drivers need to be, I think, put in as compiled in, not modules, because that's how I got the install to work. My basic process boiled down to this:
1) Booted with another Linux LiveCD (in this case Ubuntu)
2) Followed the Handbook for managing disk and chrooting
3) Configured kernel with Hyper-V support (particularly making sure the SCSI storage driver is compiled in, not modularized)
4) Finished the rest of the install using the Handbook as a reference

Everything seems to be running, so on with installing a GUI :)
Back to top
View user's profile Send private message
WHAINTE
n00b
n00b


Joined: 27 Sep 2017
Posts: 3

PostPosted: Wed Sep 27, 2017 10:35 am    Post subject: Reply with quote

Hello, Im running into the same problem.
do i have to follow every part with another livecd or i can just Format the disks and start with the gentoo livecd?
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Wed Sep 27, 2017 10:40 am    Post subject: Reply with quote

WHAINTE wrote:
Hello, Im running into the same problem.
do i have to follow every part with another livecd or i can just Format the disks and start with the gentoo livecd?


Just use another LiveCD like Ubuntu or SystemRescueCD instead of the Gentoo LiveCD/DVD.

greets, bb
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
WHAINTE
n00b
n00b


Joined: 27 Sep 2017
Posts: 3

PostPosted: Wed Sep 27, 2017 3:53 pm    Post subject: Reply with quote

bbgermany wrote:
WHAINTE wrote:
Hello, Im running into the same problem.
do i have to follow every part with another livecd or i can just Format the disks and start with the gentoo livecd?


Just use another LiveCD like Ubuntu or SystemRescueCD instead of the Gentoo LiveCD/DVD.

greets, bb

Yea i get it. Currently emerging @world with ubuntu. THX.
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