Ubuntu Server 10.4 restarts on login after installing desktop

Asked by Tyler Zang

Ok I just started with ubuntu so I am as new as it gets. I installed Ubuntu server 10.4 i believe it is.. and i logged into the command line and thats great.

 I ran [sudo apt-get update] (minus the []... just put those in to seperate code)and it updated without any errors this time. I ran [sudo apt-get install ubuntu-desktop]. That took forever and came up with errors (which i unfort. did not write down). I then ran [sudo apt-get install ubuntu-desktop --fix-missing] and it seemed to complete. Next I ran [sudo apt-get install gdm] and it ran. Next I did [sudo /etc/init.d/gdm start] and it started up a GUI.

Now when i log in, it just freezes. So i restart my virtualbox and now when i log in, it instantly restarts the Virtual ware. My class mates have the same issue. I am using Oracle Virtual Box and they are using VMware. Any ideas of how to fix this?

I run this at home on my MAC/parallels and it goes fine. I am attempting to use kubuntu-desktop atm.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gdm Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Theodotos Andreou (theodotos) said :
#1

Probably there are missing packages. If you want GUI it is better to install the full desktop like this:

  sudo apt-get install ubuntu-desktop

or run the "tasksel" TUI and select it from there.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

Since you're doing this in a virtual machine for a class, can you just start over? Then you can obtain the exact error messages, which should make it possible to address the problem.

There are two reasonable ways for you to record the output of your commands. One is to use the program called script (which you can get information about by running "man script", without the quotes). The simplest usage is to run "script" with no arguments, which launches a new shell in which everything you do is recorded to a file called "typescript". To quit script, quit the shell (by running the command "exit"). If you want the file to be called something other than "typescript" then run "script <filename>" instead of "script", where <filename> is the filename you want.

The other way is to put "2&>1 | tee -a <filename>" after each of your commands, where <filename> is the filename you want. The advantage is that you can cause each command to output to a different file, if you want. The disadvantage is that you have to actually bother entering that after each command. (Run "man tee" for more information on that.)

Recording output in one of these ways, I recommend installing Ubuntu Server, and then running (and capturing the output of) these commands, in this order:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

The first command makes sure you're installing or upgrading to the latest software. The second command upgrades what you have already--this can pretty much only help, and perhaps it will reveal that your problem is with software that you already had installed (some of it might have to be upgraded to install ubuntu-desktop). The third command installs ubuntu-desktop.

By the way, if you installed ubuntu-desktop, that installs gdm. If ubuntu-desktop installed without gdm, then there were very major problems in the installation of ubuntu-desktop (and those error messages, assuming the problem occurs again, should be highly informative).

Finally...why do you want a GUI on your Ubuntu Server installation? If you want a server system, you can do all the administration with command-line tools. Canonical recommends against installing a GUI on Ubuntu Server systems (though doing so is supported and should work), because then you have more software installed with more potential vulnerabilities and a correspondingly greater attack surface (that is, people seeking to compromise your security have many more options for doing so, the more unnecessary software you have installed...especially for software that runs all the time, and some of which runs all the time as root).

On the other hand, if you want a desktop system, you should install Ubuntu Desktop Edition (or Ubuntu Netbook Edition, or one of the other flavors of ubuntu like Kubuntu or Xubuntu). If you want a desktop system that just runs a few servers, then you can install and use the servers on Ubuntu Desktop Edition (or any of those other flavors of Ubuntu).

Applications where you would benefit from the alternative kernel configuration in Ubuntu Server typically are also applications where a larger attack surface would be a serious consideration. My intention is not to be judgmental, but installing the ubuntu-desktop package on an Ubuntu server system often, though not always, indicates a lack of good judgment on the part of the system administrator.

Revision history for this message
Tyler Zang (tsrtyler) said :
#3

Thanks for the fast input. I will try these options at class tomorrow
morning. To answer some of your questions Eliah, firstly, I tried re
installing it 4 times but the same exact thing was happening. I will get
the errors if it happens again tomorrow.

I did run those commands in that order, minus the upgrade. Maybe that
was the issue.

The reason I want to install the GUI is simply just for class. We will
run the command line mostly, but for class, and my first time using it,
I want to see it and learn a little about it. I rather do command line,
but we are going to go over the GUI just to cover it in case we do see
this in the field. I assume its the same as the desktop GUI?

I will post tomorrow at school with and errors or if it worked. Thanks
again both of you for the input.

On 1/22/2011 12:59 AM, Eliah Kagan wrote:
> Eliah Kagan

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

