Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

VM starts as bash shell sometimes (Ubuntu GUI fails to start) #77

Closed
evgueni-ovtchinnikov opened this issue Apr 16, 2018 · 30 comments
Closed
Assignees

Comments

@evgueni-ovtchinnikov
Copy link

New VM starts ok first time, but when started after shutdown would only get as far as ubuntu-xenial login: prompt. Login as sirfuser starts bash shell.

@evgueni-ovtchinnikov evgueni-ovtchinnikov changed the title VM starts as bash shell second times VM starts as bash shell second time Apr 16, 2018
@KrisThielemans
Copy link
Member

This is X server stuff again. most likely your VB is out-of-date?

@evgueni-ovtchinnikov
Copy link
Author

I am using 5.2.8, the latest so far as I can see from VB site.

@KrisThielemans
Copy link
Member

ok. too bad. This will then be a problem with Ubuntu/the Vagrant box/VBox. Sigh. will presumably have to be flagged upstream, but not sure where...

Maybe try a "sudo apt-get update;sudo apt-get upgrade" and hope it disappears...

@evgueni-ovtchinnikov
Copy link
Author

No, update+upgrade did not help

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

I've installed the VGA for 5.2.8, so that should work. At any rate, could you please test whether installing VGA to your VM solves the problem?

open a terminal

sudo mount -t iso9660 /dev/cdrom /media
sudo /media/VBoxLinuxAdditions.run
sudo shutdown -r now

@evgueni-ovtchinnikov
Copy link
Author

mount: no medium found on /dev/sr0

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

try sudo mount -t iso9660 /dev/cdrom /media instead

@evgueni-ovtchinnikov
Copy link
Author

sudo mount -t iso9660 /dev/cdrom /media
instead of
sudo mount -t iso9660 /dev/cdrom /media
?
(looks identical to me)

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

@evgueni-ovtchinnikov try to insert guest addition CD first
image

@KrisThielemans
Copy link
Member

can we please try update_VGA.sh instead to the manual commands? (as a debugging check). still needs you to "insert the CD" as above

@evgueni-ovtchinnikov
Copy link
Author

tried update_VGA.sh, restarted - no difference

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

did you insert the cd?

insert the CD, run update_VGA.sh. If that doesn't work try the other commands.

@evgueni-ovtchinnikov
Copy link
Author

what CD?

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

this #77 (comment)

@evgueni-ovtchinnikov
Copy link
Author

nothing happens when I click there

@paskino
Copy link
Contributor

paskino commented Apr 17, 2018

insert the CD clickin' there and then do the update_VGA.sh or manual steps

@KrisThielemans
Copy link
Member

update_VGA.sh should error out if it didn't find the Guest Additions CD, so if it didn't, it should have updated your Guest Additions. This is somewhat unlikely to help as it seems that the VGA should be the same version.

@KrisThielemans
Copy link
Member

@evgueni-ovtchinnikov, what kind of error message are you getting in your console when this happens?

I've just had a case (with the old VM) where it said something like

[drm:vbox_bo_push_sysram [vboxvideo]] *ERROR*  unpin bad xxxxxxx

with xxxxxxx some hexadecimal number.

I found a post that discusses this in 2016 with older VBox which recommends to adding the following to grub.cfg

GRUB_CMDLINE_LINUX_DEFAULT="iomem=relaxed"

I have no clue if this is still necessary. Let's only try this if you get the same error.

@paskino
Copy link
Contributor

paskino commented Apr 18, 2018

The issue was fixed by reinstalling the VGA.

@KrisThielemans
Copy link
Member

KrisThielemans commented Apr 19, 2018

reinstalling the VGA fixed it for me as well, but I have the following in the start-up logs (sudo journalctl -b0 --system _COMM=system)

 Failed to start vboxadd-service.service. 

I discovered that the virtualbox-guest-utils ubuntu package was installed. This could create a conflict with the VGA installed from the CDROM. VBox recommends to use the latter. So, I did the following (after a bit of research)

sudo  apt-get install build-essential module-assistant
sudo /opt/VBoxGuestAdditions-*/uninstall.sh
sudo apt-get purge virtualb*
sudo reboot

Then I used the update_VGA.sh script to install the VGA.

After that, the vboxadd-service is ok. I haven't had any X server problems yet.

So... @paskino, can you please try to create a new VM, do the above, check if the service runs, report back, export a new VM?

@KrisThielemans
Copy link
Member

This hasn't fixed the problem. I just did a reboot where the X-server failed to start (blinking screen). I also noticed that the VM captures the mouse (but doesn't display it), which is quite annoying. I can get out of that by pressing the Host key once (right-ctrl on Windows by default). That confirms it's a VGA problem.

I've run update_VGA.sh. That does lots of stuff but reports "something went wrong, but proceeding anyway". I don't know what went wrong. I'll do an occasional report and let you know.

@paskino, can you see if you have the same update_VGA.sh error and investigate a bit?

@paskino
Copy link
Contributor

paskino commented May 17, 2018

This has been solved by ensuring to run
vagrant plugin install vagrant-vbguest

@evgueni-ovtchinnikov
Copy link
Author

evgueni-ovtchinnikov commented Sep 28, 2018

had this problem again

solution that worked for me:

cd devel/CCPPETMR_VM/scripts
sudo ./update_VGA.sh
click on Devices->Insert Guest Addition CD when prompted to insert CD
reset VM

BTW sudo update_VGA.sh in the home folder did not work (did not find the script - without sudo it did, but update failed)

@KrisThielemans
Copy link
Member

can you check which step in update_VM.sh needs sudo? I'd like to avoid it as much as possible

@evgueni-ovtchinnikov
Copy link
Author

sorry, it was update_VGA.sh of course

apparently mount -t iso9660 /dev/sr0 /media/cdrom failed as the last message before the failure was

"CD still not found. Trying /dev/sr0 !"

@KrisThielemans
Copy link
Member

ok. let's leave this closed as I have no clue what we can do about it :-;

@evgueni-ovtchinnikov
Copy link
Author

the trick i used to get the blinking vm running no longer works - now after reset i get lots of error messages from cloud-init (failed to establish a new connection: network is unreachable/connection refused) and blinking prompt is back

@paskino
Copy link
Contributor

paskino commented Nov 2, 2018

What trick?

update_VGA.sh didn't work? What's the output?

I have to run it every now and again but so far it's done its job.

@evgueni-ovtchinnikov
Copy link
Author

please see my comments on sep 28, just above my previous message

@KrisThielemans KrisThielemans changed the title VM starts as bash shell second time VM starts as bash shell second time (Ubuntu GUI fails to start) Dec 9, 2018
@KrisThielemans KrisThielemans changed the title VM starts as bash shell second time (Ubuntu GUI fails to start) VM starts as bash shell sometimes (Ubuntu GUI fails to start) Dec 9, 2018
@KrisThielemans
Copy link
Member

closing is we haven't had this in ages, and it's not in our control anyway.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants