LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-29-2020, 04:00 PM   #16
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,481

Rep: Reputation: Disabled

Quote:
Originally Posted by montagdude View Post
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.

Last edited by ponce; 06-29-2020 at 04:01 PM.
 
Old 06-29-2020, 04:03 PM   #17
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Quote:
Originally Posted by ponce View Post
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.
 
Old 06-29-2020, 04:08 PM   #18
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,481

Rep: Reputation: Disabled
Quote:
Originally Posted by montagdude View Post
I haven't added those ones, and slackpkg is downloading new packages just fine.
yes, that happens maybe because I included them in the template some time ago but the libraries have been bundled in aaa_elflibs too since then.
 
Old 06-29-2020, 04:27 PM   #19
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
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
Code:
aaa_base
aaa_elflibs
aaa_terminfo
bash
bin
bzip2
cracklib
coreutils
cyrus-sasl
db48
dcron
dhcpcd
dialog
diffutils
e2fsprogs
elfutils
elvis
etc
eudev
findutils
gawk
glibc-solibs
gnupg
gnutls
grep
gzip
iproute2
iputils
kmod
libcap-ng
libffi
libmnl
libpsl
libpwquality
libtasn1
libtirpc
libunistring
logrotate
mpfr
net-tools
nettle
network-scripts
ncurses
openssh
openssl-solibs
pam
pcre2
p11-kit
pkgtools
procps-ng
sed
shadow
sharutils
slackpkg
sysklogd
sysvinit
sysvinit-functions
sysvinit-scripts
tar
util-linux
wget
which
xz
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)

http://ponce.cc/slackware/testing/lxc/
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
 
Old 06-29-2020, 04:29 PM   #20
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by petejc View Post

cp: cannot stat '/usr/share/lxc/scripts/slackware/*': No such file or directory
Error creating container slc-base-20200629
[/code]
For completeness:

Code:
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 ..
 
Old 06-29-2020, 05:32 PM   #21
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,920

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Quote:
Originally Posted by petejc View Post
For completeness:

Code:
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.

Last edited by crts; 06-29-2020 at 05:35 PM.
 
Old 06-30-2020, 01:49 AM   #22
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by crts View Post
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:

Code:
tar tf /tmp/lxc-2.0.11_fad08f383-x86_64-5.txz | grep scripts
usr/share/lxc/scripts/
usr/share/lxc/scripts/slackware/
usr/share/lxc/scripts/slackware/rc.6.lxc
usr/share/lxc/scripts/slackware/rc.M.lxc
usr/share/lxc/scripts/slackware/rc.S.lxc
usr/share/lxc/scripts/slackware/rc.inet1.lxc
I've not time to test now. Will test later.
 
Old 06-30-2020, 01:56 AM   #23
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,481

Rep: Reputation: Disabled
you can use lftp to clone the directory, like
Code:
lftp -c mirror http://ponce.cc/slackware/testing/lxc/
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

http://ponce.cc/slackware/testing/lxc_new/

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.

Last edited by ponce; 06-30-2020 at 02:07 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] new rc.* scripts added to -current in LXC container linuxtinker Slackware 1 06-16-2018 10:24 AM
[SOLVED] "lxc list" vs "lxc-ls" yknivag Linux - Virtualization and Cloud 1 03-09-2017 05:53 AM
Creating a CentoS 7 LXC container in an EC2 instance PeterSteele Linux - Virtualization and Cloud 2 08-12-2015 08:25 AM
script to get a lxc-container like iso of current. cod_liver_0il Slackware 1 09-10-2012 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration