…being a linux user I’ve tried out various linux distros, trying to find the one that suits me the best.
Each of them are wonderful in their own way. Many of the distros are made for a specific set of users. Some aim at security, some at being small and off course some to replace windows :)
But none of them seem to satisfy me. Some distros provide wonderful UI and customization but hog a lot of memory. Few of them are very fast and small but does not provide a good GUI. Most of the time, there are so many unwanted features that I hardly use.
So I decided that I’l build my own based on my requirements. In the beginning I thought of using ‘Arch’ as it comes with a plane and simple base system upon which I can add my required modules. Moreover since ‘Arch’ is based on rolling release, the fact I would not have to frequently upgrade to newer stable versions was comforting.
Then I came across this project call ‘linux from scratch’(LFS). I’m glad I found that project. LFS provides step-by-step instruction to build a custom linux from source code. I couldn’t ask for more. This is the next best thing to writing my own OS.
LFS lets me create a basic system. similarly there are other xLFS, that lets you to continue on the base system to create more advanced and customized systems .
So, if there are others out there who also want a customized linux, then http://www.linuxfromscratch.org/ should be your first step.
lost your grub after installing windows? here is a simple way of getting it back.
[note: assuming windows being installed on top of ubuntu(using grub2) ]
1: boot from a live cd and open a terminal
2: sudo fdisk -l
this will show the partitioin table. Here is my partition table
Device Boot Start End Blocks Id System
/dev/sda1 63 771119 385528+ de Dell Utility
/dev/sda2 * 772096 105629695 52428800 83 Linux
/dev/sda4 105631722 625141759 259755019 f W95 Ext’d (LBA)
/dev/sda5 105631744 315355949 104862103 7 HPFS/NTFS
/dev/sda6 315356013 561134384 122889186 7 HPFS/NTFS
/dev/sda7 621142016 625141759 1999872 82 Linux swap / Solaris
/dev/sda8 561134448 621137159 30001356 83 Linux
3: mount the linux partition on which you want install the grub (sda8 in my case)
$sudo mount /dev/sda8 /mnt/
$sudo mount —bind /dev /mnt/dev
$sudo mount —bind /proc /mnt/proc
4: Now chroot into this environment
sudo chroot /mnt
[optional]if you want to change any default setting like timeout optiions… then look at /etc/default/grub
5: #grub-install /dev/sda
[ in case of error do #grub-install —recheck /dev/sda ]
6: now unmount and reboot the system.
#exit
$sudo umount /mnt/dev
$sudo umount /mnt/proc
$sudo umount /mnt
$sudo reboot
I am a cmd line user, so i spend most of my time on the terminal and its really painful to use the gui for some of the common things. Power management is one such case.
Just to put the system to sleep i’ve to go to the menu and then select, suspend. Same for hibernate, or to put the battery to power save mode.
So here is the simple way to do the same tasks from the cmd line.
pm : power management. check out the man pages for its various options.
pm-suspend : suspend/sleep the system
pm-hibernate : hibernate the system
pm-powersave : set the battery to power save mode
using these commands are way more simpler than using the gui :) [provided you are cmdline user]
If you’ve lost your grub entries after installing a new os, here’s a simple way of adding it back to your grub.Lets take the common situation where fedora has been installed along side ubuntu.In this case, the grub which you’l see is that of fedora, so you’l have to add the ubuntu entry into fedora’s grub.
first, boot into fedora and open the file ‘/boot/grub/menu.lst’.This is the file that has the entries which are visible when the grub is loaded.
Amongst other things, the file would have a few statements that would look like
####################################
title Fedora (2.6.35.12-90.fc14.i686.PAE)
root (hd0, 1)
kernel /boot/vmlinuz-2.6.35.12-90.fc14.i686.PAE ro root=UUID=912d5b84-5c9c-4NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb
initrd /boot/initramfs-2.6.35.12-90.fc14.i686.PAE.img
###################################
these four lines are responsible for your grub to show the title ‘fedora…’ on the grub menu and boot it. To be short, the first line denotes the name to be displayed in the grub menu.The second line provides the hard disk and partiion (in which that particular os is existing) to be set as the root in the path. The third line is the full path to the kernel image of that os and the arguments that have to be passed for booting and the fourth line is the path to the initrd image
so if you want to add ubuntu(or any other) to the grub menu, all you have to do is to provide these parameters in the fedora’s menu.lst file.These parameters will already be present in ubuntu(or any other) grub file.
mount your ubuntu partition and open the grub menu file(/boot/grub/menu.lst or grub.cfg).If the other os uses grub2 then you’l have to use grub.cfg instead of menu.lst
Since ubuntu is now shipped with grub2, grub.cfg will have entries similar to
###################################
menuentry ‘Ubuntu, with Linux 2.6.32-28-generic’ —class ubuntu —class gnu-linux —class gnu —class os{
recordfail
insmod ext2
set root=’(hd0, 8)’
search —no-floppy —fs-uuid —set f18af736-8d79-43e5-815e-0033f9c31ffe
linux /boot/vmlinuz-2.6.32-28-generic root=UUID=f18af736-8d79-43e5-815e-0033f9c31ffe ro crashkernel=384M-2G:64M, 2G-:128M quiet splash
initrd /boot/initrd.img-2.6.32-28-generic
}
###################################
it has a differnt format, but contains the same information
1st line is the title
in the 4th line (hd0, 8) is the harddisk and the partition in that hard disk where the os is existing
6th line is the path to that os’s kernel and its boot options7th line is the path to the initrd image of that os
so all you’ve to do now is to add these entries into fedora’s menu.lst fileIn our case, the new entry in the menu.lst file would be
###################################
title ubuntu
root (hd0, 7)
kernel /boot/vmlinuz-2.6.32-28-generic root=UUID=f18af736-8d79-43e5-815e-0033f9c31ffe ro crashkernel=384M-2G:64M, 2G-:128M quiet splash
initrd /boot/initrd.img-2.6.32-28-generic
###################################
Note: in grub.cfg the partition was 8, but we use 7 in menu.lst because for this version of grub the partition number starts from 0
Now save the file and reboot. You’l have this new option in the grub menu
We cannot obtain anything without first giving something in return. To obtain, something of equal value must be lost.
[video]
Everything should be made as simple as possible, but not simpler. ” - Einstein