Can not log in Elementary after install ubuntu 18.04 (dual boot) - linux

I am new to Ubuntu 18.04. It has been a long time that I have not updated anything new on my current OS which is Loki (interestingly, besides Loki does not allow ppl to upgrade Juno).
For some reasons, I have to install another Linux OS on my machine, which is ubuntu 18.04 - the minimal installation. Although everything works perfectly to Ubuntu, it makes me cannot log in to my main OS.
Description of an issue: After selecting a boot of elementary, I log in my account on a log-in page of Elementary. It does not show anything else and move back to the log-in. Another try with a guest account (with no password), still the same problem.
Because most of my data and work in Elementary, I have to find a way to solve this problem. Is there anyone here giving me a hand? Thank you very much.

I ran into same problem once.
Login into tty mode by Ctrl+Shift+F1,and enter:
sudo dpkg --configure -a
sudo apt-get install ecryptfs-utils
sudo reboot
And I was able to login

Trying tty mode by Ctrl+Shift+F1, I was able to log-in in a terminal. Turn out that the Ubuntu has used almost the left memory to load an OS. By removing some files by the command rm -rf [filename] to release around 2GB, I was able to have everything back. It was freaking for a while. Phewww...

Related

How can I access my WSL2 files from my natively installed Ubuntu?

I'm really new to Ubuntu and WSL.
My problem is simple: I want to access from Ubuntu which I have installed in my computer (dual boot alongside with Windows) to my WSL2 filesystem that I have in Windows. I located a file named ext4.vhdx which I suppose is my entire wsl drive, but I'm not really sure, it is in
c:\Users\USER\Appdata\Local\Packages\CanonicalGroupLimited.Ubuntu20.04o...\LocalState\
I'm currently into web development and I want to share that environment within WSL2 and Ubuntu, I noticed that using the linux fs is way faster than windows fs and it works better with things like watchers. So, is it possible?
I'm currently running Windows 10 19041 (2004), Ubuntu LTS 20.04
I've also encountered similar issues when doing this WSL Ubuntu sharing thing, and I've finally found a solution on the internet that works out perfectly.
Reference Link:
https://www.nicholasmelnick.com/2020/07/sharing-your-wsl2-environment-with-linux/
So basically these are the steps,
First of all, the WSL's "ext4.vhdx" file should be accessible inside your Ubuntu system (So you must mount your windows drive inside your linux OS)
Install libguestfs-tools package with APT
And finally just create a folder and guestmount the drive with following commands.
$ sudo mkdir -p /mnt/wsl
$ sudo guestmount -o allow_other \
--add /mnt/c/Users/username/AppData/Local/Packages/CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc/LocalState/ext4.vhdx \
-i /mnt/wsl
And done! Hope this would solve your problem. :)

Trying to use bash on Windows and got no installed distributions message

