Open Source · TechIt

Change an Ubuntu Desktop installation to an Ubuntu Server installation

For a Gnu/Linux install recently I had a CD with Ubuntu – but it was the desktop edition.

I had an old PC for this install, and I really needed the CD with the ubuntu-server install set by default.

What to do ?

As it turns out, it’s actually quite easy to switch over from the desktop install to the server, and vice versa.

So, after installing from the desktop CD, Ubuntu Gnu/Linux is set up with the alias package ubuntu-desktop which (for v 12.04 at least) gives us the gnome desktop, libre-office and a host of other stuff.

To remove the desktop bits, you can try to figure out what was installed, and do a

sudo apt-get remove packagex packagey packagez

to get rid of them, but I found this alternative using tasksel that bit more elegant and time friendly :

# ubuntu desktop -> server

sudo apt-get install tasksel
sudo tasksel remove ubuntu-desktop
# optional # sudo tasksel install server # or ubuntu-server ??
# read somewhere online that there's no difference from server and 
# desktop kernels anymore, but did this anyway
sudo apt-get install linux-server linux-image-server

That was it!

Advertisements

7 thoughts on “Change an Ubuntu Desktop installation to an Ubuntu Server installation

    1. Intresting q.

      I guess the easy answer is “burn it to a disk – cd or DVD”.

      But if you have time/interest I would guess you could boot from any Linux cd/DVD/USB and mount the ISO (as a loop back device?) and continue booting?

      If you have a VM app (qemu, virtual box, VMware, etc) you could boot the ISO there, and if you can access the raw disk there may be an install possibility?

      Would be interested to know how it goes – if you get it working would you link back here?

      Don’t fry your current install!!

  1. Ah ok, yea apt normally uses remote repositories.

    I think it may be possible to configure apt to use a cd as a source (as a secondary or instead).

    Whether you can use the ISO directly in apt or if you could mount it like a cd and then use it in apt I don’t know.

    There is an apt config file somewhere on the system, and on the desktop version there may be a UI interface (configure software sources in the admin/settings menu?)

  2. Ok i found ex.cdrom driver i will burn image to cd than i will try .System is fried now, i am restoring with cllone zilla 🙂 then i will try cd and UI interface under setting somethnigs like that.

  3. I am trying first command then following message coming

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package packagex
    E: Unable to locate package packagey
    E: Unable to locate package packagez

    Do you know solution?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s