Friday, December 23, 2016

Is it possible that I have more than one Linux kernel installed?


I was reading this. It's about detecting installed kernels. KERNELS???!! Is it possible that I have more than a kernel?? How is that??!!!!!


...so I followed the command in the instructions and this is my output:


username@hostname:~$ dpkg --list | grep linux-image
rc linux-image-3.11.0-12-generic 3.11.0-12.19 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
ii linux-image-3.11.0-13-generic 3.11.0-13.20 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
ii linux-image-3.11.0-14-generic 3.11.0-14.21 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
ii linux-image-3.11.0-15-generic 3.11.0-15.25 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
ii linux-image-3.11.0-17-generic 3.11.0-17.31 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
ii linux-image-3.11.0-18-generic 3.11.0-18.32 i386 Linux kernel image for version 3.11.0 on 32 bit x86 SMP
rc linux-image-3.8.0-19-generic 3.8.0-19.30 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-3.8.0-25-generic 3.8.0-25.37 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-3.8.0-26-generic 3.8.0-26.38 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-3.8.0-27-generic 3.8.0-27.40 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-3.8.0-30-generic 3.8.0-30.44 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii linux-image-3.8.0-31-generic 3.8.0-31.46 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-extra-3.11.0-12-generic 3.11.0-12.19 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
ii linux-image-extra-3.11.0-13-generic 3.11.0-13.20 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
ii linux-image-extra-3.11.0-14-generic 3.11.0-14.21 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
ii linux-image-extra-3.11.0-15-generic 3.11.0-15.25 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
ii linux-image-extra-3.11.0-17-generic 3.11.0-17.31 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
ii linux-image-extra-3.11.0-18-generic 3.11.0-18.32 i386 Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP
rc linux-image-extra-3.8.0-19-generic 3.8.0-19.30 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-extra-3.8.0-25-generic 3.8.0-25.37 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-extra-3.8.0-26-generic 3.8.0-26.38 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-extra-3.8.0-27-generic 3.8.0-27.40 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc linux-image-extra-3.8.0-30-generic 3.8.0-30.44 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii linux-image-extra-3.8.0-31-generic 3.8.0-31.46 i386 Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii linux-image-generic 3.11.0.18.19 i386 Generic Linux kernel image
username@hostname:~$

Woah! Hold on a second!! So those things are kernels???!! And I had all that in my system and I didn't know??! I didn't install anything!! Or maybe it's the update manager that did this? ... ... ...If it's true then do I need all this?? If no then it should be taking up lots of space of my drive!! And then how do I clean up??


Please explain as much details as possible! It seems that there's a lot that I don't understand!



The kernel can be updated during a normal update. All the kernels remain on the hard disk and should be able to be booted from the grub menu presented at boot time. I keep the old kernels, there is no harm in doing so.


Thursday, December 22, 2016

Xubuntu 16.04 LTS - lightdm stops


I am a Newbie, so pls apologize, when I do not enter all required information the first time. Pls comment, what is missing and I will bring the information ...
Thank you!


I wanted to have a remote control to a xubuntu 16.04 server. The Clients should run on Windows.
So, on the server a clean Xubuntu was installed and also VNCServer. I accidentally installed also gdm3, but I already could remove it, It was also not working. The connection from a Windows PC worked perfect for around 5-6 times. Then the Xubuntu server did strange things after reboot.


In general,as far as I can over see it
I have a lightdm problem on a Xubuntu 16.04 LTS with GNU/linux 4.4.0-47-generic x86_64. It does not show any logon screen.
Lightdm trys to start session and session and session (sometimes 14, sometimes 17), but every lightdm starting is stopped before the next lightdm session is started.


For me it seems like the Xserver does not want to communicate. This is what I've done in recovery Mode:
I have a SSD in the server,
In /etc/init/lightdm.conf before
EXEC lightdm
I entered


Sleep 10

In the lightdm log there is the following line, which brought me on the trace of Xserver:


Caught terminated signal, shutting down

