Wednesday, 26 January 2011

Debian 6 Minimal installation with Fluxbox

After testing a large number of Linux distros in my search for one suited to my minimalistic requirements, I found that Debian is amongst the quickest and most stable distros available.

It definitely outperforms Ubuntu in both those areas and comes with one of the smallest sized installation media I have yet encountered at 45mb.

So this tutorial is to install, using a minimal businesscard or netinst cd, a fast rock solid stable Linux system with no bloat and have it extremely well suited to customisation. Just follow the step by step instructions below to get up and running.
First download the install media.



 Get the businesscard iso at around 45MB approx, I use the 32bit businesscard version, it has all you need to install over an internet connection. Unlike Microsoft products, many Linux distros will detect ram over 4GB in 32bit guise, so all your programs will work properly.

1. Boot from it and select Advanced options>Expert install.

2. At the install screen go through the various early options until you get to the partition part (it's very straightforward , keyboard layout etc). Go through the standard network detection procedure (eth0. wlan0). Any failure to detect and configure your network will abort the installation.

3. Select manual partition, organise your partitions, minimally having a swap and boot. So choose mnt points swap and root at minimum unless you require more.

For home use the above should be fine, for servers etc then you will probably know what you need.

More info here http://www.linuxquestions.org/questions/linux-distributions-5/recommended-partition-size-522034/

4. Finish partitioning and install the system.

5. Select 'use non-free software' at the appropriate screen' as well as the 'bigmem' kernel if you have over 4GB ram.

6. At software selection DONT install anything, deselect everything, especially desktop enviroment and basic linux system).

7. Select Grub2. There are other screens but as long as you don't select anything out of the ordinary you will be fine. Do not allow login as root(see steps 10 & 11 below) just set up your user name and password.

8. Click finish installation.

9. Boot up your system and log in with your user name and password. At the prompt.

10. Type  sudo visudo     this will bring up the nano editor with the 'sudoers' file to edit.

11. Scroll down and starting from BOTTOM - Delete all entries (they are mostly commented out) until you get to the root one (KEEP THAT)  + add the following under the root one:-

  "username"  ALL=(root) NOPASSWD: ALL

"username" being  your  username in lowercase without the quotes.

12. Exit and save (Ctl+x, then y, then  enter) Done. You can now use sudo without needing to enter your password all the time.

13. THEN type: sudo apt-get install xserver-xorg xinit rxvt fluxbox thunar thunar-volman smplayer alsa-utils synaptic gdebi gedit ntfs-3g    + enter.

(Minimum utilities required for a basic desktop with Fluxbox, you can add packages here as required).

A large list of packages will show in the terminal, just 'Y' and continue.

14 Finally  type:  startx     to start your desktop.

You should now have a desktop visible using Fluxbox,with available media player,terminal,file manager etc, you will use startx every time unless you also install a login manager. I just type startx at every login.

Fluxbox has various styles available which are customisable via the config files in  /usr/share/fluxbox/styles

FIND your terminal (Fluxbox is a right click on desktop and select from options, I use rxvt) and open it.

(If you have forgotten to install a terminal now is a good time to do it, but you will have to close xorg with Ctrl+Alt+F4, then log on and sudo apt-get install whatever terminal you want.)

First thing with the new install is to make sure your basic hardware is working as there is no point going further if its not. You know the network is fine so it will probably be just the sound to check.

Type sudo alsactl init  (alsaconf if using Lenny)  configure your sound and maybe load a video file to check it with the media player, make sure you have the video/audio decoder for it, which may entail installing extra packages here such as w32codecs, libdvdcss2 and others, Type alsamixer to adjust levels.

      From here you have a fast configurable system.You can use the fluxbox keyboard shortcuts, just open thunar and go to the views menu, click 'show hidden files', in the .fluxbox folder open the keys file and enter at the top 

F1 : ExecCommand thunar      then copy/paste up to 12 times

Alter the other entries to suit, such as 

F2 : ExecCommand rxvt 
F4 : ExecCommand eclipse 
F6 : ExecCommand gedit 
F8 : ExecCommand firefox 
F9 : ExecCommand google-chrome

as a few examples.

You can also use a path like /usr/bin/prog_name instead of thunar in the example above. So you can have all your basic items at the press of a function key.(Don't forget to restart fluxbox after adding items to the keys file - right click desktop and select 'restart')

          You can now just hit F1 thunar F2 rxvt F3 komodo F4 eclipse F6 gedit F9 google-chrome as an example of my shortcuts above
          You can also add shortcuts via symlink to the Desktop folder in the home directory.

$cd Desktop 

$sudo ln-s  /usr/bin/<prog>)

Assuming your sound/media is working then you can continue. 
       
Change your /etc/apt/sources.list to include whatever you want (backports,non stable etc)

         So you now have a nice fast Debian desktop which you can customise from the vast Debian and Ubuntu repos. (Also RPM and Slack packages if necessary using alien)

(There is a small bug with Synaptics/Gdebi and the password but you can use Alt+F2 and type 'sudo synaptic' or 'sudo gdebi-gtk')

You can also use alternative Desktops such as KDE and others, just replace Fluxbox and Thunar with

$kde-plasma-desktop

   If you want to build your own little OS and you are not a super experienced user then you'd be hard pressed to find a better starting point than the Debian minimal install. From here as described above you can add functionality as you require.

 Various other distros such as Mandriva, Ubuntu, Fedora, OpenSuse, Mint and many others usually come pre-packaged with a lot of stuff you might not need (Gnome, KDE, etc) and their minimal install media is obscure or simply does not work very well.
          With the Debian minimal install you are free to choose EXACTLY what goes on your system and it is a breeze to set up.

You can achieve similar wih an RPM Distro using the Centos 6 minimal installation tutorial     

         More info from the link below.

http://www.linuxtopia.org/online_books/linux_for_beginners_index.html










   

No comments:

Post a Comment