What's the proper way to prepare chroot to recover a broken Linux installation?

Posted by ~quack on Super User See other posts from Super User or by ~quack
Published on 2010-02-20T07:38:57Z Indexed on 2010/03/19 7:51 UTC
Read the original article Hit count: 173

Filed under:
|
|
|
|

This question relates to questions that are asked often. The procedure is frequently mentioned or linked to offsite, but is not often clearly and correctly stated. In an objective to concentrate useful information in one place, this question seeks to provide a clear, correct reference for this procedure.


What are the proper steps to prepare a chroot environment for a recovery procedure?

In many situations, repairing a broken Linux installation is best done from within the installation. But if the system won't boot, how do you fix it from within?

Let's assume you manage to boot into an alternate system. Once there, you need to access your broken installation in order to fix it. Many recovery How-Tos recommend using chroot in order to run programs as if you are actually booted into the broken installation.

  • What is the basic procedure?
  • Are there accepted best-practices to follow?
  • What variables need to be considered in order to adapt the basic preparation steps to a particular recovery task?

As this is Community Wiki, feel free to edit this question to improve it as well.

© Super User or respective owner

Related posts about faq

Related posts about linux