Posts tagged ‘tutorial’

[example] Compiling a custom kernel in ubuntu

Please read the tag! This is not a guide or tutorial or a howto! This is just an example to give you an idea , this is just my procedure which changes everytime with a new kernel! So do not follow this blindly!

What I did was used my Debain Sid as Host and installed ubuntu Jaunty [9.04] using virtualbox-ose. Now time for fun! 😀

Downloaded the latest kernel from

Opened a terminal and extracted the kernel .bz2 file:

$ sudo tar -xvjf ~/Desktop/linux- -C /usr/src

$ cd /usr/src/linux-

Now that we are in, there’s no getting out! 😉

So I typed in

$ sudo apt-get update && sudo apt-get install build-essential fakeroot libncurses5 makedumpfile gcc && sudo apt-get build-dep linux

Now wait a while lotsa commands in a single line whooo!

Done? Mkay, so let’s continue:

$ sudo make mrproper

$ sudo make menuconfig

Choose whatever you require, I tweak a lot but you probably don’t need to, just go through each options and see what you need or don’t need.

Then for the big one [woooh! This is gonna take a while! Took me an hour or so in virtualbox 😦 ]

$ sudo make

Click to enlarge

Click to enlarge

Read more…


[howto] Write an Openbox Pipe Menu

Those of you are using openbox might wantto utilize your coding skills into creating somethings useful for your desktop. I’m making this guide with selected references from the official one at the OB3 wiki and also I ill share my own created pipemenu here so that it gives you an idea about how to create your own!

Pipe menus are dynamic menus, built on-the-fly from scripts. These are referred to as “Pipe menus” since the script’s output is piped back to Openbox and used for the menu. There are a number of pipe menus written by various people available through the Pipe menus page.

A pipe menu can be created by placing the following into a menu file, such as menu.xml:

<menu id="ID" label="TITLE" execute="COMMAND" />

Thereafter the pipe menu can be referenced just like any other menu.

Read more…

GRUB 2 [howto]

Click to enlarge

Click to enlarge


GRUB 2 is derived from PUPA which was a research project to investigate the next generation of GRUB. GRUB 2 has been rewritten from scratch to clean up everything for modularity and portability. A mailing list and a wiki have been setup for discussing the development of GRUB 2.

GRUB 2 targets at the following goals:

  • Scripting support, such as conditionals, loops, variables and functions.
  • Graphical interface.
  • Dynamic loading of modules in order to extend itself at the run time rather than at the build time.
  • Portability for various architectures.
  • Internationalization. This includes support for non-ASCII character code, message catalogs like gettext, fonts, graphics console, and so on.
  • Real memory management, to make GNU GRUB more extensible.
  • Modular, hierarchical, object-oriented framework for file systems, files, devices, drives, terminals, commands, partition tables and OS loaders.
  • Cross-platform installation which allows for installing GRUB from a different architecture.
  • Rescue mode saves unbootable cases. Stage 1.5 was eliminated.
  • Fix design mistakes in GRUB Legacy, which could not be solved for backward-compatibility, such as the way of numbering partitions.

Multiboot Specification

Multiboot Specification is a protocol between a boot loader and an OS kernel. Because this specification is generic, you can use the protocol in your own boot loader and/or in your own OS freely. Follow this link, for more details.

Howto Install Grub2 in Debian and Ubuntu?

Here goes.

First remove your grub.

apt-get remove grub

apt-get install grub2 grub2-splashimages

The new GRUB2 splash images are installed at:

# ls /usr/share/images/grub/

Once you’ve rebooted, your default grub will load up and it has a new option called ‘Chainload into Grub 2′.When you are satisfied that GRUB2 works then you can select the second option, “upgrade-from-grub-legacy

You change the grub images from:


# nano /etc/grub.d/05_debian_theme

and change the following line from:

for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga}
for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/Plasma-lamp.{png,tga} and save the file.

Reboot and enjoy!

Howto add “Windows Entry” in GRUB2 ?

Edit the /boot/grub/grub.cfg file!

# nano /boot/grub/grub.cfg

Add this at the end of your /boot/grub/grub.cfg