Yes, it will be the same as the GUI in Ubuntu Desktop Edition. That's what the ubuntu-desktop package provides. Likewise, you can get the Ubuntu Netbook Edition GUI by installing ubuntu-netbook, the Kubuntu GUI by installing kubuntu-desktop, the Xubuntu GUI by installing xubuntu-desktop, the Edubuntu GUI by installing edubuntu-desktop, and the Lubuntu GUI by installing lubuntu-desktop. You have also have two or more (even all) of those packages installed; then you can select what kind of desktop session you want, as you are logging in.

If the class is specifically teaching the Ubuntu GUI, then ubuntu-desktop is the one you want. It's a GNOME desktop which uses the GNOME Shell. The others will not provide an environment similar to what they would be teaching.

I understand why you want to have a GUI. But why do you want Ubuntu Server Edition, rather than Ubuntu Desktop Edition? Ubuntu Desktop Edition has just as fully functional of a command-line interface as Ubuntu Server Edition.

Revision history for this message
Tyler Zang (tsrtyler) said :
#5

Ran $sudo apt-get update
No errors

Ran $sudo apt-get upgrade
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4.5_i386.deb Hash Sum mismatch
E: unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Ran $sudo apt-get upgrade --fix-missing
no errors

Ran $sudo apt-get update
no errors

Ran $sudo apt-get install ubuntu-desktop
Err http://us.archive.ubuntu/ lucid-updates/main gnome-panel-data 1:2.30.2-0ubuntu0.2
 Bad header line [IP:91.1189.88.31 80]

I am running desktop now since server failed on me and thats fine. Just trying to see if theres still a fix. The book I have also has some..wrong commands in it lol.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

I wonder if perhaps the installation CD image you were using to install Ubuntu Server Edition on your virtual machine was corrupted. Did you verify its md5sum? (In the unlikely but possible event that you were actually installing Ubuntu Server Edition on your virtual machine from a physical CD or DVD, did you verify the disc itself?)

Or the problem might be the result of a problem communicating with the server us.archive.ubuntu.com, or with a problem on that server itself. If that is the case, then a possible workaround would be to edit /etc/apt/sources.list to use a different mirror instead. You could use the command "sudo cp /etc/apt/sources.list /etc/apt/sources.list.old; sudo nano -w /etc/apt/sources.list" to back up the file and begin editing it in a simple full-screen console text editor. Alternative mirrors for Ubuntu software archives are listed at https://launchpad.net/ubuntu/+archivemirrors.

Alternatively, if the problem were only with that one file, then you could manually download the .deb package from launchpad.net and install it with dpkg. (Ironically dpkg itself happens to be the package that it can't upgrade, but that should not present any special problems.) Launchpad uses https, so verifying a hash (as is done when you run apt-get) would not be necessary; https provides a high degree of both authenticity assurance and error detection, since all content from the server is digitally signed. Launchpad lists the available .deb files for the package dpkg at https://launchpad.net/ubuntu/+source/dpkg. Assuming you start out in some directory where you have write access, the following pair of commands should download and manually install that package (which will then be automatically upgraded when the next version becomes available through any of your repositories...assuming that whatever problem prevented you from installing it with apt-get in the first place doesn't rear its ugly head again for later versions):

wget https://launchpad.net/ubuntu/+archive/primary/+files/dpkg_1.15.5.6ubuntu4_i386.deb
sudo dpkg install dpkg_1.15.5.6ubuntu4_i386.deb

If your virtual machine has a 64-bit processor and runs the 64-bit version of Lucid, then replace "i386" in each of those commands with "amd64".

If you end up going back to Ubuntu Server and trying those solutions, and they are unsuccessful, and you want additional assistance, then please paste the *complete* output of the commands

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

including output that is not indicative of errors. In addition, please also paste the complete output of the commands

cat /etc/apt/sources.list.old
cat /etc/apt/sources.list
ls -l /etc/sources.list.d

and please also double-check to make sure that the lines

Err http://us.archive.ubuntu/ lucid-updates/main gnome-panel-data 1:2.30.2-0ubuntu0.2
 Bad header line [IP:91.1189.88.31 80]

are exactly what you saw (since it is significant if the .com after us.archive.ubuntu is missing, and also IPv4 addresses cannot contain octets that are four decimal digits wide).

Please note that, if you want to just keep using your Ubuntu Desktop Edition system, and don't want to go back to working on getting Ubuntu Server to work for your needs, then there is no need for you to run any of those commands, nor any need to answer any of those questions.

If you are confident that some of the commands in your book are wrong, I would encourage you to contact the author(s) and/or publisher. If you think they're wrong but are not sure, please feel free to post here about them. (If they're related to this issue, you could post them in this question; if they are unrelated, you'd probably get better results by starting a new question.)

Can you help with this problem?

Provide an answer of your own, or ask Tyler Zang for more information if necessary.

To post a message you must log in.