grub.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Aug 2015 23:55:34 +0300
changeset 1729 22ffd80639c0
parent 1713 f948320f5bf3
child 1905 fba288d59662
permissions -rw-r--r--
Make centered content design with adoption for mobile devices. Highlight TOC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1334
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 930
diff changeset
     1
.. -*- coding: utf-8; -*-
9bf0d5a1f0cf Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 930
diff changeset
     2
.. include:: HEADER.rst
930
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
=======
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 GRUB.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
=======
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
.. contents::
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
1713
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
     9
Resore GRUB 2.
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    10
==============
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    11
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    12
If you boot to same bit-width kernel (32/64) that have installed you can chroot
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    13
to main system and recover by your Linux discto commans::
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    14
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    15
  mount /dev/sdX /mnt
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    16
  sudo mount --bind /dev /mnt/dev &&
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    17
  sudo mount --bind /dev/pts /mnt/dev/pts &&
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    18
  sudo mount --bind /proc /mnt/proc &&
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    19
  sudo mount --bind /sys /mnt/sys
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    20
  sudo chroot /mnt
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    21
  grub-install /dev/sdX
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    22
  update-grub
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    23
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    24
Check that partition with ``/boot`` directory::
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    25
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    26
  $ mount /dev/sdX /mnt
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    27
  $ ls -l /mnt/boot/grub
f948320f5bf3 Resore GRUB 2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1334
diff changeset
    28
930
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
Setting text mode resolution on boot.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
=====================================
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
vga=mode
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
Specifies the VGA text mode that should be selected when booting. mode defaults
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
to the VGA mode setting in the kernel image. The values are not case-sensitive.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
They are:
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
  ask
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
      Prompts the user for the text mode. Pressing Enter in response to the
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
      prompt displays a list of the available modes. extended (or ext)
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
      Selects 80x50 text mode.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
  normal
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
      Selects normal 80x25 text mode.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    44
  number
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    45
      Uses the text mode that corresponds to number. A list of available
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    46
      modes for your video card can be obtained by booting with vga=ask and
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    47
      pressing Enter.
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    48
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    49
::
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    50
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    51
  F00 80x25
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    52
  F01 80x50
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    53
  F02 80x43
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    54
  F03 80x28
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    55
  F05 80x30
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    56
  F06 80x34
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    57
  F07 80x60
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    58
  F09 132x25
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    59
  F0A 132x43
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    60
  F0B 132x50
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    61
  F0C 132x60
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    62
  100 40x25
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    63
  154 132x43
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    64
  155 132x25
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    65
  164 132x60
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    66
  165 132x50
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    67
  120 132x25
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    68
  121 132x43
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    69
  122 132x50
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    70
  123 132x60
36430cc457bd Setting text mode resolution on boot.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    71