I am trying to use bash on Windows 10, but I'm getting this message when tried to run bash:
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:
https://aka.ms/wslstore Press any key to continue...
When I go to that url which opens the Windows Store app, there no sign of any Linux distribution there.
My windows version is(as in my right bottom corner of the screen):
Windows 10 Enterprise Insider Preview. Evaluation copy.Build
16215.rs_prerelease.170603-1840
I follow the instructions in this guide Installation Guide and also was watching this video Editing code and files on Windows Subsystem for Linux on Windows 10 from Scott Hanselman, but they didn't get the message of no installed distribution.
Any Help?
When the Windows Store opened, there was no Distro to choose, then I found this command lxrun /install and worked for me as well.
You will get something like this as an output:
C:\WINDOWS\system32>lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here:
https://aka.ms/uowterms
Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Would you like to set the Ubuntu locale to match the Windows locale (en-FI)?
The default locale is en_US.
Type "y" to continue: y
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: <you type your login here>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
Documentation is available at: https://aka.ms/wsldocs
I'm getting a similar bug after trying to uninstall and reinstall.
For me I had to open a cmd prompt as administrator and run lxrun /install
I get this when I have recently rebooted. If I wait 5 minutes, the problem fixes itself !
The top answers written for this question are more than enough. I just had trouble following them because lxrun command has been depreceated, so I get the error
'lxrun' is not recognized as an internal or external command, operable
program or batch file.
when I try to run this command with cmd.
It has been replaced with wsl command. You can get more info on this issue here - https://github.com/MicrosoftDocs/WSL/issues/425
When you run wsl /install, there is a chance you may still get the error that you had earlier posted in your question. In that case, simply go to the link https://aka.ms/wslstore as you had gone earlier. If you don't see anything coming up, simply search for Ubuntu and install the same. (If you search with the term wsl though, you will get to see other Linux flavors too and then you can download any of your choice)
It seems that the link given in the command doesn't work. Here's the actual link to the microsoft store for Ubuntu.
https://www.microsoft.com/en-nz/store/p/ubuntu/9nblggh4msv6?rtc=1
You have to go to https://aka.ms/wslstore this link and download ubuntu on windows. After that you can use bash on windows.
If you have any problems with running lxrun /install (for example on ltsb Windows version) try manual mode.
First, go to the folder with downloaded .appx file and run following commands (change filename if needed):
Rename-Item ~/Ubuntu.appx ~/Ubuntu.zip
Expand-Archive ~/Ubuntu.zip ~/Ubuntu
After finishing cd into new folder and run ubuntu.exe file. That's it.
If you get this error after installing a distribution using the windows store, and WSL was working previously, you may need to make sure that the LxssManager service is running, since it often stops after a Windows update or a reboot.
Go to services.msc, and search for LxssManager and start it; if it is running already, restart it.
For everyone who is getting
'lxrun' is not recognized as an internal or external command,
operable program or batch file.
or
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Open microsoft store, install 'Ubuntu' then open the app. This will install ubuntu and later you can use wsl command since lxrun is deprecated
Go to add or remove programs
Install Windows subsystem for Linux
Go to https://aka.ms/wslstore, which will take you to the Microsoft Store
Select and install a Linux distribution
lxrun /install
Works on a Administrator Command Prompt for Windows 10 Professional, Version 1803 Build 17134.165
This installs GNU/Linux by default whereas there is an option to select between:
Ubuntu
openSUSE Leap 42
SUSE Linux Enterprise
Debian GNU/Linux
Kali Linux
If the given link (https://aka.ms/wslstore) works, it openes the windows store for me with an error saying something is wrong on their side and to try again later.
It's actually easier to solve this problem that other solutions listed here. If you run wslconfig /l and if the output is:
Windows Subsystem for Linux Distributions:
Ubuntu (Default)
Just run wslconfig /s Ubuntu to set Ubuntu as default again. It should start working now.
Edit:
I've also found that if this problem occurs on a fresh boot, then you just wait for a few minutes (10 minutes max) and this error automatically disappears.
Edit 2:
I've also found that this error is sometimes also due to the corresponding service not running. Run CMD as administrator and run
net start LxssManager
For running bash on windows ubuntu is required to be installed.
As you've already added bash from programs and features, now you need to install Ubuntu. Contrary to what is seen in most of the installation guides on web, it does not gets installed by running 'bash.exe'.
You can simply go to Microsoft store in search for 'Bash' or 'Ubuntu'and install Ubuntu 18 LTS from there.
After installation you'll be able to use the terminal and all its commands.
Run the bash command in git bash windows. It worked !!
As of 2022, New Linux distributions are available for Windows 10 as well as Windows 11 like Kali Linux and Ubuntu. Both available from Microsoft Store. Someone watching this question now can visit Microsoft Store to Download them..
I had this same issue. But when you go to the windows store you can search for ubuntu and then install the ubuntu app and it works. I think most of the tutorials on the net are from the beta version and have afterwards never been updated.
https://insights.ubuntu.com/2017/07/11/windows-10-loves-ubuntu-loveislove/
Note: This is also old. You do not need to be on the insider builds. I'm not and it worked.
The only thing that worked for me is described here https://learn.microsoft.com/en-us/windows/wsl/install-manual#downloading-distros
https://aka.ms/wsl-ubuntu-1804
manually install it or run Add-AppxPackage.\.appx from PowerShell
The link to the store appears to have a region lock in it, resulting in errors for many visitors.
However there are different Ubuntu distributions to be downloaded. See image below, image is however in Dutch but it will show results.
So pick a version you desire and it will result in a working bash.
The actual answer to the question query is: The user exists with Ubuntu already installed. But WSL command does not find anything in CMD.exe "Command Line" "System does not find distribution."
You need to start the below WSL command from Windows Start Menu. And then the old Linux System will show up on WSL in the command line as found.
If this doesn't work for you? Just start up PowerShell with Administrator and:
WSL --help
WSL "only this command, will start the Linux default distro selected"
You can then start up using this command with CMD.exe Administrator in Windows:
lxrunoffline l "This will now list all your distros"
With an option to remove old distros copied to Windows folders are with perhaps Ubuntu18.04 such way that you will have to use Linux to remove older folders, do not try to copy or edit files in a distro with Windows Apps. You risk integrity problems as well as many errors followed by huge processing time. Use folder /mnt to find your drive with Linux and use commands there to further finish your work as perhaps copying the home directory into a new distro.
My solution to move "not copy" my distro then was: "to give space for C:"
lxrunoffline m -n Ubuntu-18.04 -d d:\wslinstalled\Ubuntu-18.04 "remember folder names"
"Remember folder name such as Ubuntu-18.04 for a specific movement. Unless you will overwrite everything on that folder name with also the lxrunoffline files and you risk losing older copies if you use one folder name. You might end up with a strange name to your project if you just use one directory."
Lxrunoffline has several other commands if you need help just run:
lxrunoffline
like beginner_ said in his answer you need to go to the store and look for the distros you want to install.
Please see the following link to understand what has changed and what you can excpect or what distros you can look for(the list is outdated so just try to find an updated list or just try your luck).
I am running on my machine without the developer mode Ubuntu, OpenSuse and Kali.
Access to Microsoft Store is blocked by my company. For me following worked in PowerShell (admin) -
lxrun /install
Go to cmd, and then run the following command:
lxrun /install
Typing lxrun /install in elevated command prompt works....
The solution to the error "WSL 2 installation is incomplete",
Execute the following steps:
wsl --install -d Ubuntu ## lxrun is no more, its now replaced with wsl,
enter image description here
wsl
enter image description here

ubuntu 12.04 system running so slow after installing xen and changing grub settings

I have an Ubuntu 12.04 system where I just installed XEN using these instructions: https://help.ubuntu.com/community/XenProposed
I set the memory limit to be 512M.
Now.. when I reboot the computer, it is so slow, it's taken 10 minutes to render the default desktop (kate) after I log in.
I'm not savvy enough with Linux to know how to undo this properly. If I wanted to test undoing the changes to grub, what would be the reverse of this command?
sudo sed -i 's/GRUB_DEFAULT=.*\+/GRUB_DEFAULT="Xen 4.1-amd64"/' /etc/default/grub
If you have any other suggestions on how I can resolve this, that'd be great.
Thanks.
I had to set the following value in /etc/default/grub:
GRUB_DEFAULT=0

Ubuntu is running in low graphics mode after installing ATI driver

I have Ubuntu, version 12. I installed ATI driver and I'm getting an error running in low graphics mode.
I needed to install the driver because every time I update or upgrade Ubuntu, right after installing the packages the system runs in low graphics mode.
The answer here also couldn't help me.
Graphics card model: ATI Radeon HD 3600
Installing fglrx also didn't help. The ATI driver is still installed and it still runs in low graphics mode. What should I do?
First, you should understand that your graphics manager is messed up and that is what you want to fix. Now; here is a solution to your problem:
Here is a simple guide showing you how to do it step by step:
A step by step guide to fixing "your system is running on low graphics"
When you turn off your computer, reboot and hold these three keys:
CTRL + ALT + F1
This will open the terminal where you can enter commands that I am going to show you below:
sudo apt-get update
Next enter the following command:
sudo apt-get -d install --reinstall gdm
Next enter the following command:
sudo apt-get remove --purge gdm
Next enter the following:
sudo apt-get install gdm
Almost done; When asked to choose, please select GDM and then finally:
sudo reboot
That is all you need to solve this problem!
Ok. Let me try to help you :D
-Go to Recovery mode
-Enable network (so you have internet connection)
-Go to Root option (Recovery mode)
-When you are in terminal delete lightdm type without brackets {sudo apt-get remove --purge lightdm}
-Then type without brackets {sudo apt-get install lightdm} (wait to install it)
-Then type without brackets {sudo service lighdm start}
-When it's finished type exit (you will get back to Recovery console)
-Then go on third option dpkg (Repair broken packages)(confirm with Y)
-When it's finished with installing packages type without brackets {sudo reboot}
-After reboot you will have back your Ubuntu! :D
I solve this problem after 1 day... Im a new user :D
Almost forgot i have Ati Radeon HD6770 graphic card, if you have Nvidia try it... Hope this was helpful!
Another possible issue could be installing new programs in bin. I am not sure if that what is causing you the problem but I faced this issue because of the same issue. If I understand correctly, bin is supposed to contain only executables. By mistake I moved a whole big program to bin and when I restarted the system, I saw this error. A simple solution that I found is the following. Say you have moved the big folder ABC to bin.
Start terminal by typing Ctrl+Alt+F1 and login with your username and password.
Login to root by typing
sudo su
and providing password.
go to bin by typing
/usr/bin
type
ls -lrt
This last command will show all the files chronologically. See last few of them. One of those, say ABC, must be the one that moved by mistake to bin.
Remove that by typing
rm -r ABC
and then restart by
sudo reboot
And you get your graphics back!
You can try and turn off the switchable graphics in the BIOS:
after that, it will be possible to use the Intel video card only with proper drivers on Ubuntu.
Here is the source: http://thegeekyland.blogspot.com/2014/07/ubuntu-1404-lenovo-g510.html
In any ubuntu OS version 12.04,14.04 configured with the old graphic card ATI/RS690
change the setting as below
etc/default/grub/
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset "
sudo update-grub
Restart

apt-get auto prompt disappears after kernel upgrade

I've got some problem about bash.
Before today, my VPS (Ubuntu 12.04 LTS) was using kernel 2.x. (Because it was upgraded from 11.04 and the boot options did not get updated.)
Today I want to use kernel 3.2 as the default kernel.
After modifying the grub config, I've successfully booted the VPS up in kernel 3.2. Using uname -r will show 3.2.0-24-generic instead of 2.x.y-z-generic now.
However, something wonky happened and I don't why.
Before the kernel change, if I type some unkown command, the shell will prompt me to use apt-get to install it. For example, I don't have bind9 installed, and when I try to run named, I will be prompted like this:
wzyboy#vermilion:~$ named
The program 'named' is currently not installed. You can install it by typing:
sudo apt-get install bind9
Sometimes when I make a typo, I will be corrected ("did you mean"):
wzyboy#vermilion:~$ namedd
No command 'namedd' found, did you mean:
Command 'named' from package 'bind9' (main)
namedd: command not found
However, after the kernel change, when I try to run named, the shell simply says:
wzyboy#natatio:/$ named
-bash: named: command not found
I think it may be something wrong with bash, but I don't know how to fix the problem. Can anybody help?
[SOLVED] Thanks! After installing command-not-found package, the problem is solved. However, I still don't why the package got lost after changing the kernel...
To enable those auto suggestions you need to ensure that you have command-not-found installed. It is usually automatically enabled via /etc/bash.bashrc if installed correctly.

Resources