Description of GRUB 2
-
Upload
iamumr -
Category
Technology
-
view
802 -
download
2
Transcript of Description of GRUB 2
GNU'S Not Unix- GRand Unified Bootloader...
GNU-GRUB
What will we be covering?
Introduction to GRUB
Installing GRUB
Exploring GRUB
Customizing GRUB
GRUB Error Recovery
Introduction...err...Features
Many features and lot of flexibility
Supports booting multiple operating systems
Support for many boot devicesHard disk (of course), cd-rom(El-Torito), network(tftp)
Support for many file systems (ext2/3, xfs, jfs,reiserfs, dos, fat16, fat32...)
Configuration File
Features (continued)
Support for network cards (etherboot)
Menu Interfaces for regular and command interface for advanced users
Remote control from serial console.
Supports multiple executable formats
Can uncompress compressed files.
Installing GRUB
From Scratch (i.e. on a blank disk)Do it from a host with GNU/GRUB installed.
Create a partition on disk fdisk /dev/sda
Format and mount this partition:mkfs.ext3 /dev/sda1sudo mount /dev/sda1 /mnt/sda1
Installation....(Continued)
Download grub tarball ftp://ftp.gnu.org/gnu/grub
Compiling :)
Install grub:grub-install root-directory=/mnt/sda1 /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
A secret:The grub-install (Just a shell script !!! :-O)The real heroes are :'grub-mkimage' and
'grub-setup'
Exploring(The quest to learn GRUB-fu)
Changes???/boot/grub
/etc/grub.d
/etc/default/grub
Other places: /usr/lib/grub(Modules)| /usr/bin or /bin (Binaries),Docs
Exploring....(Digging In)
Scanning grub.cfg(/boot/grub/grub.cfg) Phew!!.....looks complicated....(actually non-editable)we'll come back later.
Peeking in /etc/grub.d00_* contains header info
10_* Native boot entries
20_* Third party apps
30_osprobe :Scans for other O.S.
40_custom : Custom templates for additional entries
Looking at /etc/default/grub....Hmmm....looks interesting.!!! :)
Customizing GRUB
Some Theory:
/etc/default/grub
/etc/grub.d//boot/grub/grub.cfg
Custom Settings
Custom Scripts
What can we do?
Making Custom Settings
We change the /etc/default/grub file.
Some of the configurations are:GRUB_DEFAULT,
GRUB_TIMEOUT,
GRUB_HIDDEN_TIMEOUT,
GRUB_DISABLE_RECOVERY,
GRUB_BACKGROUND,
GRUB_THEME,
.....AND MANY MORE.
Making Custom Scripts
Can be done by adding scripts in /etc/default/grub
Sample:
echo "Some string" cat