LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-21-2011, 11:28 PM   #1
beowulfnode
Member
 
Registered: Jun 2007
Distribution: debian, ubuntu, centos, esxi
Posts: 39

Rep: Reputation: 4
Question howto absolute minimal install


anyone know how to install with debian or ubuntu only enough to be able to
  • start up
  • obtain an ipv4 dhcp lease
  • log in as root (so you don't need the sudo package) from the console
  • run aptitude and install packages from the net
  • and so that you can edit /etc files a text editor such as vim/whatever
  • have the commands cd and ls available as well
  • shutdown and restart
and that's it, NOTHING else.

I know there are other distros out there like DSL that have a much smaller footprint than ubuntu or debian but for my own personal preferences I'd like to do this with debian or ubuntu.

In a vmware virtual machine with a single drive (no raid) with 1 nic and 256mb ram (installer falls back to text mode) I've tried
  1. going through the Ubuntu Server 10.10 amd64 installer and selecting no tasks to install (not even standard system)
  2. then made a root user password 'cause the installer didn't allow me to set one
  3. logged in as root
  4. ran aptitude
  5. set everything to auto installed (pick a top level category and press M to mark the entire thing as auto)
  6. then changed the following to manually installed:
    • aptitude
    • apt-transport-https
    • dhcp3-client
    • vim-common
  7. told aptitude to go and apply the changes
  8. quit aptitude and ran
    Code:
    aptitude clean
it still left over 170 packages installed at over 750MB of used disk space

I then tried manually specifying packages to remove and some of them could be removed without it breaking other stuff. So why doesn't marking a package as auto installed only uninstall some packages that aren't needed by anything else and other packages that aren't needed by anything else are left installed still?

How do you get it to uninstall the un-needed packages that are already marked as auto installed that are not dependencies for anything else or to uninstall a dependency circle that is not needed by anything else?

running the command
Code:
aptitude search '?installed?not(?automatic)'
only shows the above listed packages
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-22-2011, 12:53 AM   #2
brian-va
Member
 
Registered: Dec 2009
Distribution: Debian
Posts: 46

Rep: Reputation: Disabled
Use the debian stable netinstall iso and at the software selection part select only the standard option (might be base, dont remember exactly). Cant get much more minimal than that without rolling your own.
 
Old 04-22-2011, 03:31 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you want a real minimal Debian system (don't know if this works with Ubuntu) do the following (in this example for Squeeze 32 bit):
1. Start your system from a Debian live-CD.
2. Mount your /-partition, for example:
Code:
mount /dev/sda1 /mnt
3. Install a minimal system to this partition with debootstrap:
Code:
debootstrap --variant=minbase squeeze /mnt
This will install only the really essential packages and apt (Note: apt is not essential, because you can install packages with dpkg).
4. Copy over your network settings (I think you need at least the /etc/resolv.conf) to /mnt/etc and chroot into the new system:
Code:
cp /etc/resolv.conf /mnt/etc/
chroot /mnt
5. Now install the packages needed for the system to start, like a kernel and a bootloader:
Code:
apt-get install linux-image-2.6-686 grub-pc
6. Now you need to configure your new system, at least the /etc/fstab. For this we should install a text-editor. While doing this we can also install the other software you need, like aptitude:
Code:
apt-get install vim aptitude
7. Now configure the system to your likings. Don't forget to set a password for root before rebooting.

This way you will get the smallest possible Debian system.

EDIT:I forgot about that, you will have to write a /etc/apt/sources.list file in your new system before you can install anything on it. I also would recommend to have a /etc/apt/apt.conf with this content:
Code:
APT::Install-Recommends "0";
APT::Install-Suggests "0";
This way apt-get/aptitude will not pull in recommended or suggested packages when installing software, but only really needed dependencies.

Last edited by TobiSGD; 04-22-2011 at 05:07 AM.
 
2 members found this post helpful.
Old 04-22-2011, 04:30 AM   #4
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Thanks for that post TobiSGD. I never thought about a doing minimal Debian like that.

@ beowulfnode, if I may add to TobiSGD's post a little. With Debian Squeeze now being free of non-free components you may need to look very carefully at your hardware to make sure it is compatible with a totally minimal install. If it is not you will probably need to have non-free packages (specifically firmware) on a flashdrive so you can install whatever is needed for your network to work as it should for later package installs.

Brian-va's post is also how I would have initially gone about it, or maybe the actual mini install CD, until I read Tobi's post. Although again you may need the non-free firmware so you may want to get a copy of the non-free netinst CD with all the non-free firmware available.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
absolute minimal graphical environment cccc Debian 4 02-08-2011 08:43 PM
Slack minimal install - HowTo Slax-Dude Slackware 16 09-06-2010 10:20 AM
how to install .exe files on absolute Ziegn Linux - Newbie 4 02-03-2010 02:43 PM
See my minimal install HOWTO gnashley Slackware 14 02-01-2008 06:24 PM
LXer: Absolute Linux is an absolute winner LXer Syndicated Linux News 0 08-07-2007 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration