
ДЛЯ ТЕКУЩЕЙ ФЕДОРЫ-ASP-RED HAT
загрузочный CD/флешка, предназначенный в том числе и для восстановления Grub, с пунктами меню и прочим
Восстановление GRUB в Убунту (с картинками):
http://ubuntologia.ru/grub-mbr-windows
без картинок:
http://pronix.isgreat.org/forum/viewtopic.php?p=38#p38
http://suharr.ru/85
http://www.dnny.ru/ubuntu/23-vosstanovleni...b-v-ubuntu.html
http://tuxedo-live.blogspot.com/2007/07/grub.html
________________________________________________________________________________
_________________________________
Вот потихоньку решила дёргать из разных источников.
Проблема состоит в разных подходах разных создателей дистрибутивов вообще ко всему.
Постю основным текстом, т.к. так проще будет редактировать.

Опытных пользователей различных дистрибутивов прошу добавлять конкретику, основанную на практике именно по своим дистрибутивам (т.е. только последовательность действий и команд) Флейм и расплывчатые "советы" будут выкидываться, не обижайтесь.
От себя начинаю про восстановление GRUBа в Женте в ситуации переустановки винды, т.е. затёртого MBR:
Загружаемся с установочного CD, ждём появления приглашения в ком. строке
Сначала монтируем разделы
# mount /dev/hda$ /mnt/gentoo
# mount /dev/hda$ /mnt/gentoo/boot
# swapon /dev/hda$
# mount -t proc none /mnt/gentoo/proc
Чрутимся в родную женту:
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
#grub
grub> root (hd0,$)
grub> setup (hd0)
grub> quit
Вылезаем из родной женты и перезагружаемся:
# exit
# umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
# reboot
Опять же хочу заметить, что если у вас есть старый инст. диск (напр. Gentoo 1.4), а система новая, то chroot может уже не получиться, говорит что-то типа "ошибка, слишком старое ядро" (у меня такое началось после установки ядра 2.6.15, более ранние 2.6.* работали). Но восстанавливается и без chroot'а

