Update rc d error cannot find a lsb script for checkroot sh

User avatar

damn.

Posts: 4
Joined: 2022-03-15 10:35
Has thanked: 1 time

problem with lxc installation on debian bullseye

#1

Post

by damn. » 2022-03-15 10:49

Hi folks,

I just upgraded to the latest stable debian.

while installing a new lxc-container i get these errors:

Code: Select all

update-rc.d: error: cannot find a LSB script for checkroot.sh
update-rc.d: error: cannot find a LSB script for umountfs
Failed to disable unit, unit hwclock.sh.service does not exist.
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
Creating SSH2 RSA key; this may take some time ...
3072 SHA256:k1RcHRbEy6xxxxxxxxxxxxxxefD4E9sjlFoNlaJqi2c root@PSA-SERVER (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:kYgEDG2nyVKqGX+rxxxxxxxxxxxxxx+L7cfPajvIHqkE root@PSA-SERVER (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:ttPbV8BkBqAAvd3UH5pxxxxxxxxxxxxxxxxxYsBc9Asp8 root@PSA-SERVER (ED25519)
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

Current default time zone: 'Etc/UTC'
Local time is now:      Tue Mar 15 10:28:19 UTC 2022.
Universal Time is now:  Tue Mar 15 10:28:19 UTC 2022.

I wonder why it complains about rc.d isn’t that outdated?? I’m not really deep into that but is there a solution to get rid of that error?

when running

I get the following:

Code: Select all

LXC version 4.0.6
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-5.10.0-10-amd64
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled

--- Control groups ---
Cgroups: enabled

Cgroup v1 mount points:


Cgroup v2 mount points:
/sys/fs/cgroup

Cgroup v1 systemd controller: missing
Cgroup v1 freezer controller: missing
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled, loaded
Macvlan: enabled, not loaded
Vlan: enabled, loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_NF_NAT_IPV4: missing
CONFIG_NF_NAT_IPV6: missing
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, not loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, loaded

--- Checkpoint/Restore ---
checkpoint restore: enabled
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities:

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

I don’t know what the problem is in general… maybe some of the experienced debian users can help me out to solve this??

thanks in advance for your answers ;)

cheers, Dan


User avatar

fabien

Posts: 190
Joined: 2019-12-03 12:51
Location: Toulouse, France
Has thanked: 13 times
Been thanked: 31 times

Re: problem with lxc installation on debian bullseye

#2

Post

by fabien » 2022-03-15 20:16

I don’t know nothing about lxc-container but I think your intuition is right: the installer is probably complaining about something outdated. It’s pretty common to see this kind of disturbing messages, just ignore them, there is no actual error, is it? All seems to be OK when you launch lxc-checkconfig.
checkroot.sh and umountfs are parts of initscripts, needed by sysvinit-core. It’s absolutely normal that they are not installed on a standard installation.
Of course an lxc-container user should confirm this.


User avatar

damn.

Posts: 4
Joined: 2022-03-15 10:35
Has thanked: 1 time

Re: problem with lxc installation on debian bullseye

#3

Post

by damn. » 2022-03-16 19:25

Hi Fabian,

hm, lxc checkconfig complains about Cgroup v1

Code: Select all

Cgroup v1 systemd controller: missing
Cgroup v1 freezer controller: missing

and CONFIG_NF_NAT

Code: Select all

CONFIG_NF_NAT_IPV4: missing
CONFIG_NF_NAT_IPV6: missing

My fear is that something network related couldn’t be configured as expected from lxc. And maybe this would affect the container creation.
I don’t know …I’m not that experienced to make any state about this behavior…

But I thought, I would have to configure something system related to be able to properly add new containers.

maybe anyone else here with lxc-experience? it looks like a script or something that creates the containers has outdated entries, but I don’t know where to start searching to be honest…

Is there any relation between Cgroup and rc.d?? And another question is if update-rc.d cannot find these LSB scripts aren’t there some things left unconfigured to run lxc-container properly?

cheers, Dan


User avatar

fabien

Posts: 190
Joined: 2019-12-03 12:51
Location: Toulouse, France
Has thanked: 13 times
Been thanked: 31 times

Re: problem with lxc installation on debian bullseye

#4

Post

by fabien » 2022-03-16 22:44

Unfortunately it looks like no lxc user is in the vicinity for now. But don’t underestimate your capacity to find out by yourself. There is a lot of documentation that can lead you on the right path. I took a look at the Linux Containers website (‘apt show lxc’ gave me the link) and at the bottom of this page you can find links to distributions documentations. The Debian wiki says that Debian has switched to

the unified hierarchy [which] consists only of CGroup version 2

and that

the unified CGroup hierarchy does not have CGroup V1 device controllers.

Don’t hesitate also to experiment. This can mean installing other distros just for testing, sometimes it helps to understand.
Good luck!


User avatar

damn.

Posts: 4
Joined: 2022-03-15 10:35
Has thanked: 1 time

Re: problem with lxc installation on debian bullseye

#5

Post

by damn. » 2022-03-17 15:11

thanks again Fabien…

I’ll have a look at the links you provided. My main language is german, due to that it’s not so easy for me to describe my problems in english and it’s a little harder for me to understand docs and manpages ;) but I try my best all the time…

