[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 revisionNext revisionBoth sides next revision | ||
howtos:general_admin:setting_up_a_slackware_chroot [2015/04/09 05:50 (UTC)] – add heading aaditya | howtos:general_admin:setting_up_a_slackware_chroot [2020/09/12 04:21 (UTC)] – dive | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Setting up a Slackware chroot === | + | ==== Setting up a Slackware chroot |
- | //Goal:// I wanted | + | There are multiple reasons why you might want to set up a Slackware chroot: |
+ | * building | ||
+ | * building -stable packages on a -current system | ||
+ | * building (and testing) packages for SBo on a clean system | ||
- | == Obtaining | + | For this guide, we'll create |
- | For a 32 bit chroot I downloaded | + | === Obtaining |
- | == Installing the packages == | + | Start with a Slackware installation DVD. Download it from from http:// |
- | Create a folder which will contain | + | === Installing |
- | Mount the installation ISO(s). After they have been mounted the packages in them (found under the // | + | == Automatically == |
- | '' | + | You can create your chroot |
- | '' | + | == Manually == |
- | (additional sets can be installed in a similar way) | + | First, create |
- | == Chroot == | + | <code bash> |
- | After the chroot folder | + | Mount the installation ISO: |
+ | |||
+ | <code bash> | ||
+ | mount -o loop slackware-14.1-install-dvd.iso / | ||
+ | cd / | ||
+ | </ | ||
+ | |||
+ | After the ISO has been mounted, the packages | ||
+ | |||
+ | <code bash> | ||
+ | installpkg --root / | ||
+ | </ | ||
+ | |||
+ | Then unmount the ISO: | ||
+ | |||
+ | <code bash> | ||
+ | umount / | ||
+ | </ | ||
+ | |||
+ | === Mounting the Chroot === | ||
+ | |||
+ | To have the chroot mounted permanently, | ||
+ | |||
+ | < | ||
+ | /dev | ||
+ | /proc chroot_folder/ | ||
+ | /sys | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | If you don't want to reboot at this point, then you can mount the chroot manually: | ||
+ | |||
+ | <code bash> | ||
+ | mount / | ||
+ | </ | ||
+ | |||
+ | Also, refer to: ([[howtos: | ||
+ | |||
+ | === Chrooting into the Chroot === | ||
+ | |||
+ | Now that the chroot is set up, you can chroot into it: | ||
+ | |||
+ | <code bash> | ||
=== Updating packages === | === Updating packages === | ||
- | After that I setup slackpkg and updated | + | After that, you can run slackpkg and update |
- | === Mounting partitions | + | === Exiting |
- | I needed to mount the partition which contained the SlackBuilds for which I wanted to make a package, I used the command: | + | When you're done, exited |
- | '' | + | === One Use: Building 32-bit Packages === |
- | (http:// | + | == Mounting partitions == |
- | Then I built the package | + | 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 / |
- | '' | + | <code bash> |
+ | </code> | ||
- | === Exit and unmounting === | + | (http:// |
- | Finally | + | Then I built the package |
+ | |||
+ | <code bash> | ||
+ | ARCH=i686 ./my_package.SlackBuild< | ||
- | == Links == | + | === Links === |
http:// | http:// | ||
Line 52: | Line 101: | ||
https:// | https:// | ||
+ | |||
+ | |||
+ | == An alternative way to build other ARCH packages == | ||
+ | |||
+ | Instead of using `ARCH=i686' | ||
+ | called `setarch', | ||
+ | version in the shell. | ||
+ | which saves some typing. | ||
+ | ARCH as `i686' | ||
+ | |||
+ | **SYNOPSIS** | ||
+ | < | ||
+ | setarch arch [options] [program [argument...]] | ||
+ | </ | ||
+ | |||
+ | When we run `linux32' | ||
+ | |||
+ | < | ||
+ | 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 | ||
====== Sources ====== | ====== Sources ====== | ||
Line 63: | Line 146: | ||
<!-- You must remove the tag-word " | <!-- You must remove the tag-word " | ||
{{tag> | {{tag> | ||
+ |