[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.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:general_admin:setting_up_a_slackware_chroot [2015/10/29 06:44 (UTC)] – Added fstab section. duganhowtos:general_admin:setting_up_a_slackware_chroot [2020/09/12 04:21 (UTC)] dive
Line 16: Line 16:
 == 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 ==
Line 48: Line 48:
  
 <file> <file>
-/dev             chroot_folder/dev             none bind,auto +/dev             chroot_folder/dev             none bind,auto 0 0 
-/proc            chroot_folder/proc            none bind,auto +/proc            chroot_folder/proc            none bind,auto 0 0 
-/sys             chroot_folder/sys             none bind,auto +/sys             chroot_folder/sys             none bind,auto 0 0 
-/etc/resolv.conf chroot_folder/etc/resolv.conf none bind,auto+/etc/resolv.conf chroot_folder/etc/resolv.conf none bind,auto 0 0
 </file> </file>
  
Line 101: Line 101:
  
 https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh
 +
 +
 +== An alternative way to build other ARCH packages ==
 +
 +Instead of using `ARCH=i686' before running a slackbuild, we can use a program
 +called `setarch', which, among other things, can set the ARCH and the kernel
 +version in the shell.  It has some handy symlinks, such as linux32 or i586,
 +which saves some typing.  The `linux32' command will set the reported kernel's
 +ARCH as `i686'.
 +
 +**SYNOPSIS**
 +<code>
 +  setarch arch [options] [program [argument...]]
 +</code>
 +
 +When we run `linux32' it starts a new shell, so we can also use it to chroot:
 +
 +<code>
 +  chroot /path/to/chroot linux32 /bin/zsh
 +</code>
 +
 +or it could be run after chrooting into our new root.  Settings will revert to
 +normal when we exit the new shell.  One useful option is to change the kernel's
 +reported version:
 +
 +<code>
 +  chroot /path/to/chroot linux32 --uname-2.6 /bin/zsh
 +</code>
 +
 +That `--uname-2.6' isn't a typo, there has to be a dash between the flag and
 +the version.  The setarch(8) man page shows all the options.
 +
 +--
 +Dave
  
 ====== Sources ====== ====== Sources ======
Line 112: Line 146:
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
 {{tag>howtos}} {{tag>howtos}}
 +
 howtos:general_admin:setting_up_a_slackware_chroot ()