LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware-current on OpenVZ[SOLVED] (https://www.linuxquestions.org/questions/slackware-14/slackware-current-on-openvz%5Bsolved%5D-4175642049/)

camerabambai 11-09-2018 12:58 PM

Slackware-current on OpenVZ[SOLVED]
 
I follow this how-to

https://wiki.openvz.org/Slackware_template_creation

Works fine and start container..but only the first time.

Because after remove it,and recreate with

Code:

vzctl create 101 --ostemplate slackware-15-x86_64-minimal
it fail with

Code:

Mount image: /vz/private/101/root.hdd
Container is mounted
Setting permissions for image=/vz/private/101/root.hdd
Failed to mount devtmpfs: No such file or directory
Unmount image: /vz/private/101/root.hdd
Container is unmounted
Failed to start the Container

I have check the /etc/rc.d and devtmpfs is present in those lines
of rc.S and rc.M

Code:

# Run rc.udev again.  This will start udev if it is not already running
# (for example, upon return from runlevel 1), otherwise it will trigger it
# to look for device changes and to generate persistent rules if needed.
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then
  if ! grep -wq nohotplug /proc/cmdline ; then
    if [ -x /etc/rc.d/rc.udev ]; then
      /bin/sh /etc/rc.d/rc.udev start
    fi
  fi
fi

I have tried first with an empty fstab,then with an fstab with those lines

Code:

devpts                                      /dev/pts              devpts      gid=5,mode=620  0  0
tmpfs                                      /dev/shm              tmpfs      defaults        0  0

I tried also without a fstab
But same error.
OpenVZ is 7.0.8

ponce 11-09-2018 01:34 PM

that guide is super-old: today you are most probably better with Alien Bob's script.

last time I tested it was when 14.1 was stable, it might be that you have to substitute the SL_PKGLIST variable inside with a list of packages like the one inside the lxc template for current (YMMV)
Code:

aaa_base
aaa_elflibs
aaa_terminfo
bash
bin
bzip2
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
libtasn1
libunistring
logrotate
mpfr
net-tools
nettle
network-scripts
ncurses
openssh
openssl-solibs
p11-kit
pkgtools
procps-ng
sed
shadow
sharutils
slackpkg
sysklogd
sysvinit
sysvinit-functions
sysvinit-scripts
tar
util-linux
wget
which
xz


camerabambai 11-09-2018 01:35 PM

Solution found..bad tar in howto,this line is not correct

Code:

tar czf /vz/template/cache/slackware-10.2-i486-minimal.tar.gz /vz/private/777/
because tar must contain a root /,not a vz/private/777/

the correct line is

Code:

cd /vz/private/777/
tar -cvf /vz/template/cache/slackware-15-x86_64-minimal.tar.gz *



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