# (2) Windows XP
menuentry "Windows XP" {
set root=(hd0,1)
chainloader +1

With Windows Vista, via EasyBCD and NeoGRUB

Since EasyBCD's NeoGRUB currently can't understand the GRUB v2 menu format, chain-load to it by replacing the contents of your "C:\NST\menu.lst" file with lines similar to the following:

default 0
timeout 1
title       Chainload into GRUB v2
root        (hd0,1)
kernel      /boot/grub/core.img

Grub2 has a new concept of root partition detection.

Unlike previous version of GRUB, if your XP is in hd1 or sda1

then put hda1 and sda1 and not hd0 /sd0

Debian Unstable/Sid NetInst Guide

Note: This howto is not an official one! This procedure applied to me that doesn’t mean it applies to everyone else as well. Things could change anytime, things could break anytime. Why? Since we are going to use the “unstable” repository to upgrade our system and not the usual stable “lenny” [yes Debian 5.0 is the stable release at this point.] repository. A few FAQs before we proceed further:

Q: Is Debian reliable since you are saying it’s “unstable” ?

A: Unstable is a repository which is not that “unstable” as you might think. After being tested in the “testing” repo packages are sent here so they are quite stable enough. Things can break at some point but that has never happened with me or a few thousands and more users who use this repo parmanently! But then again, nothing is guranteed!

EDIT: ladoga’s comment for more clear info. I only used Debian for a few days to write this guide so I’m unaware of such details. Thanks for clarifying. 🙂

Q: Is Debian rolling release?

A: No it’s not. But I’m going to show you howto make it a rolling distro for you!

Q: How?

A: By using the sid repo you will always be up-to-date and hence it becomes a rolling distro since you can have the bleeding edge releases all the time without needing to reinstall every 6 months. [unlike ubuntu!]

Q: Is this guide for newbies?

A: Sure! I’ll make this fairly simple for them.

So now that the basic questions are answered let’s carry on with the guide!



You will need the latest Netinst image, grab it from here. Choose your proper architecture, I have a 64bit CPU hence I use amd64. Generally i386 image works for most people.

After you have downloaded the very small image [around 140Mb] it’s time to burn it using your favorite CD/DVD buring software. I’ll recommend using K3b, if you’re on Windows use cdrtfe.

After that’s done, make sure you have enough free space on your hard disk. If you’re gonna use it just for fun then please follow the official recommendation, but if you want to use it full time, I’d recommend around 15Gb for root and another 15Gb for extra mountpoints,e.g. /home

Now it’s time to insert the CD in your CD/DVD drive and restart your computer.

When the computer/laptop boots from the CD, choose the first option a.k.a “Install” and press enter. You will be presented with  blue screen and lots of options. Go ahead select your language, location,timezone,etc etc. you don’t need guidance in that! 😛

Now I suppose the partitioning option comes up? If you want to use the entire hard disk select accordingly, else choose manual and proceed. The dialogues are very simple and user-friendly, resize he partition as you want and mount an ext3 partition as / and choose to format it! The rest is upto you, if you would like a separate /home partition then select another partition and format it as ext3 and mount as /home .

Now when it starts checking your DHCP settings let it if you use DHCP, I don’t! Hence I just press enter to cancel and “manually configure my network” using the option named the same. Enter your IP,Gateway,DNS,Netmask, choose a Domain,etc etc.

Done? Good. Now it’s time to let it configure APT. What is APT? Read all about it here! Basically, you don’t have to do anything at this point let it just configure your mirror and download some basic required materials. [I hope you selected a mirror closer to your location?]

Now it will ask you to install package survey, do what you want, I just choose “no”, then it will ask you what to install Standard system and Desktop Environment are going to be selected by default, unselect them by using spacebar. Now it’s time to install Grub! Grub is GRand Unified Bootloader, it’s a GNU project, it is basically a Linux bootloader. If you have Windows or any other OS installed it will show you an option and ask you if it’s correct, if it is then let it install on MBR [Master Boot Record.] Now just let the install complete it will automatically spit out the CD, take it out and press enter. Time to boot into your debian!


Now that the 1st phase is complete, you must understand that we have to download a lot of stuffs since you chose not to install a standard system or a DE, I’m going to show you how to install the latest KDE4.3 ! Right now you have a very basic core system installed! After reboot you will be presented with a hideously ugly boot menu, do not worry we will soon transform that into a beautiful boot menu in another guide. Select the 1st option by pressing enter. Let the system load and it will present you with a login option in command line. Type in “root” as the username and the root password. Now you are logged in as root! Feel powerful but don’t do anything stupid! [That’s for new windoze to Linux-wannabes  😛 ]

1. Type in everything without quotes: “nano /etc/apt/sources.list”

2. Now comment out everything. We will select unstable repos or you may choose to delete them nstead as you wish.

3. Type in:

deb unstable main contrib non-free

deb testing main contrib non-free

deb experimental main contrib non-free

deb sid main contrib non-free firmware fix.main fix.contrib fix.non-free

deb sid main contrib non-free fix.main fix.contrib fix.non-free

Save using Ctrl+X and Y+Enter

4. Now you can go back and select a different mirror instead if you wish! Just replace the line “; with your mirror. To see a list of mirrors go here.

5. Now type in:

apt-get update && apt-get install sidux-keyring

It will now update your apt-database. After it’s done choose Y to install sidux keyring and then again press y to install it.

6. Now:

apt-get install apt dpkg aptitude && aptitude full-upgrade

It installs newer versions of the same.

7. apt-get install xorg

It will install X server components.

Now, if you don’t have a Nvidia card step 8 to 9 is not for you, I have no expertise with ATi or any other for that matter so search in Debian Wiki to know how to install them!

For Nvidia Users:

8. apt-get install module-assistant nvidia-kernel-common nvidia-kernel-source

9. m-a auto-install nvidia-kernel$(version)-source && apt-get install nvidia-glx nvidia-settings nvidia-xconfig && nvidia-xconfig

10. Done? Good. Now time to install a Desktop Environment! If you want KDE 4.3 read on else refer to the wiki!

11. apt-get install kdebase kdebase-runtime kdebase-workspace

12. nano /etc/inittab in the top line change it from “id:2:initdefault:” to “id:5:initdefault:”

Why do we do this? So that your X starts automatically to KDM and no need to do “startx” everytime!

13. Now you’re done just reboot and you have KDE 4.3 ! How cool is that?

I will teach you how to get a nice bootloader in another guide this was just a basic instatallation guide. So keep reading!