Top-office11.ru

IT и мир ПК
0 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Ubuntu Documentation

Boot-Repair

Warning: This software is able to share information about your device for diagnostic purposes. You can chose to opt out in advanced settings. Please read this page fully. The log is quite helpful especially for the novice users.

Boot-Repair is a simple tool to repair frequent boot issues you may encounter in Ubuntu like when you can’t boot Ubuntu after installing Windows or another Linux distribution, or when you can’t boot Windows after installing Ubuntu, or when GRUB is not displayed anymore, some upgrade breaks GRUB, etc.

Boot-Repair lets you fix these issues with a simple click, which (generally reinstalls GRUB and) restores access to the operating systems you had installed before the issue.

Boot-Repair also has advanced options to back up table partitions, back up bootsectors, create a Boot-Info (to get help by email or forum), or change the default repair parameters: configure GRUB, add kernel options (acpi=off . ), purge GRUB, change the default OS, restore a Windows-compatible MBR, repair a broken filesystem, specify the disk where GRUB should be installed, etc.

For the purpose of helping the forum and IRC members help you diagnose issues with your boot setup, Boot-Repair (provided it has a network connection) will create a Ubuntu pastebin link for you to share that allows experienced members to see what’s wrong with your boot. Ubuntu’s Pastebin is not easily indexable or searchable, and purpose of the tool which creates this page (Boot-Info) is meant to be a very benign and helpful solution to the problem. The intention is not violate your privacy, nor is it meant to make you a target. This tool is aimed entirely at those new to Ubuntu who want to get past their booting issues and enjoy using Linux. If you’d like to, you may completely opt out of all internet usage including pastebin link generation by looking at the Advanced Options section below. Please do not use this software if this is a problem for you.

Читать еще:  Скачать драйвера для веб-камеры Defender

Boot-Repair is a free software, licensed under GNU-GPL.

http://pix.toile-libre.org/upload/original/1335260967.png

Recommended repair

  • launch Boot-Repair from either :
    • the Dash (the Ubuntu logo at the top-left of the screen)
    • or by typing ‘boot-repair’ in a terminal

    Then click the «Recommended repair» button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a paper, then reboot and check if you recovered access to your OSs.

    Warning: the default settings are the ones used by the «Recommended Repair». Changing them may worsen your problem. Don’t modify them before creating a BootInfo URL, and asking for advice on Ubuntu Forums Absolute Beginners Section or in Installation and Upgrades.

    Как восстановить загрузчик GRUB?

    Если случалось так, что файлы в соответствующих разделах полностью затерты, то придется заниматься восстановлением загрузчика. Процесс этот можно осуществить двумя способами.

    Первый из них предполагает взаимодействие с системой через терминал:

    1. Требуется загрузить Linux с того носителя, который использовался при инсталляции. Иногда необходимо войти в БИОС, чтобы включить загрузку с диска или флешки.
    2. Далее стоит открыть терминал, нажав комбинацию клавиш Ctrl + Alt + T, и вывести существующие разделы на экран посредством команды sudofdisk —i.
    3. После этого появится таблица с каталогами. Нужно найти корневой раздел и смонтировать его. Для этого следует ввести sudomount /dev/sda5/mnt. Вместо sda5 требуется прописать имя конкретного раздела. Он может отличаться.
    4. Восстановить загрузчик помогает команда sudo grub-install – root-directory=/mnt /dev/sda.
    5. В самом конце нужно ввести sudo reboot для перезагрузки.

    При необходимости можно воспользоваться специальной утилитой, чтобы автоматизировать процесс. Для этого после загрузки с установочного носителя придется ввести всего три команды. Пример для дистрибутива Ubuntu.

    • первая – sudo add-apt-repository ppa^yannubuntu/boot-repair;
    • вторая – sudo apt-get update;
    • третья – sudo apt-get install boot-repair.

    Интересно: иногда пользователи не могут включить камеру на ноутбуке после загрузки операционной системы. Это не значит, что она сломана. Часто все проблемы кроются в программном обеспечении.

    Загрузка системы

    1. На корневом разделе находятся файлы ядра.

    Для примера, корневой раздел (hd0,msdos5), ему соответствует /dev/sda5 (Для hd1 — sdb)

    set prefix=(hd0,msdos5)/boot/grubset root=(hd0,msdos5)

    linux /boot/vmlinuz-3.13.0-93-generic root=/dev/sda5

    initrd /boot/initrd.img-3.13.0-93-generic

    boot

    3.13.0-93 — версия ядра, я выбираю предпоследнюю из доступных в директории /boot

    2. Файлы ядра находятся на отдельном разделе

    Например, корневой раздел (hd0,msdos5) , раздел с файлами ядра (hd0,msdos1)

    set prefix=(hd0,msdos1)/grub

    set root=(hd0,msdos1)

    linux /boot/vmlinuz-3.13.0-93-generic root=/dev/sda5

    initrd /boot/initrd.img-3.13.0-93-generic

    boot

    Операционная система должна загрузиться.

    Средство для восстановления загрузчика в Windows через bootrec.exe

    И так если у вас не включается Windows, то нам необходимо будет загрузиться с загрузочного диска, или с загрузочной usb флешки, как создавать загрузочную Windows, я писал в статье загрузочная флешка Windows. После загрузки диска или usb флшеки для восстановления, нужно выбрать пункт восстановить. Далее нужно выбрать командную строку.

    Использование командной строки для восстановления загрузчика Windows

    Здесь в командной строке, нужно ввести команду bootrec.exe, как видите после ввода этой команды у нас появляются еще четыре команды с описаниями.

    Командная строка и утилита bootrec.exe

    The Root Terminal

    Boot Root Shell Ubuntu Recovery

    Many problems can only be solved as root, and they require more manual intervention than what the default options in the recovery menu provide. When it looks like you’re dealing with one of these cases, select “Drop to root shell prompt” to boot into a root terminal.

    Remount Your Drives As Root On Ubuntu

    As soon as you select it, you’ll see the bottom of your screen switch to a terminal and log in as root. Before you can do much, you’re going to need to remount the root partition of your drive. By default, it’s mounted read-only for safety purposes, but you’ll probably need to modify something to fix whatever issue’s going on. To remount it with write permissions, run the following command.

    If you have additional partitions you need to work on, you’ll need to remount them as well. That includes when your “/home” directory is on a separate partition. You can remount them all at once simply with:

    Now you’re ready to dig around in your system and resolve the problem that’s preventing you from booting normally. You’ll have access to everything on your system as root, so be careful not to damage anything in the process. Making backups, even just copies of the files you modify, is a great idea. Once you’ve uncovered and remedied the problem, reboot your system and boot normally.

    Ручная правка загрузчика Grub для загрузки в режим восстановления

    Однако, может случится и так, что в меню Grub отсутствует пункт загрузки в режиме восстановления. В таком случае, придется самостоятельно изменить параметры загрузки Grub. Для этого:

    1. В меню Grub выбираем строку, соответствующую загрузке Linux в нормальном режиме (должна быть самой первой в списке), и нажимаем клавишу e .
    2. Откроется редактирование параметров загрузки дистрибутива Linux. Здесь нужно найти строку, начинающуюся с linux , после чего перейти в её конец — сделать это проще всего с помощью клавиши End или комбинации клавиш Ctrl + E . Затем, в эту строку следует вписать вписать systemd.unit=emergency.target .
    3. После этого нажать комбинацию Ctrl + X для загрузки системы — и если предыдущая команда была написано верно и в нужном месте, то система загрузится в режим восстановления.
Ссылка на основную публикацию
Adblock
detector