LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-15-2013, 06:23 PM   #1
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
[LXC] Slackware 14.1 rc1 - Upgraded host & container


I've recently converted from running KVM accelerated QEMU guests to LXC containers. I'm running a few containers on my servers and really like the speed and reduced resource usage.

I used the templates provided by ponce on his website http://slackware.ponce.cc/blog/?s=lxc&searchsubmit= to upgrade 1 host and 1 container from slackware64-current 14.1 beta to 14.1 rc1.

After upgrading I've run into changes that have thrown me for a loop. Below is start up output from a non-upgraded container and the upgraded container using the command "screen -S my_name lxc-start -n container_name". Seems like there are changes I need to take into account but need some guidance.

I suspect, at a minimum, there are changes to be made to the rootfs/config file and maybe even the container's fstab but I don't know enough about LXC yet to figure this out.

slackware64-current / 14.1 beta - not upgraded yet

Code:
INIT: version 2.88 booting
Using /etc/random-seed to initialize /dev/urandom.
INIT: Entering runlevel: 3
Going multiuser...
Updating shared library links:  /sbin/ldconfig &
Starting sysklogd daemons:  /usr/sbin/syslogd /usr/sbin/klogd -c 3 -x
Starting RPC portmapper:  /sbin/rpc.portmap
Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd
Starting OpenSSH SSH daemon:  /usr/sbin/sshd
none on /dev/shm type tmpfs (rw)
Starting dnsmasq:  /usr/sbin/dnsmasq
Starting sendmail MTA daemon:  /usr/sbin/sendmail -L sm-mta -bd -q25m
Starting sendmail MSP queue runner:  /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m

* container my_name started. *
slackware64-current / 14.1 rc1 - after upgrade

Code:
INIT: version 2.88 booting
tmpfs on /run type tmpfs (rw,mode=0755)
mount: cgroup already mounted or /sys/fs/cgroup busy
Setting system time from the hardware clock (UTC): hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
Tue Oct 15 15:58:27 MDT 2013
Testing root filesystem status:  read-write filesystem

*** ERROR: Root partition has already been mounted read-write. Cannot check!

For filesystem checking to work properly, your system must initially mount
the root partition as read only. Please modify your kernel with 'rdev' so that
it does this. If you're booting with LILO, add a line:

   read-only

to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it.

If you boot from a kernel on a floppy disk, put it in the drive and type:
   rdev -R /dev/fd0 1

If you boot from a bootdisk, or with Loadlin, you can add the 'ro' flag.

This will fix the problem *AND* eliminate this annoying message. :^)

Press ENTER to continue.
mount: can't find / in /etc/fstab or /etc/mtab
Checking non-root filesystems:
fsck from util-linux 2.21.2
Mounting non-root local filesystems:
none on /dev/shm type tmpfs (rw)
Using /etc/random-seed to initialize /dev/urandom.
INIT: Entering runlevel: 3
Going multiuser...
Updating shared library links:  /sbin/ldconfig &
setterm: $TERM is not defined.
Starting sysklogd daemons:  /usr/sbin/syslogd /usr/sbin/klogd -c 3 -x
Starting RPC portmapper:  /sbin/rpc.portmap
Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd
Starting OpenSSH SSH daemon:  /usr/sbin/sshd
/etc/rc.d/rc.nfsd: line 22: /sbin/modprobe: No such file or directory
Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd
Starting NFS server daemons:
  /usr/sbin/exportfs -r
  /usr/sbin/rpc.nfsd 8
  /usr/sbin/rpc.mountd
Starting sendmail MTA daemon:  /usr/sbin/sendmail -L sm-mta -bd -q25m
Starting sendmail MSP queue runner:  /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m

* container my_name started. *
 
Old 10-16-2013, 12:06 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
the container creation template patches $ROOT/etc/rc.d/rc.S, $ROOT/etc/rc.d/rc.M and $ROOT/etc/rc.d/rc.6 to allow a clean boot inside of a container: what happened to you is that probably you have overwritten these patched versions when you upgraded your system (sysvinit-scripts has been updated too in the latest days).
if you have a container that still got the old versions of these files the faster solution is to simply overwrite the new ones of the upgraded container with the old taken from there.

maybe I should write a notice about this for who, like you, is willing to use it with -current containers, thanks for the report
officially the template supports 14.0 containers (because the minimal template could also change during -current development cycle) and I've not tested yet with 14.1 ones, but I'll do it soon.

Last edited by ponce; 10-16-2013 at 12:14 AM.
 
1 members found this post helpful.
Old 10-16-2013, 05:45 AM   #3
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by ponce View Post
the container creation template patches $ROOT/etc/rc.d/rc.S, $ROOT/etc/rc.d/rc.M and $ROOT/etc/rc.d/rc.6 to allow a clean boot inside of a container: what happened to you is that probably you have overwritten these patched versions when you upgraded your system (sysvinit-scripts has been updated too in the latest days).
Thanks ponce! That's exactly what happened. I run daily rsnapshots of /etc so the original patched versions of rc.6/rc/M/rc.S where within easy reach. I replaced the files and the container boots as expected again.

I took a look through the /var/lib64/lxc/templates/lxc-slackware as saw the rc.d patches used during lxc-create. I learned a bit more about LXC which makes this a good day.

Now I'm off to understand container memory restrictions. My initial searching tells me it's a cgroup kernel option which is not set in Slackware kernels: # CONFIG_MEMCG is not set. Setting those options is reported to add 15MB to the kernel size which is a lot for non-cgroup users.
 
Old 10-16-2013, 05:58 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
I'm not using any memory restrictions ATM (I have my containers on machines with 16/48Gb of RAM), so please report back
 
  


Reply



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
LXC Container: sound Not working charlie101 Linux - Virtualization and Cloud 11 04-14-2020 01:15 AM
How to use Local ISO for LXC Container? sunveer Linux - Software 0 10-04-2013 04:44 AM
[SOLVED] Outputting X display from inside an LXC Container charlie101 Linux - Virtualization and Cloud 1 02-04-2013 09:41 PM
script to get a lxc-container like iso of current. cod_liver_0il Slackware 1 09-10-2012 11:12 AM
How to end a Linux Container (LXC) from within? Skaperen Linux - Virtualization and Cloud 0 06-14-2011 09:37 AM

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

All times are GMT -5. The time now is 04:20 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
Open Source Consulting | Domain Registration