_________________________________________________________________________
________________________________________________________________________
Код:
Проблемы с загрузкой системы
Если не загружается ни одна из установленных операционных систем, значит проблема в начальном загрузчике. Такие проблемы могут возникнуть после установки системы, если загрузчик не установился или установился с ошибкой. При (пере) установке Windows на вашем компьютере загрузчик Linux будет перезаписан в принудительном порядке, и станет невозможно запускать Linux.
Повреждение или перезапись загрузчика никак не затрагивает остальные данные на жёстком диске, поэтому в такой ситуации очень легко вернуть работоспособность: для этого достаточно восстановить загрузчик.
Если у вас исчез загрузчик другой операционной системы или другого производителя, то внимательно почитайте соответствующее официальное руководство на предмет его восстановления. Но в большинстве случаев вам это не потребуется, так как загрузчик LILO, входящий в состав ALT Linux, поддерживает загрузку большинства известных операционных систем.
Для восстановления загрузчика LILO достаточно любым доступным способом загрузить Linux и получить доступ к тому жёсткому диску, на котором находится повреждённый загрузчик. Для этого проще всего воспользоваться восстановительным режимом, который предусмотрен на загрузочном диске дистрибутива. В ALT Linux к нему можно получить доступ, загрузившись с CD-ROM и выбрав в меню пункт «Спасательная система».
Загрузка восстановительного режима заканчивается приглашением к регистрации (login:), используйте входное имя root (пароль не требуется — просто нажмите Enter).
Чтобы восстановить загрузчик, нужно выполнить следующие действия:
1. Смонтировать корневой раздел Linux («/») командой mount /dev/hda1 /mnt (На месте /dev/hda1 должен быть указан тот раздел диска, на котором у вас находится корневая файловая система Linux).
2. Объявить файловую систему на этом разделе корневой — командой chroot /mnt.
3. Если на диске ничего не менялось (не установлено новых систем), восстановить загрузчик можно одной командой — lilo. В результате загрузчик будет восстановлен в той же конфигурации, что и перед повреждением.
Если на диске произошли изменения, которые должны затронуть список загружаемых систем (добавлены/удалены ОС), перед выполнением команды lilo потребуется обновить конфигурацию загрузчика: с помощью любого текстового редактора (например, mcedit) отредактировать файл lilo.conf
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
После очередной переустановки Windows была переписана загрузочная запись и стала загружаться только Windows. Как мне восстановить загрузчик и загрузить Linux?
1. Загрузите систему с первого установочного диска в вариант Recovery Console.
2. Если используются SATA-диски, при необходимости подгрузите модуль контроллера командой 'modprobe имя_модуля', например:
modprobe sata_via
3. Просмотрите список доступных разделов жесткого диска:
fdisk -l
Будет выдан перечень разделов с указанием типа файловой системы. Определите, какой из этих разделов является корневым (тип раздела обозначен как Linux)
4. Смонтируйте корневой раздел:
modprobe ext3
mount -t ext3 раздел /mnt
Здесь раздел - имя корневого раздела в том виде, в каком его показывает fdisk, например, /dev/hda5 Подразумевается, что на корневом разделе используется файловая система ext3 (по умолчанию)
5. Отдайте команды:
chroot /mnt
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/start_udev
6. Далее, в зависимости от используемого загрузчика, отдайте одну из команд для установки загрузчика в MBR:
# GRUB (устанавливается по умолчанию):
/sbin/grub-install hd0
# ASPLoader:
/sbin/aspldr
# LILO:
/sbin/lilo
7. Размонтируйте раздел и перегрузите систему:
exit
umount /mnt
reboot
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Recovering Grub when you make a Mistake - Fedora on a second hard drive in the system
It is possible to recover grub, when you have not set up your system correctly, or need to repair the grub installation. This may happen when the following occurs;
1. You fail to set grub to boot from the correct hard drive during the installation
2. Change the logical order of your hard drives after the installation
3. Add, remove or modify partitions on the affected drive after the installation
The Fedora installation CD or DVD allows you to boot into "rescue mode" to make any necessary repairs on your Fedora system.
NOTE: This section assumes that you did not change anything relative to the logical order of the hard drives since you installed Fedora. It also assumes that you have only IDE drives in your system and no sata drive that is your actual boot drive. If you have sata drives on your system, or a combination of sata and IDE drives, read the section "Notes on sata drives" below.
Booting from the installation disk and choose Linux rescue at the installation menu.
Try getting to the root Fedora filesystem, after using the rescue disk, by typing in the console chroot /mnt/sysimage
This gets you to the root of the Fedora filesystem.
Then try typing in the console grub-install /dev/hda
Note: space between grub-install and /dev/hda
DO NOT type hda1, you want the MBR of the hda drive, not hda1, which is the first partition on the drive.
If you have a sata drive on your system and this is your boot drive, see the section on sata drives below.
Reboot the system and see if you get grub, with the option to boot both Fedora and Windows.
The other issue is that grub defaults to only a few seconds before booting the first listed OS. Depending on what you chose to boot first (hopefully not Windows) during the installation of Grub, that OS will boot quickly.
Let us know what happens, then we can change the timeout of the booting via Grub.
Essentially what you want to do is get into the /boot/grub/menu.lst file and change the line that starts with timeout from 10 to 50.
Now, this is where things get cloudy. You boot into rescue mode.
Did you make sure that the sysimage was loaded? in Fedora Core 5, during the rescue boot, Fedora tries to see the installation and mount the sysimage. You get a message asking if you want to do this, or skip the detection. If you choose the former option and there is something wrong, the image is not mounted fully and you should have received a message that not all the files were loaded.
If you choose the skip this step, then you need to mount the sysimage manually.
What if I changed the logical order of the drives in the bios, either physically or in the bios and the above solution does not work?
Then you can apply the alternate command grub-install --recheck /dev/hda after getting into the chroot of Fedora. This command tells grub to recheck the drives and their order and reference the boot files correctly. The correct syntax is grub-install <space> recheck /dev/hda
The Grub Bug:
In some cases, the above solutions will work and in others they will not. There seems to be a bug in how grub works in some systems.
Assuming that you are chooted into the Fedora installation successfully, try the following commands at a root terminal window (bold text are the actual commands). This assumes that you did not change the order of the drives since you installed Fedora.
grub (hit the enter key & after each command below)
grub> root (hd1,0) (since fedora /boot is on /hdb or the second hard drive)
grub> setup (hd0) (the MBR of the first hard drive)
grub> quit
What these commands do; Typing Grub enters the grub editing mode, referenced at grub>
root (hd1,0) tells grub that the root files on the system are on hdb, or the primary slave drive.
setup (hd0) tells grub to install the bootloader on the primary master MBR
quit quits the grub edit mode
Remember, the logical order of you drives depends on how they are set in the bios and jumpered when you installed them. Grub sees them with the following naming convention;
hd0 = the primary master drive
hd1 = is the primary slave drive
hd2 = is the secondary master drive
hd3 = is the secondary slave drive The actual partitions are the second numerical code.
hd0,0 - the first hard drive on the system, first partition.
Notes on sata Drives:
If you have sata drives on your system, or a combination of sata and pata (IDE) drives, then the naming scheme is a little different. These drives are not jumpered like IDE (pata) drives, but seen by the bios on the physical channel they are on, or in the order where they are connected on the motherboard connector. They will be seen by Linux, as sda, not hda (ie; the first sata drive on the system vs. the first IDE drive). So, all commands to change grub with the grub-install --recheck command are relative to their naming scheme. For example, grub-install --recheck/dev/sda would be the proper syntax.