Posts from the ‘Linux’ Category

Arch Linux Handbook now in Print!

Arch linux Handbook

Arch linux Handbook

Good news to fellow Archers and those who wanted to install Arch Linux for so long, but shunned the idea by seeing the gigantic Beginner’s Guide. It is quite tedious, to keep a console browser running in another terminal, and having to scroll down every time you would want to start an installation step. Reading the entire guide at once and then installing is also unachievable. Your only option is to print the entire guide, pages after pages. There is an easy and affordable alternative solution to all these. Thanks to Dusty Philips‘s effort to compile and edit the entire Arch Linux Beginner’s Guide, which includes step by step installation procedures along-with detailed descriptions.  Even if you are an existing Arch Linux user, buying this will be a good contribution towards Arch, so please consider buying it. This book will alleviate the so called “mighty setup process” of Arch Linux and make it easier for even new Linux users to boast of an Arch Linux installation.

Order book from here.

Publication Date: Oct 06 2009
ISBN/EAN13: 1448699606 / 9781448699605
Page Count: 166
Binding Type: US Trade Paper
Trim Size: 5.5″ x 8.5″
Language: English
Color: Black and White
Advertisements

[howto] Enable/Disable GRUB Password

NOTE: This is not a rock solid secured way of disabling access to your pc. But atleast for those “Windoze users” who have no clue wtf is a grub, it’s going to be pretty effective! I’m going to teach you how to enable as well as disable grub password.

Enable GRUB password:

1. Open terminal and type as root:

# cp /boot/grub/menu.lst /boot/grub/menu.lst.backup

2. Now that your GRUB is backed up. Type:

# grub

grub> md5crypt

Password: ******** [Type in the password that you want to encrypt!]

Now copy the encrypted message it gives you!

grub> quit

3. Open /boot/grub/menu.lst.backup and paste the message after initrd line. If you have a number of Grub entries , you must paste it [or use a different encrypted password using the above method] for every entry that you want to password protect! Use it like this:

title           Debian GNU/Linux, squeeze/sid
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.30-1-amd64 root=/dev/hda2 ro splash quiet vga=791
initrd          /boot/initrd.img-2.6.30-1-amd64

password – -md5 gasgd6876b2dsd2d/

paste the code after “password – -md5”

Note: Since wordpress has the weird habit of showing double hyphen as a single large one, I put a space in between the two, you just need to put two hyphens without any space in between!

Disable/Hack GRUB password:

1. You need a Linux live CD for this.

2. Insert the CD and boot from it.

3. In command line [or if you’re using ubuntu cd 😛 open a terminal and type]:

$ su

# fdisk -l [to check the name of the root directory]

# mount -t ext3 -o rw /dev/sda2 /mnt

[change ext3 to ext4 and /dev/sda2 according o the fdisk -l output]

# chroot /mnt /bin/bash

# nano /boot/grub/menu.lst

Now just remove the password line from the grub menu. 😛 Simple eh? Now save , unmount the partition and reboot!

[howto]Getting rid of Fedora-Nvidia annoyances!

Nvidia

Nvidia

Hello all! I’m writing this guide purely out of experience and whatever I have come across didn’t help at all! Their forum is friendly but not really useful. So I had to get my own workaround. If you are using Fedora for a while now and do yum updates regularly you will notice that kernel upgrades are pretty frequent. If you have Nvidia card then you must have added the rpmfusion repo and installed kmod-nvidia or akmod-nvidia. After I ran:

yum update

and rebooted into my fresh new kernel, dang! NO X! I started googling out of frustration and even searched their official forum. Only to be disappointed as I found they were suggesting the akmod-nvidia instead of kmod which builds your nvidia modules with every kernel upgrades automatically. So I tried that! Didn’t help at all! So I did:

yum erase kmod-* && yum erase akmod-*

then I went to: Nvidia and selected my Card and downloaded the .run driver file and saved it in my ~/ [home folder!]

Fedora

Fedora

Next in a terminal as root typed:

yum install kernel-devel

Now you can not build the kernel modules whilst in X so I rebooted. In the boot menu press “e” to edit the boot parameter and again press “e” to edit the kernel parameter. remove “quiet” and add “3” after ro  and at the end “verbose”. So it should become “ro 3 rhgb verbose”. Now press enter and then “b”.

After the booting is done you will be presented with a console login. Type in your username and password. Then:

sh ~/Nvidia…[press tab for auto-completion!].run

Now the setup should start, accept the license and proceed!After that:

rm /etc/X11/xorg.conf && nvidia-xconfig

nano /etc/X11/xorg.conf

And add at the end the following [if not already present! Mine wasn’t!]

Section “Extensions”

Option    “Compositing”    “Enable”

EndSection

Then reboot and your X should be waiting for you. 😉

[howto] Enable/Disable Root Login

NOTE: IF YOUR DISTRIBUTION HAS DISABLED ROOT LOGIN THEN IT’S FOR A GOOD REASON! ROOT LOGINS CAN BE EXTREMELY DANGEROUS, SPECIALLY IF YOU ARE NEW TO LINUX ENVIRONMENT.

Why so? Simply because becoming the root user[like the administrator login in Windows] you will have the ultimate power of your system which if used incorrectly can destroy your data and even your system as a whole. SO USE THIS AT YOUR OWN RISK!

ENABLING ROOT ACCOUNT: Type in  terminal :

sudo passwd root

and enter the password for root user and from next time you can use username “root” and this password to login or use su to have root access.

DISABLING ROOT ACCOUNT: Type in terminal:

passwd -l root

And done! 😉

[howto] Restore Grub

It is always recommended to install Windows first and then Linux, however if you would prefer [for some weird reasons] to do the opposite then follow this guide!

Requirement:

You need a Linux LIVE CD. E.g.-> ubuntu or suse or mandriva,etc etc.

Boot from your Live CD. Now open a terminal and type in:

grub

find /boot/grub/stage1

Now it will show you the correct root partition.

root (hd0,1)   [replace 0 and 1 according to the output!]

setup (hd0)

quit

sudo grub-install /dev/sda [or hda , whichever is your MBR]

reboot

Done!

[Out-dated] GRUB-GFX {Graphical Grub Menu}

GRUB-GFX will transform your ugly grub menu into a beautiful one.

First remove your older grub:

apt-get remove grub

Download the 32bit version from here. I use 64bit, but it’s not available anywhere it seems so I might upload it somewhere if someone requests!

Goto the folder where you downloaded it and install using

dpkg -i filename.deb

Download the suse grub from here. Put it in a new folder else it will get messy!

cpio -i < message.suse

This will extract it! See toldya’ it will get messy!

Now edit the pictures as you want and then put it back up:

ls . |cpio -o > /boot/grub/message.custom

If you don’t want to go through this hassle there are countless themes already there, search in Gnome-look.org or KDE-look.org. For debian users you can try out this one.

Just copy it into /boot/grub

cp mesage.debianorange /boot/grub/

Then edit your menu.lst

Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst

and make it use gfxboot

Code:
gfxmenu /boot/grub/message.suse # the suse can be replaced

Type in:

grub
grub> find /boot/grub/stage1
(hdx,y) # this will be the output
grub> root (hdx,y)
grub> setup (hdx)

Replace hdx,y with whatever output it shows, for me it was (hd0,1)

Now :

grub-install /dev/hda [or sda whichever is your MBR]

update-grub

Reboot and enjoy!

NOTE: Please follow this guide if you run into any problem.

GRUB 2 [howto]

Click to enlarge

Click to enlarge

GRUB 2

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:

/usr/share/images/grub/

# 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}
to
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