This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
использование_загрузчика_grub [2011/02/10 13:39] val |
использование_загрузчика_grub [2013/05/22 13:50] 127.0.0.1 внешнее изменение |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Grub 2 ===== | ===== Grub 2 ===== | ||
- | [[https://help.ubuntu.com/community/Grub2]] | + | ==== Управление параметрами ядра при загрузке ==== |
- | + | ||
- | ==== Восстановление утерянного пароля ==== | + | |
<code> | <code> | ||
- Power up your computer. | - Power up your computer. | ||
Line 12: | Line 10: | ||
- Press **e** for edit. | - Press **e** for edit. | ||
- Highlight the line that begins “linux ...” | - Highlight the line that begins “linux ...” | ||
- | - Go to the end of this line, add **single** | + | - Go to the end of this line, add **parameter** |
- Press **Ctrl-x** to boot your system. | - Press **Ctrl-x** to boot your system. | ||
- Your system will boot up to a passwordless root shell. | - Your system will boot up to a passwordless root shell. | ||
- | - Type in **passwd username** where username is the username you lost the password for. | + | - Type in **passwd username** where username is the username you lost the |
+ | |||
+ | password for. | ||
- Set your password. | - Set your password. | ||
- Type in reboot. | - Type in reboot. | ||
</code> | </code> | ||
- | ==== Проблема "черного экрана" ==== | + | ==== Управление параметрами ядра в конфигурации GRUB ==== |
+ | |||
+ | === Ubuntu === | ||
+ | [[https://help.ubuntu.com/community/Grub2]] | ||
+ | |||
+ | [[https://help.ubuntu.com/community/WindowsDualBoot]] | ||
+ | <code> | ||
+ | # cat /etc/default/grub | ||
+ | ... | ||
+ | GRUB_CMDLINE_LINUX_DEFAULT="quiet" | ||
+ | ... | ||
+ | |||
+ | # update-grub | ||
+ | </code> | ||
+ | |||
+ | ==== Варианты использования изменения параметров ядра ==== | ||
+ | |||
+ | === Восстановление утерянного пароля === | ||
+ | Добавить в параметры загружаемого ядра | ||
+ | <code> | ||
+ | init=/bin/bash | ||
+ | </code> | ||
+ | После загрузки | ||
+ | <code> | ||
+ | # mount -o remount,rw / | ||
+ | # passwd | ||
+ | </code> | ||
+ | |||
+ | === Проблема "черного экрана" === | ||
Добавить в параметры загружаемого ядра | Добавить в параметры загружаемого ядра | ||
<code> | <code> | ||
nomodeset | nomodeset | ||
+ | </code> | ||
+ | |||
+ | === Отображение процесса загрузки === | ||
+ | Убрать из параметров загружаемого ядра | ||
+ | <code> | ||
+ | quiet | ||
</code> | </code> | ||
Line 34: | Line 68: | ||
- Press **e** for edit. | - Press **e** for edit. | ||
- Highlight the line that begins “Ubuntu, KERNEL ………” and press **e**. | - Highlight the line that begins “Ubuntu, KERNEL ………” and press **e**. | ||
- | - Go to the end of this line, add **rw init=/bin/bash** or add **single** and press enter. | + | - Go to the end of this line, add **rw init=/bin/bash** or add **single** and |
+ | |||
+ | press enter. | ||
- Press **b** to boot your system. | - Press **b** to boot your system. | ||
- Your system will boot up to a passwordless root shell. | - Your system will boot up to a passwordless root shell. | ||
- | - Type in **passwd username** where username is the username you lost the password for. | + | - Type in **passwd username** where username is the username you lost the |
+ | |||
+ | password for. | ||
- Set your password. | - Set your password. | ||
- Type in reboot. | - Type in reboot. | ||
Line 58: | Line 96: | ||
title Ubuntu | title Ubuntu | ||
root (hd0,1) | root (hd0,1) | ||
- | kernel /boot/vmlinuz-2.6.24-16-server root=UUID=08931346-445f-4a43-b136-dcb96397b8c6 ro quiet splash | + | kernel /boot/vmlinuz-2.6.24-16-server |
+ | |||
+ | root=UUID=08931346-445f-4a43-b136-dcb96397b8c6 ro quiet splash | ||
initrd /boot/initrd.img-2.6.24-16-server | initrd /boot/initrd.img-2.6.24-16-server | ||
savedefault | savedefault |