I think I have to understand if lxc is capable of using Cgroup v2 without Cgroup v1 or if this is a general conflict between debian and lxc development…

I have to dig a bit deeper ;)

I already read some things about Cgroup, rc.d, and the other warnings, but it turns out that I’m more confused the more I read that’s why I opened this thread…

Thanks and have a nice weekend!


etrask

Posts: 2
Joined: 2022-10-24 00:32
Has thanked: 1 time

Re: problem with lxc installation on debian bullseye

#6

Post

by etrask » 2022-10-24 00:36

Hi damn.

Did you ever find a resolution for this issue? I have been trying to get LXC to behave on a bullseye install and am having what appears to be the same issue.

I have some detailed info on how to recreate the issue, if it would help anyone with troubleshooting. I won’t bother spamming the forum otherwise




17.10.2019

Доброго дня.

Есть SE 1.6, установлены все пакеты, требуемые для LXC. Настройки сети сделаны по мануалу. Возникло несколько вопросов:

1. При создании контейнера не находятся скрипты checkroot.sh, umountfs, hwclockfirst.sh, если с последним понятно (попытка действий со службами, которых нет), то про первые два непонятно почему так. Код ниже, в п.2.

2. При создании контенера не подтягивается sources.list корректно:

Код:

$ sudo lxc-create -t astralinux-se -n container-2
debootstrap является /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/astra/rootfs-smolensk-amd64 ...
Copying rootfs to /var/lib/lxc/container-2/rootfs...Generating locales (this might take a while)...
  en_US.UTF-8... done
  ru_RU.UTF-8... done
Generation complete.
update-rc.d: error: cannot find a LSB script for checkroot.sh
update-rc.d: error: cannot find a LSB script for umountfs
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh

Current default time zone: 'Etc/UTC'
Local time is now:      Thu Oct 17 08:39:09 UTC 2019.
Universal Time is now:  Thu Oct 17 08:39:09 UTC 2019.

Пол:1 file:/mnt/iso smolensk InRelease
Игн:1 file:/mnt/iso smolensk InRelease
Пол:2 file:/mnt/iso2 smolensk InRelease
Игн:2 file:/mnt/iso2 smolensk InRelease
Пол:3 file:/mnt/iso smolensk Release
Игн:3 file:/mnt/iso smolensk Release

Здесь нужно добавить, что репозиторий обоих дисков лежит на физически другой машине в виде iso и примонтирован в fstab по nfs. Конфиг sources.list:

Код:

deb file:///mnt/iso smolensk contrib main non-free
deb file:///mnt/iso2 smolensk contrib main non-free

Конфиг fstab:

Код:

