[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.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:slackware_admin:how_to_chroot_from_media [2015/06/25 13:10 (UTC)] – [Volume Preparation] Removed a useless dot after </code> didierspaier | howtos:slackware_admin:how_to_chroot_from_media [2023/10/25 13:38 (UTC)] (current) – [Chrooting] peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | ||
====== Chroot From Installation Media ====== | ====== 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. | + | 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 '' |
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' | 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' | ||
Line 10: | Line 10: | ||
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' | 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: | + | 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 ' | To unlock your LUKS partition, you will need to ' | ||
Line 44: | Line 44: | ||
< | < | ||
- | mount /dev/sda1 /mnt/boot | ||
mount / | mount / | ||
- | mount / | + | mount / |
mount / | mount / | ||
- | mount / | + | mount / |
- | mount / | + | mount / |
- | mount / | + | mount / |
+ | mount / | ||
We could have also used a for loop for everything except /boot (/dev/sda1) and / (/ | We could have also used a for loop for everything except /boot (/dev/sda1) and / (/ | ||
Line 61: | Line 61: | ||
Next, we need to prepare three virtual directories to be used by the environment. Those are ''/ | 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 /proc /mnt/proc | ||
- | mount -o bind /sys / | + | mount -o bind /sys / |
===== Chrooting ===== | ===== Chrooting ===== | ||
Line 72: | Line 72: | ||
<note important> | <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 | + | The bash prompt that you see here is a bash prompt started on the actual |
+ | |||
+ | For example | ||
+ | * run the command ''/ | ||
+ | * edit the file ''/ | ||
+ | * run the command''/ | ||
+ | If the system | ||
+ | * repair elilo consecutive to a kernel upgrade, often we forget to re-generate | ||
+ | * mount the efi partition to ''/ | ||
+ | * run the command ''/ | ||
+ | * use the kernel version applicable to your system | ||
+ | * run '' | ||
====== Sources ====== | ====== Sources ====== | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |