GRUB operating system bootloader: settings, description. Install and Restore GRUB

More than a dozen new users of operating systems, Windows, « » . : , , Windows. . , . , IT-, GRUB, , .

GNU GRUB. GRand Unified Bootloader " ". « GNU», IT- . GRUB :

  • Linux.
  • FreeBSD.
  • Solaris.

GRUB Windows. , , , .





GRUB , . , GRUB Legacy, UNIX- . ( RedHat Novell) .





, GRUB 2. , GRUB 2 - GRUB Legacy, . , 9.10 Ubuntu, GRUB - Legacy.





, GRUB 2 - , , . , , , :









  • (, , ).
  • (GRUB 2 - ).
  • . , .
  • .
  • Mac OS.
  • , : FAT16, FAT32, NTFS, ext, XFS ISO
  • GRUB2
  • .
  • GRUB Legacy, - .

, GRUB GRUB 2, .

LILO?

, GRUB' . LILO - Linux (LInux LOader), . GRUB , :

  • LILO 16 , GRUB .
  • GRUB , LILO.
  • , LILO , GRUB.




. Linux. GRUB 2 . , LILO , .

GRUB:

, Ubuntu, (LiveCD). , Ctrl+Alt+F2, :

- sudo add-apt-repository ppa:cjwatson/grub,

- sudo add-get update && sudo add-get install grub2,

- sudo update-grub2.

Ubuntu, LiveCD, . , " Ubuntu" - - . GRUB .

grub-install -v, Ubuntu.

GRUB

GRUB Install MBR . MBR - , ( . Master Boot Record), :

  • (446 );
  • , (64 ).




- MBR, GRUB :

  1. MBR ( , ). , .
  2. , GRUB. , .

GRUB' , , .

GNU GRUB, . , «» , :

ls. .ls /boot/grub
. , , UUID, .

ls (hd*,*)

*,* -

cat.cat //_
linuxkernel- GRUB - Legacy, Linux.

linux _

1=

2 3

chainloader. , root (, ).

chainloader // _

root- root-, .root
(- ) root .

root (hd*,*)

*,* -

setroot- .

set root= (hd*,*)

*,* -

search

UUID, . :

  • u ( --fs-uuid) - UUID;
  • l ( --label) - ;
  • f ( --file) - ;
  • n ( --no-floppy) - -;
  • s ( --set) - .

, "", - set root , .

search -u uuid__

search -l

search -f //

lsfonts.lsfonts
help.help
, .

help s - , s.

help set - set.

terminal_output.console- .terminal_output.console
background_image

. , .

: - .

background_image //_

boot.boot
reboot.reboot

halt

.halt

GRUB:

GRUB2, Legacy, /boot/grub/menu.lst, /boot/grub/grub.cfg. - /etc/default/grub /etc/grub.d.

/etc/default/grub / :

  • GRUB_DEFAULT, . - , ( /boot/grub/grub.cfg ). : 0, - 1, - 2 .
  • GRUB_TIMEOUT, , . : "-1", , - .

/etc/grub.d , grub.cfg. : 10_linux 30_os-prober. 40_custom GRUB , ( , , ).





GRUB Ubuntu - Grub-Customizer. , , . (Ctrl+Alt+T), :

- sudo add-apt-repository ppa:danielrichter2007/grub-customizer,

- sudo add-get update,

- sudo add-get install grub-customizer.

Grub-Customizer , :

  • List configuration - . .
  • - , , .
  • - .

, GRUB, :

  • Super Grub Disk - . GRUB LILO, Windows. CD, .
  • GParted - , CD. , : , , , , .
  • SystemRescueCD - Linux, .
  • TestDisk - , , .

Windows?

, , GRUB Windows x86 (64- ), - . grub.cfg :

- title Windows,

- rootnoverify (hd*,*),

- makeactive,

- chainloader +1,

- boot.

. , . Windows :

  • rootnoverify (hd*,*) - set root. GRUB , , ( , GRUB ). , (hd*,*)- , Windows.
  • makeactive - .

chainloader +1, Windows.

, boot , .





, , Windows. / (hide/unhide) . , GRUB - , Windows . , .

, , - , . , Windows, , . menu.lst :

- title Windows,

- hide (hd0,0),

- unhide (hd0,1),

- rootnoverify (hd0,1),

- makeactive,

- chainloader +1,

- boot.

hide unhide, .

GRUB

GRUB . LiveCD, CTRL+ALT+T.

:

  • sudo grub-install /dev/sda - GRUB MBR (sda - );
  • sudo update-grub - ( , Windows).

.

GRUB , , /var/log, - . , . , , .

. - , - . , - . , /var/log, .





GRUB , "" GRUB, . recordfail, /boot/grub/grub.cfg. recordfail=1, recordfail=0. , GRUB.

/etc/defaul/grub GRUB_RECORDFAIL_TIMEOUT , GRUB recordfail 1 0. sudo update-grub, .

? , - . , , . - , - .

GRUB Windows: ,

" GRUB ?", /. : Linux, Windows, Grub error. Windows x86/64 bit:

  1. , BIOS
  2. , .
  3. , :
  • BOOTREC.EXE /FixBoot.
  • BOOTREC.EXE /FixMbr.

GRUB , - Windows-.




All Articles