192.168.250.11:/mnt/iso /mnt/iso        nfs,iso9660 user,noauto 0 0
192.168.250.11:/mnt/iso2 /mnt/iso2      nfs,iso9660 user,noauto 0 0

Если делать просто apt-get update, ошибок не возникает:

Код:

$ sudo apt-get update
Пол:1 file:/mnt/iso smolensk InRelease
Игн:1 file:/mnt/iso smolensk InRelease
Пол:2 file:/mnt/iso2 smolensk InRelease [5 258 B]
Пол:2 file:/mnt/iso2 smolensk InRelease [5 258 B]
Пол:3 file:/mnt/iso smolensk Release [5 014 B]
Пол:3 file:/mnt/iso smolensk Release [5 014 B]
Чтение списков пакетов… Готово

Далее, после автоматического удаления лишних пакетов имеется такая ошибка:

Код:

/bin/bash: /usr/sbin/pdp-init-fs: Нет такого файла или каталога

Соответственно, при попытке запуска контейнера:

Код:

$ sudo lxc-start -n container-2
lxc-start: monitor.c: lxc_monitor_open: 218 Failed to connect to monitor socket. Retrying in 10 ms.
lxc-start: monitor.c: lxc_monitor_open: 218 Failed to connect to monitor socket. Retrying in 50 ms.
lxc-start: monitor.c: lxc_monitor_open: 218 Failed to connect to monitor socket. Retrying in 100 ms.
lxc-start: monitor.c: lxc_monitor_open: 223 Failed to connect to monitor socket: Connection refused.
lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode.
lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.

Полный вывод во вложении log.txt. Пакеты все установлены с дисков SE, сторонние репозитории не использовались.

  • 26 КБ
    Просмотры: 260

Olej


17.10.2019

Есть SE 1.6, установлены все пакеты, требуемые для LXC. Настройки сети сделаны по мануалу.

Разбираться конкретно с вашими логами — долго.
Посмотрите здесь: контейнеры LXC — может там что-то подскажет.

17.10.2019

Разбираться конкретно с вашими логами — долго.
Посмотрите здесь: контейнеры LXC — может там что-то подскажет.

Статья крутая, мне ее когда то не хватало, спасибо.

Но проблема тут в том, что из шаблона ubuntu контейнер создается верно и корректно (прямо сейчас собрал по Вашей статье):

Код:

$ sudo lxc-info  -n C1
Name:           C1
State:          RUNNING
PID:            5219
IP:             10.10.10.100
CPU use:        1.98 seconds
BlkIO use:      627.09 MiB
Memory use:     96.15 MiB
KMem use:       13.07 MiB
Link:           macvlan0
 TX bytes:      0 bytes
 RX bytes:      876 bytes
 Total bytes:   876 bytes

А вот из шаблона мануала не собирается. Подозреваю, что скрипт шаблона astralinux-se как то не так обрабатывает пути apt-get update, похоже, что именно по причине некорректно указанного репозитория в сети…

17.10.2019

Ну и маленькое дополнение. Попробовал собрать base image астры se для docker (развернутый на ubuntu 16), debootstrap отработал без ошибок, но при помещении контейнера в докер и попытке его запуска, говорит, что переменная $PATH не определена, соответственно, не запускает контейнер. Показать полную ошибку не смогу, виртуалку снес раньше, чем попал на форум, к сожалению.

25.06.2020

Я подключал образы дисков следующим скриптом:

Bash:

mkdir /media/{smol,smoldev}
sudo mount -t iso9660 -o loop /devel-smolensk-1.6.iso /media/smoldev/
sudo mount -t iso9660 -o loop /smolensk-1.6.iso /media/smol
echo "deb file:///media/smol smolensk contrib main non-free" >> /etc/apt/sources.list
echo "deb file:///media/smoldev smolensk contrib main non-free" >> /etc/apt/sources.list

Для успешного создания контейнера я в /usr/share/lxc/templates/lxc-astralinux-se добавил в функции write_sourceslist код, чтобы пакеты успешно находились в контейнере:

Bash:

