Login loop in Ubuntu 16.04 in VirtualBox with real HDD

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I want to use the same Ubuntu instance by two ways: as a full functional system on real hardware and in VirtualBox on my Windows 8.1 system.



The Ubuntu is installed to a separate hard drive.



I used this instruction to get access to physical hard drive.
https://superuser.com/questions/495025/use-physical-harddisk-in-virtual-box



Ubuntu boots from both real computer and from VirtualBox, but I have problem with usage them together.



My computer has geForce 1050Ti graphics card which is not supported in 16.04 by default.
If I do not install NVidia drivers, the system loads perfectly in VirtualBox, but cannot be booted on real computer and hangs. I can boot it only with nouveau.modeset=0 grub option, but it works terrible with it (works very laggy and supports only 1 display)



If I install any version of Nvidia drivers (from 375 to 390), the system works perfectly on real computer, but goes into login loop in VirtualBox.



What I tried to solve the problem:



1) remove or change permissions for .Xauthority



2) reinstall xorg and ubuntu-desktop



3) install different versions of Nvidia drivers: from 375 to the latest 390



4) restart and reconfigure lightdm



5) install or do not install VirtualBox guest additions



6) tried to use these commands



sudo apt install mokutil
sudo mokutil --disable-validation


I tried all of these options together or separately on fresh installed system. Nothing helps.



Also I tried Ubuntu 17.10, it works perfectly and can be booted on real hardware and in VirtualBox without any issues. But unfrotunately I need exactly 16.04 for my purposes.



Maybe is there any option to disable Nvidia drivers at boot?










share|improve this question























  • One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
    – user535733
    Feb 7 at 11:26










  • how to do this? is there any instruction or example?
    – Sergey Kravchenko
    Feb 7 at 12:45










  • Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
    – user535733
    Feb 7 at 12:46











  • I want to try this an option:) Anyway there is nothing to loose for me:)
    – Sergey Kravchenko
    Feb 7 at 12:49














up vote
0
down vote

favorite












I want to use the same Ubuntu instance by two ways: as a full functional system on real hardware and in VirtualBox on my Windows 8.1 system.



The Ubuntu is installed to a separate hard drive.



I used this instruction to get access to physical hard drive.
https://superuser.com/questions/495025/use-physical-harddisk-in-virtual-box



Ubuntu boots from both real computer and from VirtualBox, but I have problem with usage them together.



My computer has geForce 1050Ti graphics card which is not supported in 16.04 by default.
If I do not install NVidia drivers, the system loads perfectly in VirtualBox, but cannot be booted on real computer and hangs. I can boot it only with nouveau.modeset=0 grub option, but it works terrible with it (works very laggy and supports only 1 display)



If I install any version of Nvidia drivers (from 375 to 390), the system works perfectly on real computer, but goes into login loop in VirtualBox.



What I tried to solve the problem:



1) remove or change permissions for .Xauthority



2) reinstall xorg and ubuntu-desktop



3) install different versions of Nvidia drivers: from 375 to the latest 390



4) restart and reconfigure lightdm



5) install or do not install VirtualBox guest additions



6) tried to use these commands



sudo apt install mokutil
sudo mokutil --disable-validation


I tried all of these options together or separately on fresh installed system. Nothing helps.



Also I tried Ubuntu 17.10, it works perfectly and can be booted on real hardware and in VirtualBox without any issues. But unfrotunately I need exactly 16.04 for my purposes.



Maybe is there any option to disable Nvidia drivers at boot?










share|improve this question























  • One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
    – user535733
    Feb 7 at 11:26










  • how to do this? is there any instruction or example?
    – Sergey Kravchenko
    Feb 7 at 12:45










  • Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
    – user535733
    Feb 7 at 12:46











  • I want to try this an option:) Anyway there is nothing to loose for me:)
    – Sergey Kravchenko
    Feb 7 at 12:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to use the same Ubuntu instance by two ways: as a full functional system on real hardware and in VirtualBox on my Windows 8.1 system.



The Ubuntu is installed to a separate hard drive.



I used this instruction to get access to physical hard drive.
https://superuser.com/questions/495025/use-physical-harddisk-in-virtual-box



Ubuntu boots from both real computer and from VirtualBox, but I have problem with usage them together.



My computer has geForce 1050Ti graphics card which is not supported in 16.04 by default.
If I do not install NVidia drivers, the system loads perfectly in VirtualBox, but cannot be booted on real computer and hangs. I can boot it only with nouveau.modeset=0 grub option, but it works terrible with it (works very laggy and supports only 1 display)



If I install any version of Nvidia drivers (from 375 to 390), the system works perfectly on real computer, but goes into login loop in VirtualBox.



