[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Próxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
es:howtos:slackware_admin:how_to_chroot_from_media [2019/02/03 20:59 (UTC)] – creado slackwarespanol | es:howtos:slackware_admin:how_to_chroot_from_media [2019/04/06 00:37 (UTC)] – [Chroot para los medios de instalacion] antares_alf | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | ||
- | ====== Chroot From Installation Media ====== | ||
- | Slackware is full of tools that can help when the system becomes unstable and cannot boot. One example is upgrading the kernel image and forgetting to run lilo afterwards. | ||
- | In order to gain access to your system without booting directly to it, it is possible to use an installation media such as Slackware CD1 or the DVD. Once the installation media loads and starts, you can change the media' | ||
- | |||
- | ===== Volume Preparation ===== | ||
- | <note important> | ||
- | |||
- | In the simplest of examples, a single hard disk was partitioned locally, normally and it is not encrypted in any way. In this case, all you need to do is to make sure what is the partition' | ||
- | |||
- | If this is not the case, and you are using LVM/EVMS or an encrypted volume you will need to prepare the volumes before you can mount and chroot into them: | ||
- | |||
- | To unlock your LUKS partition, you will need to ' | ||
- | |||
- | < | ||
- | |||
- | At this point you will be prompted to insert the pass-phrase to unlock the volume. This partition will be mapped to '/ | ||
- | |||
- | For LVM volumes you need to make sure that the system can recognize and activate the volume. This is done by running the commands: | ||
- | * '' | ||
- | * '' | ||
- | * If more than one group was found, you can select which one to activate with '' | ||
- | |||
- | ===== Volume Mounting ===== | ||
- | After the preparation stage we can continue to mount the volume(s). You can use ''/ | ||
- | | ||
- | After we make sure which partitions are needed, we need to mount them: | ||
- | |||
- | < | ||
- | Here are 3 common examples. | ||
- | |||
- | 1. The first is just a simple installation with everything installed under / mounted under /dev/sda1. No LVM or additional drives. | ||
- | |||
- | < | ||
- | |||
- | 2. In the next example we have two drives. The user has set up his or her Slackware system to use /dev/sdb1 for /home and /dev/sda1 for everything else. | ||
- | |||
- | < | ||
- | mount /dev/sda1 /mnt | ||
- | mount /dev/sdb1 / | ||
- | |||
- | 3. For the third example the user has used LVM and has already made their volume group known to the kernel. The user is using the logical volumes "root, usr, home, opt, var, srv" all under one volume group labeled " | ||
- | |||
- | < | ||
- | mount /dev/sda1 /mnt/boot | ||
- | mount / | ||
- | mount / | ||
- | mount / | ||
- | mount / | ||
- | mount / | ||
- | mount / | ||
- | |||
- | We could have also used a for loop for everything except /boot (/dev/sda1) and / (/ | ||
- | < | ||
- | do | ||
- | mount / | ||
- | done | ||
- | </ | ||
- | |||
- | Next, we need to prepare three virtual directories to be used by the environment. Those are ''/ | ||
- | |||
- | < | ||
- | mount -o bind /proc /mnt/proc | ||
- | mount -o bind /sys / | ||
- | |||
- | ===== Chrooting ===== | ||
- | Once the partition is mounted, we can chroot to it: | ||
- | | ||
- | < | ||
- | | ||
- | <note important> | ||
- | | ||
- | The bash prompt that you see here is a bash prompt started on your system. You can now work on this environment naturally. For example editing ''/ | ||
- | ====== Sources ====== | ||
- | <!-- If you are copying information from another source, then specify that source --> | ||
- | <!-- * Original source: [[http:// | ||
- | <!-- Authors are allowed to give credit to themselves! --> | ||
- | * Originally written by [[wiki: | ||
- | * LVM and LUKS information comes primarily from [[wiki: | ||
- | <!-- * Contributions by [[wiki: | ||
- | |||
- | <!-- Please do not modify anything below, except adding new tags.--> | ||
- | <!-- You must remove the tag-word " | ||
- | {{tag> |