mkdir ${rootfs}/media/{smol,smoldev}
mount --bind /media/smol/ ${rootfs}/media/smol/
mount --bind /media/smoldev/ ${rootfs}/media/smoldev/

Там же в функции post_process в строчке с DEBIAN_FRONTEND=noninteractive добавил пакет gawk, который в /usr/sbin/pdp-init-fs используется, но изначально не ставится.
Также в /usr/sbin/pdp-init-fs необходимо значение /sys/module/parsec/parameters/max_ilev, которого в момент сборки контейнера нет. Я создал его, добавив строчки перед chroot «${rootfs}» /bin/bash -c «/usr/sbin/pdp-init-fs»

Bash:

chroot "${rootfs}" /bin/bash -c "mkdir -p /sys/module/parsec/parameters/"
chroot "${rootfs}" /bin/bash -c "echo 63 > /sys/module/parsec/parameters/max_ilev"

23.10.2020

Я подключал образы дисков следующим скриптом:

Bash:

mkdir /media/{smol,smoldev}
sudo mount -t iso9660 -o loop /devel-smolensk-1.6.iso /media/smoldev/
sudo mount -t iso9660 -o loop /smolensk-1.6.iso /media/smol
echo "deb file:///media/smol smolensk contrib main non-free" >> /etc/apt/sources.list
echo "deb file:///media/smoldev smolensk contrib main non-free" >> /etc/apt/sources.list

Для успешного создания контейнера я в /usr/share/lxc/templates/lxc-astralinux-se добавил в функции write_sourceslist код, чтобы пакеты успешно находились в контейнере:

Bash:

mkdir ${rootfs}/media/{smol,smoldev}
mount --bind /media/smol/ ${rootfs}/media/smol/
mount --bind /media/smoldev/ ${rootfs}/media/smoldev/

Там же в функции post_process в строчке с DEBIAN_FRONTEND=noninteractive добавил пакет gawk, который в /usr/sbin/pdp-init-fs используется, но изначально не ставится.
Также в /usr/sbin/pdp-init-fs необходимо значение /sys/module/parsec/parameters/max_ilev, которого в момент сборки контейнера нет. Я создал его, добавив строчки перед chroot «${rootfs}» /bin/bash -c «/usr/sbin/pdp-init-fs»

Bash:

chroot "${rootfs}" /bin/bash -c "mkdir -p /sys/module/parsec/parameters/"
chroot "${rootfs}" /bin/bash -c "echo 63 > /sys/module/parsec/parameters/max_ilev"

Доброго времени суток!
А не могли бы поделиться скриптом templat-a?
У меня не получается запустить контейнер Astra-linux-se, постоянно возникает ошибка при создании:

dpkg: ошибка при обработке пакета parsec-base (—configure):
подпроцесс установлен сценарий post-installation возвратил код ошибки 2

И дальше всё плывет в :
/usr/sbin/pdpl-file: ошибка получения максимальной метки в системе: Нет такого файла или каталога

23.10.2020

UPD:
Я проигнорировал вывод /usr/share/lxc/templates/lxc-astralinux-se , и просто прошел в контейнер :
lxc-attach -n container1

Занимаюсь дальше…

Hello I have succesfully used lxc containers on debian jessie, ubuntu templates and debian templates, I started using lxc on ubuntu 14.04, and ubuntu template works OK, but when I try to create a debian container, first of all the creation process is strange, lasts less, the packages taht are going to be downloaded aren’t shown in terminal, well this is the process:


