Showing posts with label GRUB. Show all posts
Showing posts with label GRUB. Show all posts

Monday, December 30, 2013

Extending Time limit to pick an OS in the GRUB Menu


Every one of my friend might be some inconvenient about the time they missed for choosing an OS in the GRUB menu. So not to worry friends, i have some simple steps to be followed for changing the time limit that we hate.



Tuesday, July 23, 2013

GRUB

To access and use your Linux system, you must carefully follow required start up and shut down procedures. You do not simply turn off and turn on your computer. If you have installed a boot loader, either GRUB or LILO(Linux Loader), when you turn on or reset your computer, the boot loader first decides what operating system to load and run. GRUB will display a menu of operating systems to choose, whereas LILO will display a command-line prompt.

The Grand Unified Bootloader (GRUB) is a multiboot boot loader. It is now the default boot loader used by Ubuntu, Red Hat systems and many more other operating system. GRUB offers extensive compatibility with a variety of operating system. Users can select operating systems to run from a menu interface displayed when a system boots up. Use arrow keys to move to an entry and press ENTER. Press e to edit a command, letting you change kernel arguments or specify a different kernel. The c command places you in a command line interface, GRUB can boot from anywhere on them. Use shell command “info grub” we can list detailed documentation of grub.

GRUB configuration is held in the /etc/grub.conf file. You only need to make your entries, and GRUB will automatically read them when you reboot. There are several options you can set such as the time out period and the background image to use. You can specify a system to boot by creating a title entry for it, beginning with the term title. You then have to specify where the operating system kernel or program is located, which hard drive and what partition on that hard drive. This information is listed in parenthesis following the root option. Numbering starts from 0, not 1, and hard drives are indicated with an hd prefix. So root(hd0,2) references the first hard drive (hda) and the third partition on that hard drive (hda3). For Linux systems, you will also have to use the kernel option to indicate the kernel program to run, using the full path name and any options the kernel may need. The Ram disk is indicated by the initrd option.
       title Ubuntu 11.04
       root (hd0,2) 
       kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/hda3
       initrd /boot/initrd-2.4.7-10.img 

For another operating system such as Windows, you would use the root option to specify where Windows is installed. Use the “imakeative” and “chain-loader+1” options to allow GRUB to access it. Windows systems will all want to boot from the first partition on the first disk. This becomes a problem if you want to install several versions of Windows on different partitions or install Windows on a partition other than the first one. GRUB lets you work around this by letting you hide other partitions inline and then unhidden the one you want, making it appear to be the first partition. Use the rootnoverify command to allow the system to boot. 

A sample grub.conf file follows with entries for both Linux and Windows. Notice that kernel parameters are listed in the kernel option as arguments to the kernel.
/etc/g rub.conf
------------------------------------------------------------------------------------------------------
# grub.conf generated by anaconda
#
#boot=/dev/hda
default=0
timeout=30
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
title Ubuntu 11.04
root (hd0,2)
kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/hda3 hdc=ide-scsi
initrd /boot/initrd-2.4.7-10.img
title Windows XP
root (hd0,0)
imakeactive
chainloader +1 

Sunday, February 3, 2013

Logical Volume Management In Ubuntu



Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes. Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for.

                      
                                         Fig1: Logical Volume Management
 What is LVM?

Logical Volume Manager allows for a layer of abstraction between your operating system and the disks/partitions it uses. In traditional disk management your operating system looks for what disks are available (/dev/sda, /dev/sdb, etc.) and then looks at what partitions are available on those disks (/dev/sda1, /dev/sda2, etc.).



Fig2: LV  Manager

With LVM, disks and partitions can be abstracted to contain multiple disks and partitions into one device. Your operating systems will never know the difference because LVM will only show the OS the volume groups (disks) and logical volumes (partitions) that you have set up.
Because volume groups and logical volumes aren’t physically tied to a hard drive, it makes it easy to dynamically resize and create new disks and partitions. In addition, LVM can give you features that your file system is not capable of doing. For example, Ext3 does not have support for live snapshots, but if you’re using LVM you have the ability to take a snapshot of your logical volumes without unmounting the disk.

When To Use LVM?

The first thing your should consider before setting up LVM is what you want to accomplish with your disks and partitions. Some distributions, like Fedora, install with LVM by default.
If you are using Ubuntu on a laptop with only one internal hard drive and you don’t need extended features like live snapshots, then you may not need LVM. If you need easy expansion or want to combine multiple hard drives into a single pool of storage then LVM may be what you have been looking for.

Setting up LVM in Ubuntu

First thing to know about using LVM is there is no easy way to convert your existing traditional partitions to logical volumes. It is possible to move to a new partition that uses LVM, but that won’t be something that we will cover in this article; instead we are going to take the approach of setting up LVM on a fresh installation of Ubuntu 11.10.To install Ubuntu using LVM you need to use the alternate install CD. Download it from the link below and burn a CD or use unetbootin to create a USB drive.

 Fig3: Ubuntu Edition Screen

Boot your computer from the alternate install disk and select your options up until the partition disks screen and select guided – use entire disk and set up LVM.

 Fig4: Partition Disks 

Select the main disk you want to use, typically your largest drive, and then go to the next step.

 Fig5: Disk to Partition

You will immediately need to write the changes to disk so make sure you selected the right disk and then write the changes.

 Fig6: Changes Screen

Select the size you want the first logical volume to be and then continue.

 Fig7: Partitioning Disks

Confirm your disk partitions and continue with the installation.
 Fig8: Changes Screen

The final step will write the GRUB boot loader to the hard drive. It is important to note that GRUB cannot be on an LVM partition because computer BIOS’s cannot directly read from a logical volume. Ubuntu will automatically create a 255 MB ext2 partition for your boot loader.

  Fig9: GBL Installation Permission Screen

After the installation is complete, reboot the machine and boot into Ubuntu as normal. There should be no perceivable difference between using LVM or traditional disk management with this type of installation.


Fig10: Final Completion Screen

This is how the LVM is installed on UBUNTU Linux.