So, I changed a bit in the system to start in terminal mode,
In the default grub file I changed


GRUB_CMDLINE_LINUX_DEFAULT="TEXT"

In the terminal I did
systemctl enable multi-user.target --force and systemctl set-default multi-user.target


Terminal mode works fine, but I can not start the Xubuntu-desktop.


When I enter sudo apt-get -f install it says, everything fine.


How can I check, if the Xserver is running fine?


Any other ideas?
Is there a dependency between the Client opening sessions and the sessions Xubuntu wants to start during start up? If yes, can I just stop or clean?


Many thx in advance!


Regards highway


Edit:
Hello all,
I just want to mention, what I found out: The xserver-xorg pkg was not properly installed. I fixed that, but it is still not working.
I just realized thatsince I did an upgrade, I have two Kernels installed and found a Bug on them. I corrected that, link follows to the bug report.
My next guess is, that due to the bug all installed users lost their desktop-authority ... I do not know how this is called exactly.
What I want to do next is to compare the user-account on a fresh xubuntu installation, with the one not running.
I will update next time on Monday.


Regards Highway



I managed the following things to work properly:
When booting right into terminal, startx starts the Desktop.
When desktop is started, VNC-client sees a terminal.


When booting into Desktop mode, I get the known error of fchdsk
Startup problem in 16.04?
--> I have to check this at next, I just wanted to update my Question.


What I've done so far:
Reinstalling xubuntu-desktop
Reinstalling xserver-xorg and xserver-xorg-video-intel
Adding a new user account, the old is some how broken after the Update(s).


For the other problems, I open up a new Question ...


Regards!


EDIT:
Pls close the question! THX!!


18.04 - apt upgrade does not see apt-offline packages


I'm trying to update my Ubuntu 18.04 computer that does not have internet connection. However the process is failing when I try to run sudo apt upgrade. I have checked a couple of other links like: sol1, sol2 and sol3.


I have set up apt-offline on my offline computer we can call OC1, and I have also set it up on my online computer we can call OC2. I set up a signature file on my OC1, I then bring the file over to OC2, and use the command sudo apt-offline get apt-offline.sig --bundle apt-offline-update.zip. It downloads all the packages to that zip file and I then bring that file over to OC1.


Great at this point everything is normal and running as I expect it to. Now I install the package with this command: sudo ./apt-offline install /home/fletchy/Desktop/MyPC/apt-offline-update.zip I select Yes (Y) when prompted to install and it installs the packages. However it just syncs them all. However I suppose that make sense because now I would just do a normal sudo apt upgrade and I'll update and I'll be good to go. However, when I run sudo apt upgrade it runs as if its looking at the internet to install these packages not my cache or directories.


I get errors like:


Err:## http://... Could not resolve 'us.archive.ubuntu.com'

E: Failed to fetch http....deb Could not resolve 'us.archive.ubuntu.com'

What I would expect to get is a successful install of the packages and update of the system. Perhaps I'm missing something small, I've used Linux for awhile now but never had to update packages offline until recently and I'm encountering this problem. I've attempted to reboot the system, and restart the entire update process from scratch.


Edit 1:


I just noticed that when I run apt-cache show I get the following response:
E: No packages found



I have found a solution, there may be a better one but this worked for me...


Part 1


Instead of doing: sudo apt upgrade by itself you have to use the tag --fix-missing and it will fail at first but then discover all the packages you set up using the normal method of apt-offline and it will update as expected.


Short story use this command: sudo apt upgrade --fix-missing


Part 2


Now if your trying to install packages/products/modules so things like net-tools for example... you do everything the same except...


Dont use: sudo apt upgrade --fix-missing, use: sudo apt-get install net-tools


gui - How do I disable X after boot?

I was reading "How do I disable X at boot time so that the system boots in text mode?" and will be implementing this. I see in the answer that there is a simple way to start the GUI but don't see how I would turn it back off after doing what I needed with out shutting down the computer. So how do I turn off X but keep the system running as normal and not shutting down?