root@ubuntu5:/home/ubuntu5# lxc-create -t debian -n debian
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/debian/rootfs-jessie-amd64 …
Copying rootfs to /var/lib/lxc/debian/rootfs…perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
insserv: warning: current start runlevel(s) (empty) of script checkroot.sh' overrides LSB defaults (S). insserv: warning: current stop runlevel(s) (S) of scriptcheckroot.sh’ overrides LSB defaults (empty).
insserv: warning: current start runlevel(s) (empty) of script checkroot.sh' overrides LSB defaults (S). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US", LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). update-rc.d: error: umountfs Default-Start contains no runlevels, aborting. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US", LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). insserv: warning: current start runlevel(s) (empty) of scripthwclock.sh’ overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 6 S) of script `hwclock.sh’ overrides LSB defaults (0 6).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
Creating SSH2 RSA key; this may take some time …
2048 fe:a1:bd:da:2a:4b:2d:a2:10:08:c1:bd:66:09:ac:f9 /etc/ssh/ssh_host_rsa_key.pub (RSA)
Creating SSH2 DSA key; this may take some time …
1024 92:87:6c:3a:00:95:bb:bc:c1:a9:61:61:cb:b2:18:49 /etc/ssh/ssh_host_dsa_key.pub (DSA)
Creating SSH2 ECDSA key; this may take some time …
256 75:3f:5b:80:cb:a9:4d:bb:5f:15:69:5d:8f:bf:02:b0 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
Creating SSH2 ED25519 key; this may take some time …
256 35:a5:24:d5:27:99:a7:52:b8:40:39:79:d3:ae:fe:2b /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
Failed to read /proc/cmdline. Ignoring: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = «en_US»,
LC_ALL = (unset),
LANG = «en_US.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Current default time zone: ‘America/New_York’
Local time is now: Wed Feb 10 13:51:08 EST 2016.
Universal Time is now: Wed Feb 10 18:51:08 UTC 2016.

Root password is ‘root’, please change !
Generating locales (this might take a while)…
en_US.UTF-8… done
en_US.UTF-8… done

Generation complete.

It just shows things about ĺanguage, and during every time I created a container I saw that at the of the process, and it was just like 2 lines, BUT THAT’S NOT ALL. When I list the containers it appears as an existing one, then I type «lxc-start -n debian» and then «lxc-console -n debian» and it behaves strange a lot, I mean, it doesn’t log in well, it just keep showing login: and login, then by some miracle it seems to log in, then when typing commands it makes a mix of those annoying login: and the output of the command, it laso seems sometimes like a continouus login-logout process, I don’t know what happens exactly

Автор vponed, 26 декабря 2017, 20:13:32

« назад — далее »

0 Пользователи и 1 гость просматривают эту тему.

А дает кучу ошибок.
Контейнер создаю командой

sudo lxc-create -n debian0 -t debian --dir=/media/z/Внешний/Debian0/
Вот примеры ошибок:

  ru_RU.utf8...character map file `utf8' not found: No such file or directory
...
gzip: stdout: Broken pipe
...таких много одинаковых...
/usr/share/i18n/locales/ru_RU:81: LC_MESSAGES: unknown character in field `yesexpr'                                                             
/usr/share/i18n/locales/ru_RU:82: LC_MESSAGES: unknown character in field `noexpr'                                                               
/usr/share/i18n/locales/ru_RU:83: LC_MESSAGES: unknown character in field `yesstr'                                                               
/usr/share/i18n/locales/ru_RU:84: LC_MESSAGES: unknown character in field `nostr'                                                               
/usr/share/i18n/locales/ru_RU:112: LC_TIME: unknown character in field `day'     
...еще много таких...
LC_MESSAGES: value for field `yesexpr' must not be an empty string                                                                               
LC_MESSAGES: value for field `noexpr' must not be an empty string                                                                                ...
update-rc.d: error: cannot find a LSB script for checkroot.sh                                                                                   
update-rc.d: error: cannot find a LSB script for umountfs                                                                                       
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh                                                                                 
sh: 1: cannot create /dev/null: Permission denied                                                                                               
sh: 1: cannot create /dev/null: Permission denied                                                                                               
/var/lib/dpkg/info/openssh-server.config: 13: /var/lib/dpkg/info/openssh-server.config: cannot create /dev/null: Permission denied               
Can't open /dev/null: ???????? ? ???????                                                                                                         
sed: невозможно прочитать /media/z/Внешний/Debian0//etc/ssh/ssh_host_*.pub: Нет такого файла или каталога                                       
/var/lib/dpkg/info/tzdata.postinst: 32: /var/lib/dpkg/info/tzdata.postinst: cannot create /dev/null: Permission denied                           

