Ngarkuesi i nisjes - Bootloader GRUB
GNU GRUB (Grand Unified Bootloader) është një menaxhues i nisjes - "Boot-Manager", i cili është i përhapur te shumë shpërndarje të Linux - it, si psh Debian GNU Linux , Ubuntu Linux, Linux Mint, Red Hat etj.
Shenimet që përdoren për diskun e ngurtë (Festplatte) dhe ndarjet (particionet)
hd0 = disku i ngurtë nr.1
hd1 = disku i ngurtë nr.2
Shembull i dy sistemeve operative:Suse dhe Windows
#cat /boot/grub/menu.lst
color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,1)/boot/message
title Linux
kernel (hd1,1)/boot/vmlinuz root=/dev/hdf2 vga=0x317 splash=silent acpi=off desktop resume=/dev/hdf1 showopts
initrd (hd1,1)/boot/initrd
title Windows
root (hd0,0)
chainloader +1
title Diskette
root (fd0)
chainloader +1
title Failsafe
kernel (hd1,1)/boot/vmlinuz root=/dev/hdf2 showopts ide=nodma apm=off acpi=off vga=normal noresume nosmp noapic maxcpus=0 3
initrd (hd1,1)/boot/initrd
title Speichertest
kernel (hd1,1)/boot/memtest.bin
Në rastin tim konkret: Debian GNU Linux (kam të instaluara 4 shpërndarje të Linux-it)
albtirol#cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 15
# Pretty colours
#color cyan/blue white/blue
# Splash Image
#splashimage=(hd0,1)/boot/grub/albtux.xpm.gz
#splashimage=(hd0,0)/boot/grub/splashimages/debian_grey1-14col.xpm.gz
splashimage=(hd0,0)/boot/grub/splashimages/68224-tux_splash.xpm.gz
## password ['--md5'] passwd
savedefault=false
## ## End Default Options ##
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro quiet
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
title Linux Mint 7 Gloria, kernel 2.6.28-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-15-generic root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet
title Linux Mint 7 Gloria, kernel 2.6.28-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.28-15-generic root=/dev/sda2 ro single
initrd /boot/initrd.img-2.6.28-15-generic
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Sisteme tjera Operative:
#root
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda3 ro quiet
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
#title Debian GNU/Linux (5.0.2)
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.26-2-686
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title Ubuntu 9.04, kernel 2.6.28-15-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=b6ba3519-2a50-4093-b671-3e598a6312b0 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
savedefault
boot
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda5.
title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
root (hd0,4)
kernel /boot/memtest86+.bin
initrd /boot/initrd.img-2.6.28-11-generic
savedefault
boot
Çka do të ndodhë nëse ju rastësisht keni fshirë MBR dhe GRUB nuk ju funksionon më. Pra nuk mund ta ristartoni. Është shumë lehtë: me një LiveCD apo me një USB - stick me disa komanda mund ta rregulloni këtë (kështu si më poshtë):
Po supozoj se keni të instaluar windows në ndarjen e parë të diskut të ngurtë dhe Linux në ndarjen e dytë (psh ubuntu Linux).
Startojmë USB stick dhe shkruajme komandat si më poshtë:
#sudo mkdir /mnt/ubuntu
#sudo mount /dev/sda1 /mnt
#sudo mount -o bind /dev /mnt/dev
#sudo mount -t bind /proc /mnt/proc
#sudo chroot /mnt
#sudo grub-install /dev/sda

