Enjoy Slackware 15.0!
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howtos:general_admin:setting_up_a_slackware_chroot [2015/11/09 12:56 (UTC)] dugan |
howtos:general_admin:setting_up_a_slackware_chroot [2020/11/16 12:54 (UTC)] (current) aaditya [See also] fix formatting |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Setting up a Slackware chroot ==== | + | ===== Setting up a Slackware chroot |
There are multiple reasons why you might want to set up a Slackware chroot: | There are multiple reasons why you might want to set up a Slackware chroot: | ||
Line 8: | Line 8: | ||
For this guide, we'll create a chroot at **/ | For this guide, we'll create a chroot at **/ | ||
- | === Obtaining a Slackware installation of your desired architecture === | + | ==== Obtaining a Slackware installation of your desired architecture |
Start with a Slackware installation DVD. Download it from from http:// | Start with a Slackware installation DVD. Download it from from http:// | ||
- | === Installing the packages === | + | ==== Installing the packages |
- | == Automatically == | + | === Automatically |
- | You can create your chroot and install Slackware into it using the following elegant script: [[http://dawoodfall.net/files/scripts/bash/mkchroot]] | + | You can create your chroot and install Slackware into it using the following elegant script: [[http://tty1.uk/scripts/slackware/mkchroot]] |
- | == Manually == | + | === Manually |
First, create a folder which will contain the chroot: | First, create a folder which will contain the chroot: | ||
Line 43: | Line 43: | ||
</ | </ | ||
- | === Mounting the Chroot | + | === Setting up required files === |
- | To have the chroot mounted permanently, | + | == fstab == |
+ | |||
+ | The following minimal snippet can be used for /// | ||
+ | |||
+ | < | ||
+ | # <file system> <mount point> | ||
+ | tmpfs / | ||
+ | devpts | ||
+ | sysfs / | ||
+ | proc /proc | ||
+ | </ | ||
+ | |||
+ | ==== Entering the Chroot ==== | ||
+ | |||
+ | === Automatic mount === | ||
+ | |||
+ | To have the chroot mounted permanently, | ||
< | < | ||
Line 54: | Line 70: | ||
</ | </ | ||
- | If you don't want to reboot | + | And reboot. Then run the following command to mount the chroot |
<code bash> | <code bash> | ||
Line 60: | Line 76: | ||
</ | </ | ||
- | Also, refer to: ([[howtos: | + | === Manual mount === |
- | === Chrooting into the Chroot === | + | Refer to: ([[howtos: |
- | Now that the chroot is set up, you can chroot into it: | + | === Entering the Chroot === |
+ | |||
+ | Now that the chroot is set up, one can chroot into it: | ||
<code bash> | <code bash> | ||
+ | |||
+ | **Note** | ||
+ | |||
+ | Wrote a small script to automate the chroot steps. | ||
+ | |||
+ | https:// | ||
=== Updating packages === | === Updating packages === | ||
Line 76: | Line 100: | ||
When you're done, exited the chroot by pressing //Ctrl+d//. | When you're done, exited the chroot by pressing //Ctrl+d//. | ||
- | === One Use: Building 32-bit Packages === | + | ==== Usecase: Building 32-bit Packages |
- | == Mounting partitions == | + | === Mounting partitions |
I use a chroot to build 32-bit packages on a 64-bit system. I needed to mount the partition which contained the SlackBuilds for which I wanted to make a package, As my Slackware host mount point is (in this example) at / | I use a chroot to build 32-bit packages on a 64-bit system. I needed to mount the partition which contained the SlackBuilds for which I wanted to make a package, As my Slackware host mount point is (in this example) at / | ||
Line 92: | Line 116: | ||
ARCH=i686 ./ | ARCH=i686 ./ | ||
- | === Links === | + | === An alternative way to build other ARCH packages |
- | http://www.linuxquestions.org/ | + | Instead of using `ARCH=i686' |
+ | called `setarch', | ||
+ | version in the shell. It has some handy symlinks, such as linux32 or i586, | ||
+ | which saves some typing. | ||
+ | ARCH as `i686'. | ||
- | == Notes == | + | **SYNOPSIS** |
+ | < | ||
+ | setarch arch [options] [program [argument...]] | ||
+ | </ | ||
- | Wrote a small script | + | When we run `linux32' |
- | https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh | + | < |
+ | chroot / | ||
+ | </ | ||
+ | |||
+ | or it could be run after chrooting into our new root. Settings will revert to | ||
+ | normal when we exit the new shell. | ||
+ | reported version: | ||
+ | |||
+ | < | ||
+ | chroot / | ||
+ | </ | ||
+ | |||
+ | That `--uname-2.6' | ||
+ | the version. | ||
+ | |||
+ | -- | ||
+ | Dave | ||
+ | |||
+ | ====== See also ====== | ||
+ | |||
+ | * https://wiki.archlinux.org/index.php/Chroot | ||
+ | * http://www.linuxquestions.org/ | ||
====== Sources ====== | ====== Sources ====== | ||
Line 112: | Line 164: | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
{{tag> | {{tag> | ||
+ |