Логина и пароля нет. Причем, контейнер можно запустить и войти в консоль. И там надо ввести пароль,которого нет.
upd.root:root и admin:admin пробовал..



cleaner83

  • Новичок форума
  • Сообщения: 9
  • Записан

Пароль создается во время первого запуска виртуалки и показывается на экране. Важно не забыть его записать! Но даже если забыли, можно сбросить пароль из хост-машины командой:

chroot /var/lib/lxc/<имя виртуалки>/rootfs

PS: https://habrahabr.ru/post/271537/


  • Русскоязычное сообщество Debian GNU/Linux


  • Общие вопросы

  • Контейнер LXC: при создании не дает логин и пароль

I recently freshly installed Debian 8, and i want to create a linux contener based on wheezy.
But when i launch the command:

sudo lxc-create -n omvctr -t debian -- -r wheezy -a amd64

I obtain this trace :

Generation complete.
update-rc.d: using dependency based boot sequencing
insserv: warning: current start runlevel(s) (empty) of script `checkroot.sh' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (S) of script `checkroot.sh' overrides LSB defaults (empty).
update-rc.d: using dependency based boot sequencing
update-rc.d: error: umountfs Default-Start contains no runlevels, aborting.
update-rc.d: using dependency based boot sequencing
insserv: warning: current start runlevel(s) (empty) of script `hwclock.sh' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 6 S) of script `hwclock.sh' overrides LSB defaults (0 6).
update-rc.d: using dependency based boot sequencing
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.

What is the problem ?

Barmar's user avatar

Barmar

718k53 gold badges481 silver badges598 bronze badges

asked May 14, 2015 at 15:42

Seb's user avatar

4

Looks like you run into (sort of) a bug in Debian LXC package, the message:

update-rc.d: error: cannot find a LSB script for hwclockfirst.sh

is probably caused by this line:

chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh disable

which is trying to disable autostart of several services inside new container, but hwclockfirst.sh service doesn’t exist. It would be cleaner if the script would check if service exists and then tried to disable it.

TL;DR: no need to worry :)

answered Jan 18, 2016 at 15:58

Tombart's user avatar

TombartTombart

29.6k15 gold badges122 silver badges132 bronze badges


PP



Pirate Praveen




Public

Seen by 718

On previous packaging workshops, we had to spend a lot of time troubleshooting issues when people used older versions of Ubuntu which had an older version of dh-make, gem2deb, npm2deb etc. So we thought of clearly mentioning the prerequisites so we can use the available time more efficiently.

If you have Machine with Debian-Sid it is well and good. if not we are having several other ways to set up a packaging environment. those are following but not limited to it.
1. Schroot chroot (lightweight and preferred)
2. LXC Container (saving bandwidth with apt-cacher-ng is easy)
3. Docker Container (if you are familiar with docker already)
4. VM (Using Vagrant or Manually installed. Host system should be sufficiently powerful to run a Virtual Machine)

