moul / scaleway-ipxe

:dancer: custom IPXE config on Scaleway servers
18 stars 4 forks source link

Unable to "see" the installer #1

Open promolic1 opened 8 years ago

promolic1 commented 8 years ago

Hello

I have been trying to use your script for a VC1 instance, expecting an output like this one from your example https://gist.github.com/moul/e8a8853964d229d2db102d2f357ab5e5

Unfortunately, I am not getting any output after selecting an entry of the netboot menu. I've just tried debian 8 and ubuntu 16.04 installers without success.

I am not sure if you should get a terminal screen similar to the one on the netboot.xyz site (the gif one), because I am getting something like this:

image

And after selecting my option, the background goes black and nothing happens, until the machine reboots itself.

As an important detail, I've modified your script, to attach to an existing instance (scw attach), instead of creating a new one, so the first parameter is the name of my instance instead of an image name. I am not sure if this could be the problem?

Edit: Probably something related with my environment? Using windows with cygwin+ssh to a bastion server, inside a tmux session. But I get a similar output trying to do this from the browser serial console on the scaleway panel.

Thanks for reading

moul commented 8 years ago

Hi @promolic1, thank you for your feedback,

As you can see this script is more an hack and there are still some issues

Modifying the script to attach to an existing server is a good idea, and I think the script should be able to manage both cases


I'm not 100% sure, but I think that the black screen and reboot isn't due to the installer or something like this. I think instead that you hit the boot timeout of the Scaleway API, take a look at this: https://github.com/scaleway/initrd/tree/master/Linux#schema-boot-timeline

There is this late step:

│* signal server is "booted"                                           │
│  HTTP request to the metadata API to signal the server               │
│  is successfully booted.                                             │
│  If we don't make this request, the server will be automatically     │
│  powered off after a few minutes because the boot is                 │
│  considered failed                                                   │

Which won't be done in your case, as a workaround, I developed a tiny helper in scaleway-cli that can simulate from outside the server that it was successfully booted, so the API won't consider the boot as a failed one and let you do what you want: $ scw _patch server:{SERVER_UUID_OR_NAME} state_detail=booted

If this is the blocking point, I can add this scw _patch command directly in the script

I won't have so much time in the next days, if you continue the investigation, you can update this issue so I can follow-up and continue later

promolic1 commented 8 years ago

Hello again.

This time, since I didn't have any server running, I reverted back to create a server from the expect script.

I agree with you, after some time, the server automatically reboots because the api didn't received the signal from the instance, so I tried the _patch command while booting, and the server didn't rebooted anymore.

After that, I waited around 15 minutes, and the screen didn't came back from black.

I still think this may be related to the encoding of the terminal, because I still can't see correctly the menu. Do you can see it fine? I mean, blue/black like in the gif of the netboot.xyz website? Or is it glitchy as my image?

streaps commented 7 years ago

I tried to install smartos, but had also timeout issues. The _patch command did the trick. I think adding scw _patch to the script is a good idea.

I mostly use scw start/restart and attach. I removed the run --attach on line 22

-eval spawn slow-stream --raw -b 1 -i 10 --stdout-passthrough -- scw run --attach $scwargs +eval spawn slow-stream --raw -b 1 -i 10 --stdout-passthrough -- scw $scwargs

scw --region=ams1 restart myservername
ipxe.expect \
  "--region=ams1 attach myservername" \
  "chain --autofree http://boot.netboot.xyz/menu.ipxe"