What I tried to solve the problem:



1) remove or change permissions for .Xauthority



2) reinstall xorg and ubuntu-desktop



3) install different versions of Nvidia drivers: from 375 to the latest 390



4) restart and reconfigure lightdm



5) install or do not install VirtualBox guest additions



6) tried to use these commands



sudo apt install mokutil
sudo mokutil --disable-validation


I tried all of these options together or separately on fresh installed system. Nothing helps.



Also I tried Ubuntu 17.10, it works perfectly and can be booted on real hardware and in VirtualBox without any issues. But unfrotunately I need exactly 16.04 for my purposes.



Maybe is there any option to disable Nvidia drivers at boot?










share|improve this question















I want to use the same Ubuntu instance by two ways: as a full functional system on real hardware and in VirtualBox on my Windows 8.1 system.



The Ubuntu is installed to a separate hard drive.



I used this instruction to get access to physical hard drive.
https://superuser.com/questions/495025/use-physical-harddisk-in-virtual-box



Ubuntu boots from both real computer and from VirtualBox, but I have problem with usage them together.



My computer has geForce 1050Ti graphics card which is not supported in 16.04 by default.
If I do not install NVidia drivers, the system loads perfectly in VirtualBox, but cannot be booted on real computer and hangs. I can boot it only with nouveau.modeset=0 grub option, but it works terrible with it (works very laggy and supports only 1 display)



If I install any version of Nvidia drivers (from 375 to 390), the system works perfectly on real computer, but goes into login loop in VirtualBox.



What I tried to solve the problem:



1) remove or change permissions for .Xauthority



2) reinstall xorg and ubuntu-desktop



3) install different versions of Nvidia drivers: from 375 to the latest 390



4) restart and reconfigure lightdm



5) install or do not install VirtualBox guest additions



6) tried to use these commands



sudo apt install mokutil
sudo mokutil --disable-validation


I tried all of these options together or separately on fresh installed system. Nothing helps.



Also I tried Ubuntu 17.10, it works perfectly and can be booted on real hardware and in VirtualBox without any issues. But unfrotunately I need exactly 16.04 for my purposes.



Maybe is there any option to disable Nvidia drivers at boot?







boot drivers nvidia virtualbox login






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 7 at 13:07

























asked Feb 7 at 11:03









Sergey Kravchenko

1012




1012











  • One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
    – user535733
    Feb 7 at 11:26










  • how to do this? is there any instruction or example?
    – Sergey Kravchenko
    Feb 7 at 12:45










  • Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
    – user535733
    Feb 7 at 12:46











  • I want to try this an option:) Anyway there is nothing to loose for me:)
    – Sergey Kravchenko
    Feb 7 at 12:49
















  • One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
    – user535733
    Feb 7 at 11:26










  • how to do this? is there any instruction or example?
    – Sergey Kravchenko
    Feb 7 at 12:45










  • Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
    – user535733
    Feb 7 at 12:46











  • I want to try this an option:) Anyway there is nothing to loose for me:)
    – Sergey Kravchenko
    Feb 7 at 12:49















One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
– user535733
Feb 7 at 11:26




One way: Use a different kernel for each "machine" (one with NVIDIA, one without) and use GRUB to select between the kernels at boot-time. It's not-trivial to maintain.
– user535733
Feb 7 at 11:26












how to do this? is there any instruction or example?
– Sergey Kravchenko
Feb 7 at 12:45




how to do this? is there any instruction or example?
– Sergey Kravchenko
Feb 7 at 12:45












Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
– user535733
Feb 7 at 12:46





Are you absolutely sure that you want the maintenance headache? People don't do this for a reason. I'm not aware if any "instructions": One kernel (like the current one) for Vbox, and another kernel (like the previous) with your hardware drivers. You, the human, must keep track of the differences and choose the correct kernel at boot. You must also disable automatic kernel updates (which will erase your kernel work), so must keep track of new kernel versions and upgrade kernels manually. If you don't understand what I just wrote, then DON'T DO IT.
– user535733
Feb 7 at 12:46













I want to try this an option:) Anyway there is nothing to loose for me:)
– Sergey Kravchenko
Feb 7 at 12:49




I want to try this an option:) Anyway there is nothing to loose for me:)
– Sergey Kravchenko
Feb 7 at 12:49















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003845%2flogin-loop-in-ubuntu-16-04-in-virtualbox-with-real-hdd%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003845%2flogin-loop-in-ubuntu-16-04-in-virtualbox-with-real-hdd%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

Running the scala interactive shell from the command line

Do not install recommended packages of dependencies