If you have a GNU/Linux system already with schroot and sbuild packages, using Schroot is recommended (schroot and sbuild can be run on the host system). LXC or docker will work fine for the beginners (for simple packages). Also running docker as privileged container is important otherwise sbuild command will not work, which is required to build packages in clean Debian sid environment.

  1. You MUST have a Debian unstable system (physical, virtual machine, container or a chroot). See instructions given below to setup Debian Sid.
  • Schroot — https://wiki.debian.org/Packaging/Pre-Requisites#Schroot

  • LXC — https://wiki.debian.org/Packaging/Pre-Requisites#LXC

  • Docker — https://wiki.debian.org/Packaging/Pre-Requisites#Docker

  • Virtual Machine — https://wiki.debian.org/Packaging/Pre-Requisites#Virtual_Machine

  1. Install packaging tools inside the container
    # apt-get install dh-make OR
    # apt-get install gem2deb OR
    # apt-get install npm2deb as required. For Node.js modules, use npm2deb; for ruby gems, use gem2deb; for go packages, use dh-make-golang. If there is no tool specific to a language, dh-make can be used as a generic tool for any language.

  2. Understand how a basic command line program is created and installed using a simple Makefile
    See https://git.fosscommunity.in/praveen/hello for an example

  3. Get a basic overview of packaging from Debian New Maintainer’s Guide
    https://www.debian.org/doc/manuals/maint-guide/

  4. Understand basic git usage (add, commit, clone, push, pull, branch, tag)

    • Pick any book from http://sixrevisions.com/resources/git-tutorials-beginners/
    • Create an account at https://git.fosscommunity.in and add your ssh public key to your account https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key
  5. Run a hello world program with NodeJs. Follow http://nodeguide.com/beginner.html You can apt-get install nodejs

  6. Go through https://wiki.debian.org/Javascript/Nodejs/Npm2Deb/Tutorial

Join our real-time chat group using one of the 3 options (all 3 services are bridged/interconnected) and say hi. If you have difficulty with pre-requisites please ask here or on our chat room.

  1. Matrix: #debian-browserify:diasp.in
  2. IRC: #debian-browserify on irc.oftc.net
  3. Telegram: https://t.me/debian_browserify

If you are new to these technologies, I suggest you try matrix, see https://matrix.org for details. https://riot.im has a list of apps you can use.

http://webchat.oftc.net/?channels=debian-browserify&amp;uio=MT11bmRlZmluZWQb1 to join the IRC room


I have created a daemon using the Debian init.d skeleton which successfully runs as a service. I’ve also used:

Code: Select all

sudo update-rc.d /etc/init.d/pirservice.sh defaults

to get the daemon running at boot and closing nicely when issuing a shutdown command.However, I have since tried to remove the start at boot service using the following:

Code: Select all

sudo update-rc.d /etc/init.d/pirservice.sh remove

On checking for completion using:

The scripts is still linked in all 6 rc?.d folders and sure enough still loads at boot.

When I try to use the following:

Code: Select all

sudo update-rc.d /etc/init.d/pirservice.sh disable

I get the following error:

Code: Select all

update-rc.d: using dependency based boot sequencing
update-rc.d: error: cannot find a LSB script for /etc/init.d/pirservice.sh

My scripts is as follows:

Code: Select all

#!/bin/sh

# /etc/init.d/pirservice.sh

### BEGIN INIT INFO
# Provides:          myservice
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Put a short description of the service here
# Description:       Put a long description of the service here
### END INIT INFO

# Change the next 3 lines to suit where you install your script and what you want to     call it
DIR=/usr/local/bin/myservice
DAEMON=$DIR/pir.py
DAEMON_NAME=pir

# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=root

# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid

. /lib/lsb/init-functions

do_start () {
    log_daemon_msg "Starting system $DAEMON_NAME daemon"
    start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user     $DAEMON_USER --startas $DAEMON
    log_end_msg $?
}
do_stop () {
    log_daemon_msg "Stopping system $DAEMON_NAME daemon"
    start-stop-daemon --st
   log_end_msg $?
}

case "$1" in

    start|stop)
        do_${1}
        ;;

    log_end_msg $?
}
 do_stop () {
    log_daemon_msg "Stopping system $DAEMON_NAME daemon"
    start-stop-daemon --stop --pidfile $PIDFILE --retry 10
    log_end_msg $?
}

 case "$1" in

    start|stop)
        do_${1}
        ;;

    restart|reload|force-reload)
        do_stop
        do_start
        ;;

    status)
        status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $?
        ;;
    *)
        echo "Usage: /etc/init.d/$DEAMON_NAME {start|stop|restart|status}"
        exit 1
        ;;

esac
exit 0

Can anyone offer assistance?

version graph

Reply or subscribe to this bug.

Toggle useless messages