dual boot - Cannot access windows partition from ubuntu


Upon clicking the windows partition in nautilus, i get this error thrown at me.


Error mounting /dev/sda4 at /media/zalgo/D8649C54649C36EA: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda4" "/media/zalgo/D8649C54649C36EA"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).Metadata kept in Windows cache, refused to mount.Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

I do not have fast boot or hibernation enabled on windows, if there are any commands that i should post the output of to help, please comment that.


This is not a duplicate of How can I access windows 10 partition in ubuntu when i cant get it to shut down in a "safe state"?, as the solution used there does not work here.



The solution I found that worked was a program called ntfsfix.


Install ntfs-3g with:


sudo apt-get install ntfs-3g

Then run the ntfsfix command on your NTFS partition.


For example:


ntfsfix /dev/sda4

partitioning - Steps to partition hard disk while installing ubuntu 14.04



I'm using windows 8 in my lap and I wanna install ubuntu without deleting my windows. I had three drives in my hard disk out of which I managed to create a new empty drive of 50 GB using windows disk partition to install ubuntu on it. This new drive is formatted in NTFS format and is available to use in windows as other drives.



I floated across the question & answer in which there are two things.



1) Installing ubuntu on empty hard drive (which I do not need)



2) Installing ubuntu on windows installed hard disk (which I'm supposed to see)




In the second case, step 4 is 'freeing some space for ubuntu'. But I have already alloted a new drive of 50 GB in which I gotta install ubuntu.



But however, I do not see the free space as shown in this image and I'm forced to free some space.



So should I proceed to free some space as usual or do something else to install on that drive ?



You should proceed to delete your 50GB NTFS formatted drive (from the Ubuntu installation wizard) this will mark it as free space. After that you'll need to create a partition for your Ubuntu installation and a partition for the swap in this free space.



Note: Ubuntu cannot be installed on NTFS, you can use ext4 instead.



gparted - can I increase root and other disk's size without formatting it



enter image description herewant to shrink home ie sda5 and expand root ie sda3



Device        Start       End   Sectors   Size Type
/dev/sda1 2048 20469759 20467712 9.8G Linux swap
/dev/sda2 20469760 28469247 7999488 3.8G BIOS boot
/dev/sda3 28469248 48939007 20469760 9.8G Linux filesystem

/dev/sda4 48939008 49133567 194560 95M EFI System
/dev/sda5 49133568 976771071 927637504 442.3G Linux filesystem


New partition



Device Start End Sectors Size Type
/dev/sda1 2048 20469759 20467712 9.8G Linux swap
/dev/sda2 20469760 28469247 7999488 3.8G BIOS boot
/dev/sda3 28469248 79622143 51152896 24.4G Linux filesystem

/dev/sda4 79622144 80670719 1048576 512M EFI System
/dev/sda5 80670720 976773119 896102400 427.3G Linux filesystem



Yes, you can do this, but it's a little more complicated.



You MUST boot from some other medium (Live USB, Live CD, network boot from your local network, ...) and run gparted. /dev/sda? MUST NOT be mounted during this process. You should have reliable power, and not be running on battery.



"Free Space" (which you will create by shrinking /dev/sda5) can only be added to adjacent partitions, so you will have to move partitions around.



All of this is from within gparted:




Select /dev/sda5.



Menu->Partition->Move/Resize will bring up a window like thisexample of gparted resize/move



When you set the new partition size, be sure to have all of your free space in Free space preceeding.



This will create Free space between /dev/sda4 and /dev/sda5.



Select /dev/sda4 and Menu->Partition->Move/Resize.




Then, move /dev/sda4 to the other side of the "Free space" by clicking on the up-arrow in "Free space preceeding".



Finally, select /dev/sda3, Menu->Partition->Move/Resize and
adjust the "New size".



Examine the list of pending operations, double-checking for misexpressed intent. Fix as needed. When there's a match between what you want to do and what gparted is going to do, click the checkmark and stand back.


11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...