SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That worked. I didn't need to make any changes to pam_securetty in order to get it installed and apparently working. So to summarize, the following 4 packages need to be added to the list:
cracklib
libpwquality
libtirpc
pam
also some others, like libpsl and pcre2, as the newer wget links to them: if you don't add them you will have issues adding stuff later to the container OS via slackpkg.
also some others, like libpsl and pcre2, as the newer wget links to them: if you don't add them you will have issues adding stuff later to the container OS via slackpkg.
I haven't added those ones, and slackpkg is downloading new packages just fine.
I just tested it and I spotted an issue with pam_securetty (as we seem to login from pts/0 using lxc-console): you can check if this is solves your issue editing /etc/securetty in the container (allowing login from pts)
Code:
sed -i "s|^#pts|pts|" $ROOT/etc/securetty
you should also have related errors in /var/log/secure if this is the case...
I ignored this.
I edited /usr/share/lxc/templates/lxc-slackware replacing the list of packages with the below. I managed to create
a new container sucefully:
lxc-create -n test -t slackware
Quote:
regarding the packages template for the container this is the new one I used here
it can be in your case that just libtirpc is needed.
Here things get a little odd...
Quote:
BTW, here you can find a new version of the build script with the new template and the new init scripts (synced with the ones from Slackware current as today)
I downloaded this and ran the slackbuild and upgraded to this new version. I think I had sucess creating a new container, maybe not. However, if I try now I get, from a similar command
Code:
lxc-create -n slc-base-20200629 -t slackware
...
Snip many lines.
...
xz-5.2.5-x86_64-1: compression utility based on the LZMA algorithm ........................................................... [1.2M]
Searching for NEW configuration files
No .new files found.
Configuring...
Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
cp: cannot stat '/usr/share/lxc/scripts/slackware/*': No such file or directory
Error creating container slc-base-20200629
bash-5.0$ ls -al /usr/share/lxc/scripts/slackware/
total 0
drwxr-xr-x 1 root root 0 Jun 29 21:00 .
drwxr-xr-x 1 root root 18 Jun 29 21:00 ..
Looks like an incomplete installation of LXC on the host. Normally, there should be modified rc.* scripts for the conainer, at least that is the case in 14.2. Try following ponce's link ponce.cc/slackware/testing/lxc. These scripts should reside in /usr/share/lxc/scripts/slackware/. Copy them to that destination or better yet, try reinstalling the LXC package.
PS: Make sure that you downloaded all files in the linked destination.
Looks like an incomplete installation of LXC on the host. Normally, there should be modified rc.* scripts for the conainer, at least that is the case in 14.2. Try following ponce's link ponce.cc/slackware/testing/lxc. These scripts should reside in /usr/share/lxc/scripts/slackware/. Copy them to that destination or better yet, try reinstalling the LXC package.
PS: Make sure that you downloaded all files in the linked destination.
Thanks due to yourself and ponce. It looks like I need to read up a little more on wget as the contents of scripts on ponce's link were not downloaded. I've now fixed that and rebuilt the slackbuild:
if anyone is feeling adventurous (well, actually is not that necessary as it seems to work smoothly) I'm also testing since a while the newer lxc versions, first 3.x and then 4.x (supported until 2025): you can find the interested SlackBuild here
note that the syntax in the container config changes a little: the template is adapted accordingly, there's an example of config for passing to lxc-create and there's also a README with some pointers.
MIRROR=file://home/user/slackware lxc-create -n slack64cur -t slackware -f /home/user/lxcslack.conf
.... <cut installing packages> ....
Searching for NEW configuration files
No .new files found.
Configuring...
Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
BAD PASSWORD: The password is shorter than 6 characters
Root default password is 'root', please change it!
Copying rootfs to /var/lib/lxc/slack64cur/rootfs...
Because that is the default location. If you want to install somewhere else you need to use the -P option.
From the manpage:
Code:
-P, --lxcpath=PATH
Use an alternate container path. The default is /var/lib/lxc.
Yes, but then you have to supply that path any time you try to run an lxc command for that container. It's better to just change it in the configuration file if you want it to be permanent.
Sorry about that, it was late and I did not realize that you wanted to permanently change the default for all containers. I use a mix of privileged and unprivileged containers and use the default location for the privileged ones and the -P for the unprivileged containers, so I am biased towards the -P option.
Quote:
Originally Posted by Olek
Now that I have corrected the entry in my file /etc/lxc/lxc.conf
from
Code:
lxcpath =
to
Code:
lxc.lxcpath =
containers are saved in the correct directory.
Yes, and it is documented in lxc.system.conf*, in case you need more options:
Code:
lxc.system.conf(5) lxc.system.conf(5)
NAME
lxc.system.conf - LXC system configuration file
DESCRIPTION
The system configuration is located at /etc/lxc/lxc.conf or ~/.con‐
fig/lxc/lxc.conf for unprivileged containers.
This configuration file is used to set values such as default lookup
paths and storage backend settings for LXC.
CONFIGURATION PATHS
lxc.lxcpath
The location in which all containers are stored.
lxc.default_config
The path to the default container configuration.
...
* using Slackware 14.2, I assume it is the same location for -current.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.