Report forwarded
to debian-bugs-dist@lists.debian.org, dkg@fifthhorseman.net, Debian CI team <debian-ci@lists.debian.org>:
Bug#902394; Package autopkgtest.
(Mon, 25 Jun 2018 22:33:06 GMT) (full text, mbox, link).


Acknowledgement sent
to Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
New Bug report received and forwarded. Copy sent to dkg@fifthhorseman.net, Debian CI team <debian-ci@lists.debian.org>.
(Mon, 25 Jun 2018 22:33:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

Package: autopkgtest
Version: 5.3.1
Severity: normal

As per instructions in autopkgtest-build-lxc(1), i run:

    # autopkgtest-build-lxc debian sid

It results in the following logs:

    I: Configuring libc-bin...
    I: Configuring systemd...
    I: Base system installed successfully.
    Download complete.
    Copying rootfs to /var/lib/lxc/autopkgtest-sid.new/rootfs...Generating locales (this might take a while)...
      en_US.UTF-8... done
      en_US.UTF-8... done
    Generation complete.
    update-rc.d: error: cannot find a LSB script for checkroot.sh
    update-rc.d: error: cannot find a LSB script for umountfs
    update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
    Creating SSH2 RSA key; this may take some time ...
    2048 SHA256:b4Yqjm6HYfq7gc3DszRKby9G+lwWiejMbf11PAbi1BM root@sid (RSA)
    Creating SSH2 ECDSA key; this may take some time ...
    256 SHA256:RXkjVC92er2yy3zX04aysJYN+AxHgr0uH0Q9pNLbmw8 root@sid (ECDSA)
    Creating SSH2 ED25519 key; this may take some time ...
    256 SHA256:aFvRmDQhpOd1OygO7EcrshRF7+3xYXKJC6Vu0zLwfbs root@sid (ED25519)
    invoke-rc.d: could not determine current runlevel
    invoke-rc.d: policy-rc.d denied execution of start.

    Current default time zone: 'Etc/UTC'
    Local time is now:      Mon Jun 25 18:37:52 UTC 2018.
    Universal Time is now:  Mon Jun 25 18:37:52 UTC 2018.

    lxc-start: lxccontainer.c: wait_on_daemonized_start: 754 Received container state "ABORTING" instead of "RUNNING"
    lxc-start: tools/lxc_start.c: main: 368 The container failed to start.
    lxc-start: tools/lxc_start.c: main: 370 To get more details, run the container in foreground mode.
    lxc-start: tools/lxc_start.c: main: 372 Additional information can be obtained by setting the --logfile and --logpriority options.

and then fails.

Note that i have made this adjustment at the recommendation of autopkgtest:

    # cat /etc/lxc/default.conf 
    lxc.network.type = none
    #

There are too many layers of complexity here for me to be clear how to
debug the situation.  Feel free to reassign (with an explanation) if
you think the problem is with lxc, or with debootstrap, or with
init-system-helpers, or with something else (though retaining
"affects: autopkgtest" would be nice so that other people can find it
when looking at the autopkgtest page in the BTS.

Thanks for maintaining autopkgtest!

    --dkg


-- System Information:
Debian Release: sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils       1.6.1
ii  libdpkg-perl    1.19.0.5
ii  procps          2:3.3.15-2
ii  python3         3.6.5-3
ii  python3-debian  0.1.32

Versions of packages autopkgtest recommends:
ii  autodep8  0.12

Versions of packages autopkgtest suggests:
ii  lxc          1:2.0.9-6
un  lxd-client   <none>
un  qemu-system  <none>
un  qemu-utils   <none>
ii  schroot      1.6.10-5

-- no debconf information



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Fri Feb 10 05:00:11 2023;
Machine Name:
bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.

Понравилась статья? Поделить с друзьями:
  • Update process ended with error 1 4pda
  • Unresolved reference python ошибка
  • Unreal engine is exiting due to d3d device being lost error 0x887a0007 reset как исправить
  • Update path validation error 4game
  • Unresolved reference python как исправить