Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#26  2014-08-11 21:06:02

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Skrypty OpenRC  mają składnię Basha.
Poza tym fajnie byłoby wiedzieć, na czym się dokładnie powiesił, bez loga to raczej do wróżki trzeba.

Inna sprawa, że w Debianie OpenRC ma dość kretyńską organizację:
prawie cały system siedzi w sysinit, boot pusty, potem default.
W Gentoo w sysinit są:

Kod:

udev-mount
kmod-static-nodes
tmpfiles.dev
devfs
sysfs
dmesg
udev

A w Debianie:

Kod:

ls /etc/runlevels/sysinit/
alsa-utils              kmod                   pppd-dns
bootmisc.sh             live                   procps
checkfs.sh              live-config            qemu-system-x86
checkroot-bootclean.sh  mountall-bootclean.sh  screen-cleanup
checkroot.sh            mountall.sh            setserial
console-setup           mountdevsubfs.sh       udev
etc-setserial           mountkernfs.sh         udev-finish
hostname.sh             mountnfs-bootclean.sh  urandom
hwclock.sh              mountnfs.sh            x11-common
keyboard-setup          networking

W pierwszej chwili myślałem, że ktoś w Debianie na głowę upadł,
w Gentoo fsck i localmount są dopiero w boot.
Biorąc pod uwagę, że OpenRC poszczególne usługi z danego  runlevela podnosi równocześnie, obliczając tylko zależności miedzy usługami, to taki sysinit,  to jest prawdziwy horror.

Ostatnio edytowany przez Jacekalex (2014-08-11 21:11:31)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#27  2014-08-11 22:08:46

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

Log? Taki może być?

Kod:

 * /proc is already mounted
 * /run/openrc: creating directory
 * /run/lock: correcting mode
 * /run/lock: correcting owner
[....] Starting the hotplug events dispatcher: udevd[ ok .
[....] Synthesizing the initial hotplug events...[ ok done.
[....] Waiting for /dev to be fully populated...[ ok done.
[....] Setting parameters of disc: (none)[ ok .
 * ERROR: cannot start mountall-bootclean.sh as checkroot.sh would not start
[....] Setting preliminary keymap...[ ok done.
[....] Activating swap...[ ok done.
[....] Checking root file system...fsck from util-linux 2.20.1
root: clean, 180999/2203648 files, 1757867/8798208 blocks (check in 2 mounts)
[ ok done.
[....] Starting early crypto disks...
rc sysinit logging stopped at Mon Aug 11 20:05:19 2014

No i na tym ostatnim sie wiesza i czeka na ctrl+c. Skąd mam wiedzieć co mu dolega -- nie pisze. xD Na moje oko to ten ERROR wyżej może jest z tym powiązany ale nie mam pojęcia gdzie szukać kolejności wykonywania się skryptów i gdzie to pozmieniać, bo pewnie gdzieś kolejność jest nie ta albo coś gdzieś się nie wykonuje.

Offline

 

#28  2014-08-11 22:14:29

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Wygląda na to, że staje właśnie na tym skrypcie:

Kod:

[....] Starting early crypto disks...

Pewnie jakaś literówka w tym skrypcie, albo coś podobnego.

Włacz logowanie w /etc/rc.conf, i potem w /var/log/rc.log powinny być dokładniejsze informacje (w Gentoo tak to dziala).

Problem polega na tym, ze do zapisywania logów ptrzeba najpierw zamontować partycję z logami, więc logu z sysinit nie zapisze.

Ostatnio edytowany przez Jacekalex (2014-08-11 22:19:19)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#29  2014-08-12 08:54:33

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

No przecie to napisałem w poście 25. xD

Ja sprawdziłem ten skrypt po ctrl+c jak połowa systemu się załadowała i dostałem dostęp do konsoli — wykonałem ten skrypt przez:

Kod:

/etc/init.d/cryptdisks-early start

i wszedł czysto. Tak jak i wszystkie inne skrypty, co się nie załadowały, wchodzą bez problemu.

Logowanie włączyłem w pliku już wcześniej i nic nie pisze wtf.

Tu jest cały ten skrypt:

Kod:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          cryptdisks-early
# Required-Start:    checkroot
# Required-Stop:     umountroot
# Should-Start:      udev mdadm-raid
# Should-Stop:       udev mdadm-raid
# X-Start-Before:    lvm2
# X-Stop-After:      lvm2 umountfs
# X-Interactive:     true
# Default-Start:     S
# Default-Stop:      0 6
# Short-Description: Setup early encrypted block devices.
# Description:
### END INIT INFO

set -e

if [ -r /lib/cryptsetup/cryptdisks.functions ]; then
    . /lib/cryptsetup/cryptdisks.functions
else
    exit 0
fi

INITSTATE="early"
DEFAULT_LOUD=""

case "$CRYPTDISKS_ENABLE" in
[Nn]*)
    exit 0
    ;;
esac

case "$1" in
start)
    do_start
    ;;
stop)
    do_stop
    ;;
restart|reload|force-reload)
    do_stop
    do_start
    ;;
force-start)
    FORCE_START="yes"
    do_start
    ;;
*)
    echo "Usage: cryptdisks-early {start|stop|restart|reload|force-reload|force-start}"
    exit 1
    ;;
esac

Jeśli już to pisze tam, że potrzebuje checkroot , a komunikat był wyraźny

* ERROR: cannot start mountall-bootclean.sh [b]as checkroot.sh would not start[/b][/quote]
Czyli dobrze gadam cały czas, że to jest wina tego, że się to nie odpala i pewnie wszystko pozostałe się sypie. Ponawiam pytanie, jak odpalić ten skrypt, bo link jest utworzony w /etc/runlevels/sysinit/checkroot.sh -> /etc/init.d/checkroot.sh* ale jak widać się on nie uruchamia.

Offline

 

#30  2014-08-12 09:58:01

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Gentusiowy dmcrypt ma takie zależności:

Kod:

depend() {
    before checkfs fsck
}

To wszystko.

Coś tam nie gra z Debianizacją OpenRC i skryptem checkroot.
Spróbuj zmienić checkroot na checkroot.sh  - tak się nazywa w debianowym OpenRC.

Poza tym to jest typowy skrypt SystemD, w OpenRC wygladają nieco inaczej.

Tu masz oryginalny skrypt startowy z Gentoo do Cryptsetup:
http://data.gpo.zugaina.org/gentoo/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc

Tu skrypty do rożnych wersji:
http://data.gpo.zugaina.org/gentoo/sys-fs/cryptsetup/files/
A tu ebuildy:
http://data.gpo.zugaina.org/gentoo/sys-fs/cryptsetup/

Ostatnio edytowany przez Jacekalex (2014-08-12 10:03:49)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#31  2014-08-12 10:08:04

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Przejście na OpenRC

[quote=Jacekalex]Gentusiowy dmcrypt ma takie zależności:

Kod:

depend() {
    before checkfs fsck
}

To wszystko.

Coś tam nie gra z Debianizacją OpenRC i skryptem checkroot.
Spróbuj zmienić checkroot na checkroot.sh  - tak się nazywa w debianowym OpenRC.

Poza tym to jest typowy skrypt SystemD, w OpenRC wygladają nieco inaczej.[/quote]
To jest typowy skrypt sysvinit, a nie systemd.
Takich jest większość w Debianie.
http://dug.net.pl/tekst/157/jak_umiescic_swoj_skrypt_w_skryptach_startowych__/

Offline

 

#32  2014-08-12 10:38:49

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Możliwe, w każdym razie najwyraźniej gryzie się ze skryptami, które do OpenRC wsadzili Developerzy Debiana.


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#33  2014-08-12 10:49:50

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

To nie ma znaczenia z tym .sh .

Poniżej jest pełny log ze startu interaktywnego -- są komentarze to czytać. xD

Kod:

   OpenRC 0.13 is starting up Linux 3.14-2-amd64 (x86_64)

Press I to enter interactive boot mode

 * /proc is already mounted
 * /run/openrc: creating directory
 * /run/lock: correcting mode
 * /run/lock: correcting owner

 * About to start the service mountkernfs.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service udev
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting the hotplug events dispatcher: udevd[ ok .
[....] Synthesizing the initial hotplug events...[ ok done.
[....] Waiting for /dev to be fully populated...[ ok done.

 * About to start the service mountdevsubfs.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service bootlogd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service hostname.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service hdparm
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting parameters of disc: (none)[ ok .

 * About to start the service mountall-bootclean.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
 * ERROR: cannot start mountall-bootclean.sh as checkroot.sh would not start        # brak checkroot.sh

 * About to start the service hwclock.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service keyboard-setup
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting preliminary keymap...[ ok done.

 * About to start the service checkroot.sh                                            # dopiero tu wstaje checkroot.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Activating swap...[ ok done.
[....] Checking root file system...fsck from util-linux 2.20.1
root: clean, 181001/2203648 files, 1758396/8798208 blocks
[ ok done.

 * About to start the service umountroot
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service cryptdisks-early                                        # wybrane 2 bo przy 1 się wiesza
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service lvm2
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting up LVM Volume Groups...[ ok done.

 * About to start the service cryptdisks
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
 * ERROR: cannot start cryptdisks as cryptdisks-early would not start

 * About to start the service checkfs.sh                                            # brak podmontowanych zaszyfrowanych partycji niesystemowych i fsck się rzuca
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Activating lvm and md swap...[ ok done.
[....] Checking file systems...fsck from util-linux 2.20.1
boot: clean, 162/61056 files, 25104/243968 blocks
tmp: clean, 26/327680 files, 23146/1310720 blocks
Server: clean, 654215/5619712 files, 12079268/22446848 blocks
home: clean, 28359/393216 files, 527878/1572864 blocks
fsck.ext4: Unable to resolve 'UUID=19101155-6070-4f37-b39d-19f28867c66b'
fsck.ext4: Unable to resolve 'UUID=e6a0b66c-8fe9-4e7b-9d54-7b2b430e109d'
fsck.ext4: Unable to resolve 'UUID=81eb3dfd-c86c-4364-b4cf-74bc8122a4af'
fsck exited with status code 8
[FAILfailed (code 8).
[....] File system check failed. A log is being saved in /var/log/fsck/checkfs if that location is writable. Please repair the file system manually. ...[FAIL failed!
[....] A maintenance shell will now be started. CONTROL-D will terminate this shell and resume system boot. ...[warn (warning).
Give root password for maintenance
(or type Control-D to continue): 

 * About to start the service checkroot-bootclean.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Cleaning up temporary files...[ ok .

 * About to start the service mountall.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Mounting local filesystems...[ ok done.
[....] Activating swapfile swap...[ ok done.

 * About to start the service urandom
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service morfinetwork                                            # mój skrypcio wyrzuca błędy bo nie ma modułów, co ciekawe te moduły są
 *   1) Start the service        2) Skip the service                                    # po zakończeniu bootowania, coś nie przeczytało jeszcze /etc/modules
 *   3) Continue boot process        4) Exit to shell
[....] Creating a set: bt_level1[ ok .
[....] Creating a set: bt_spyware[ ok .
[....] Creating a set: bt_webexploit[ ok .
[....] Creating a set: whitelist[ ok .
[....] Creating a set: spamhaus[ ok .
[....] Loading a list: bt_level1[ ok .
[....] Loading a list: bt_spyware[ ok .
[....] Loading a list: bt_webexploit[ ok .
[....] Loading a list: whitelist[ ok .
[....] Loading a list: spamhaus[ ok .
[....] Loading a list: autoban[ ok .
[....] Loading iptables configuration: (raw table)[ ok .
[....] Loading iptables configuration: (mangle table)[ ok .
[....] Loading iptables configuration: (nat table)[ ok .
[....] Loading iptables configuration: (filter table)[ ok .
[....] Loading ip6tables configuration: (filter table)[ ok .
[....] Loading tc configuration...Cannot find device "ifb0"
Cannot find device "ifb1"
Cannot find device "ifb0"
......                                                                                # błędy wycięte
[FAILfailed.

 * About to start the service procps
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting kernel variables ...[ ok done.

 * About to start the service resolvconf                                            # resolvconf działa
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting up resolvconf...[ ok done.

 * About to start the service networking                                            # sieć też
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Configuring network interfaces...
Waiting for a max of 0 seconds for none to become available.

Waiting for br_lxc to get ready (MAXWAIT is 2 seconds).
[ ok done.

 * About to start the service nfs-common
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting NFS common utilities: statd
[....] Not starting: portmapper is not running ...[warn (warning).

 * About to start the service mountnfs.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service mountnfs-bootclean.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Cleaning up temporary files... /tmp[ ok .

 * About to start the service alsa-utils
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting up ALSA...[ ok done.

 * About to start the service bootmisc.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service brightness
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Initializing brightness level...[ ok done.

 * About to start the service kbd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[info] Setting console screen modes.

 * About to start the service console-setup
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting up console font and keymap...[ ok done.

 * About to start the service dnscrypt-proxy                                        # dnscrypt również działa
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting Encrypted DNS: dnscrypt-proxy [ ok .

 * About to start the service kmod
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Loading kernel modules...[ ok done.

 * About to start the service lm-sensors
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting sensors limits[ ok .

 * About to start the service rpcbind
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting rpcbind daemon...[ ok .

 * About to start the service udev-finish
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service x11-common
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service stop-bootlogd-single
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

rc sysinit logging stopped at Tue Aug 12 10:12:07 2014


rc default logging started at Tue Aug 12 10:12:07 2014


 * About to start the service acpi-fakekey
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting acpi_fakekey daemon...[ ok done.

 * About to start the service umountfs
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service umountnfs.sh
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service rsyslog
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting enhanced syslogd: rsyslogd[ ok .

 * About to start the service acpi-support
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Enabling power management...[ ok done.

 * About to start the service acpid
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting ACPI services...[ ok .

 * About to start the service atd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting deferred execution scheduler: atd[ ok .

 * About to start the service dbus
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting system message bus: dbus[ ok .

 * About to start the service bluetooth
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting bluetooth: disabled. see /etc/default/bluetooth[ ok .

 * About to start the service bootlogs
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service cgconfig
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
Starting cgconfig service.

 * About to start the service cgrulesengd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting CGroups rules engine daemon: cgrulesengd[ ok .

 * About to start the service loadcpufreq
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Loading cpufreq kernel modules...[ ok done (acpi-cpufreq).

 * About to start the service cpufrequtils
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] CPUFreq Utilities: Setting ondemand CPUFreq governor...CPU0...CPU1...[ ok done.

 * About to start the service cron
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting periodic command scheduler: cron[ ok .

 * About to start the service cryptmount
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
Starting cryptmount targets (hit shift/ctrl if short of entropy):

 * About to start the service dropbox-container
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting cryptdisk: dropbox[ ok .

 * About to start the service exim4
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting MTA: exim4[ ok .

 * About to start the service fwknop-server
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service knockd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] knockd disabled: not starting. To enable it edit /etc/default/knockd ...[warn (warning).

 * About to start the service linuxlogo
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Updating the system logo...[ ok done.

 * About to start the service lxc
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting LXC autoboot containers: :

 * About to start the service motd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service openvpn
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting virtual private network daemon:[ ok .

 * About to start the service rsync
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service saned
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
saned disabled; edit /etc/default/saned

 * About to start the service smartmontools
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Enabling S.M.A.R.T..../dev/sda...[ ok done.
[....] Starting S.M.A.R.T. daemon: smartd[ ok .

 * About to start the service sysfsutils
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Setting sysfs variables...[ ok .

 * About to start the service vnstat
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting vnStat daemon: vnstatd[ ok .

 * About to start the service monit
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell
[....] Starting daemon monitor: monit[ ok .

 * About to start the service rc.local
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service rmnologin
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

 * About to start the service stop-bootlogd
 *   1) Start the service        2) Skip the service
 *   3) Continue boot process        4) Exit to shell

rc default logging stopped at Tue Aug 12 10:12:54 2014

Jak wywołać ten skrypt checkroot.sh wcześniej?

Z tych informacji o pętlach co podałem wcześniej ten skrypt jest uwikłany:

Kod:

* Caching service dependencies ...
 * Found a solvable dependency loop: checkfs.sh p> checkfs n> mountall.sh p> mountall u> hwclock.sh a> checkroot n> checkfs.sh.
 * Solving the loop by breaking mountall u> hwclock.sh.
 * Found a solvable dependency loop: checkfs.sh p> checkfs n> mountall.sh p> mountall n> mountall-bootclean.sh p> mountall-bootclean u> hwclock.sh a> checkroot n> checkfs.sh.
 * Solving the loop by breaking mountall-bootclean u> hwclock.sh.
 * Found a solvable dependency loop: cryptdisks a> umountfs u> hwclock.sh a> checkroot n> cryptdisks-early a> lvm2 u> cryptdisks.
 * Found a solvable dependency loop: cryptdisks a> umountfs u> hwclock.sh a> checkroot n> cryptdisks.
 * Found a solvable dependency loop: cryptdisks a> umountfs u> hwclock.sh a> checkroot n> cryptdisks-early n> cryptdisks.
 * Solving the loop by breaking umountfs u> hwclock.sh.
 * Solving the loop by breaking lvm2 u> cryptdisks.
 [ ok ]

Offline

 

#34  2014-08-12 11:23:33

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Np tak:

Kod:

rc_usługa_need="checkroot.sh"

albo

Kod:

rc_apparmor_after="xdm"

albo (ten przykład pisany z pamięci)

Kod:

rc_checkroot.sh_before="usługa"

Wszystko  w:
w [b]/etc/rc.conf[/b]
tam z resztą masz gotowe przykłady w komentarzach.

Poza tym u Ciebie błąd zgłasza fsck (skrypt checksf.sh) w runlevelu sysinit,
bo nie może znaleźć partycji do sprawdzenia.

Ostatnio edytowany przez Jacekalex (2014-08-12 11:27:52)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#35  2014-08-12 13:09:49

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

No nie może, bo nie są odszyfrowane. Ten skrypt cryptdisks-early  odpowiada za otwieranie kontenerów, a on się nie może załadować, bo inny skrypt się nie załadował. xD

Próbowałem dopisać:

Kod:

rc_checkroot.sh_before="mountall-bootclean.sh"

bo takie są nazwy plików w /etc/init.d ale mi to tylko zwracało szereg błędów typu:

Kod:

/lib/rc/sh/gendepends.sh: 127: /etc/rc.conf: rc_checkroot.sh_before=mountall-bootclean.sh: not found

to mu wpisałem według tych nagłówków w plikach linijkę:

Kod:

rc_checkroot_before="mountall-bootclean"

I przestało wyrzucać błędy ale usługi się uruchamiają w takiej samej kolejności.

Offline

 

#36  2014-08-12 13:15:17

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

To już chyba spacerek do Developera, który opiekuje się OpenRC w Debianie.
Wersja nowsza niż w Gentoo -prosto z git? i nie czyta swojego konfigu?

Czy może głupieje przy skrypcie o składni zgodnej z Sysinit.

Coś mi się zdaje, że łatwiej naskrobiesz własnego skrypta do montowania szyfrowanych kontenerów, niż dojdziesz, co tam jest grane.

Spróbuj tej składni:

Kod:

rc_usługa_need="checkroot.sh"

Mam kilka takich wpisów w /etc/rc.conf - i na Gentusiowym OpenRC 12.4 chodzą z buta, są też najpewniejsze.

Ja mam:

Kod:

qlist -UCvq openrc
sys-apps/openrc-0.12.4  elibc_glibc kernel_linux ncurses netifrc pam static-libs tools unicode

Ostatnio edytowany przez Jacekalex (2014-08-12 13:19:01)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#37  2014-08-12 16:52:52

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

A te need, before i cała reszta operują na nazwach plików w /etc/init.d/ czy w oparciu o to co jest wpisane w nagłówkach? Druga sprawa jest jakiś sposób by podejrzeć sekwencję startową? Sysvinit miał to w plikach w /etc/init.d/ -- tam 3 były oddelegowane do trzymania informacji i regenerowane były przy wydawaniu polecenia update-rc.d. A tym openrc jest coś podobnego?

Offline

 

#38  2014-08-12 18:10:44

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Kod:

rc-status
rc-config
rc-update

Narzędzia do zarządzania OpenRC.
Do wszyskich powinny być many, i help po wpisaniu:

Kod:

komenda --help

Używa się podobnie jak SysVinit.

W rc.conf - need i before - w Gentoo po nazwach skryptów w init.d, ale co nagrzmocili w Debianie, nie wiem.

Ja jeszcze nie widziałem, żeby nazwa skrypta była inna niż w nagłówku,
nazwa.sh to wynalazek Debianowców.

Ostatnio edytowany przez Jacekalex (2014-08-12 18:15:18)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#39  2014-08-12 19:19:22

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

Ja akurat widziałem żeby nazwa skryptu była inna niż w nagłówku. W sumie to nie ma jakiegoś ograniczenia by to musiało pasować do siebie -- tylko nagłówek się liczy a nazwa pliku to dla wygody. Ja tam swoje skrypty zawsze nazywam tak jak w nagłówku, a tu połowa ma inne nazwy plików niż w nagłówkach wpisane. xD

Czyli rozumiem, że to poniższe to jest sekwencja startu, a usługi są odpalane w kolejności jak widać?

Kod:

# rc-status -a
Runlevel: sysinit
 mountkernfs.sh                                                            [  started  ]
 udev                                                                      [  started  ]
 mountdevsubfs.sh                                                          [  started  ]
 bootlogd                                                                  [  started  ]
 hostname.sh                                                               [  started  ]
 hdparm                                                                    [  started  ]
 cryptdisks-early                                                          [  stopped  ]
 lvm2                                                                      [  started  ]
 cryptdisks                                                                [  stopped  ]
 checkfs.sh                                                                [  started  ]
 checkroot-bootclean.sh                                                    [  started  ]
 mountall.sh                                                               [  started  ]
 mountall-bootclean.sh                                                     [  stopped  ]
 hwclock.sh                                                                [  started  ]
 keyboard-setup                                                            [  started  ]
 checkroot.sh                                                              [  started  ]
 urandom                                                                   [  started  ]
 morfinetwork                                                              [  started  ]
 procps                                                                    [  started  ]
 resolvconf                                                                [  started  ]
 networking                                                                [  started  ]
 nfs-common                                                                [  started  ]
 mountnfs.sh                                                               [  started  ]
 mountnfs-bootclean.sh                                                     [  started  ]
 kbd                                                                       [  started  ]
 console-setup                                                             [  started  ]
 udev-finish                                                               [  started  ]
 brightness                                                                [  started  ]
 x11-common                                                                [  started  ]
 dnscrypt-proxy                                                            [  started  ]
 kmod                                                                      [  started  ]
 rpcbind                                                                   [  started  ]
 bootmisc.sh                                                               [  started  ]
 alsa-utils                                                                [  started  ]
 lm-sensors                                                                [  started  ]
 stop-bootlogd-single                                                      [  started  ]
Runlevel: off
 pause_hook                                                                [  stopped  ]
 umountroot                                                                [  started  ]
 umountfs                                                                  [  started  ]
 savecache                                                                 [  stopped  ]
 umountnfs.sh                                                              [  started  ]
 sendsigs                                                                  [  stopped  ]
Runlevel: recovery
 killprocs                                                                 [  stopped  ]
 bootlogs                                                                  [  started  ]
 motd                                                                      [  started  ]
 single                                                                    [  stopped  ]
Runlevel: boot
Runlevel: shutdown
 transit                                                                   [  stopped  ]
Runlevel: default
 rsyslog                                                                   [  started  ]
 dropbox-container                                                         [  started  ]
 acpi-support                                                              [  started  ]
 acpi-fakekey                                                              [  started  ]
 acpid                                                                     [  started  ]
 atd                                                                       [  started  ]
 dbus                                                                      [  started  ]
 bluetooth                                                                 [  started  ]
 bootlogs                                                                  [  started  ]
 cgconfig                                                                  [  started  ]
 cgrulesengd                                                               [  started  ]
 loadcpufreq                                                               [  started  ]
 cpufrequtils                                                              [  started  ]
 cron                                                                      [  started  ]
 cryptmount                                                                [  started  ]
 exim4                                                                     [  started  ]
 fwknop-server                                                             [  started  ]
 knockd                                                                    [  started  ]
 linuxlogo                                                                 [  started  ]
 lxc                                                                       [  started  ]
 motd                                                                      [  started  ]
 mpd                                                                       [  started  ]
 openvpn                                                                   [  started  ]
 qbittorrent-nox                                                           [  stopped  ]
 rpcbind                                                                   [  started  ]
 rsync                                                                     [  started  ]
 saned                                                                     [  started  ]
 smartmontools                                                             [  started  ]
 ssh                                                                       [  started  ]
 sysfsutils                                                                [  started  ]
 vnstat                                                                    [  started  ]
 rmnologin                                                                 [  started  ]
 stop-bootlogd                                                             [  started  ]
 monit                                                                     [  started  ]
 rc.local                                                                  [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
 umountroot                                                                [  started  ]
 umountfs                                                                  [  started  ]
 umountnfs.sh                                                              [  started  ]
Dynamic Runlevel: manual

Ja tam uważam, że mi się to inaczej odpalało. xD

To teraz mam pytanie. Bo skoro w tym pliku /etc/.rc.conf się ma definiować układ, czyli need, before i inne, to na podstawie czego to ustaliło taki układ jak powyżej i gdzie można to znaleźć?

Te many są wielkości helpa i tam naprawdę nie ma zbytnio żadnej dokumentacji, np w rc-update czytamy:

Kod:

     add service             Add the service to the runlevel or the current
                             one if none given.  Services added to the boot
                             runlevel must exist in /etc/init.d.

     delete service          Delete the service from the runlevel or the cur-
                             rent one if none given.

No i pytanie za 100 punków, która usługa wystartuje jako pierwsza po dodaniu jej do określonego runlevela? xD Nigdzie nie mogę znaleźć o tym info, a to by na pewno rozwiązało wszystkie problemy jakie mam.

Offline

 

#40  2014-08-12 20:00:17

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Na początku OpenRC sprawdza zależności (depends) skryptów, a potem próbuje je wystartować równocześnie w danym runlevelu.
Jeśli jednak np jakiś skrypt z boot ma wpisaną zależność, która startuje z runlevelu default, to sam też wystartuje w default.

Szybkość bierze się z równoległego startu usług, zarówno w SystemD,
jak i OpenRC .
W OpeRC masz dwa tryby pracy, albo ustali sobie kolejność na podstawie depends w skryptach startowych, ale podnosi usługi kolejno, albo w ogóle podnosi je w miarę równocześnie, jak w konfigu oznaczysz:

Kod:

rc_parallel="YES"

Ta opcja daje kopa szybkości, ale bywa czasami problematyczne nawet w Gentoo, w Debianie w ogóle boję się myśleć, jak to może wyglądać.
Jak wystartuje pierwsza, to masz potem w logu, ja stawiam na dev/udev/kmod.

Ostatnio edytowany przez Jacekalex (2014-08-12 20:03:45)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#41  2014-08-12 21:16:35

  morfik - Cenzor wirtualnego świata

morfik
Cenzor wirtualnego świata
Skąd: ze WSI
Zarejestrowany: 2011-09-15
Serwis

Re: Przejście na OpenRC

No to jak sprawdza nagłówki to powinno być tak jak na sysvinit, bo tam mi wszystko startowało w określonej kolejności i nic się nigdy nie burzyło z tym montowaniem i odszyfrowaniem kontenerów.

Skąd on wywnioskował te pętle, to ja nie mam pojęcia.

Co do tego uruchamiania równoległego, to ja to wyłączyłem na samym początku -- mi zbytnio nie zależy na szybkości ale na tym by to działało jak trza. xD

Swoją drogą to tam w manie openrc napisali, że:

Kod:

     boot      Generally the only services you should add to the boot runlevel
               are those which deal with the mounting of filesystems, set the
               initial state of attached peripherals and logging.  Hotplugged
               services are added to the boot runlevel by the system.  All
               services in the boot and sysinit runlevels are automatically
               included in all other runlevels except for those listed here.

Może dopisać mu coś tutaj -- ja wiem, to wszystko co się tyczy odszyfrowania i montowania?

EDIT:

Eeee zły pomysł, po dodaniu wszystkich zależności do boot, to mi przy zamykaniu systemu startowało te usługi, a przy starcie to chciało gdzieś po środku ale i tak ten sam efekt wieszania się. Wróciłem do sysvinit póki co, tu działa jak trza.

Ostatnio edytowany przez morfik (2014-08-12 21:53:33)

Offline

 

#42  2014-08-23 20:28:59

  skullman - Użytkownik

skullman
Użytkownik
Zarejestrowany: 2010-04-08

Re: Przejście na OpenRC

To ja może z zupełnie innej beczki, czy jest możliwe na chwilę obecną mieć KDE i OpenRC na testingu? Działało mi przez kilka tygodni pięknie ale po powrocie z urlopu zrobiłem aktualizację i zassało mi systemd-sysv czyli teraz systemd jest domyślnym initem. Usunięcie chyba nie wchodzi w grę bo to badziewie jest w zaleźnościach kde-plasma-desktop. A może ktoś zna jakiś myk, żeby mieć zainstalowane w systemie systemd-sysv a mimo wszystko ustawić jako domyślny init OpenRC.

Offline

 

#43  2014-08-23 20:37:51

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Przejście na OpenRC

Niby ostatnio naprawili systemd-shim więc teoretycznie powinno działać z openrc, ale libpam-systemd w jessie wymaga systemd-sysv.
W sidzie jest nowsza wersja, która działa z systemd-shim.

Poprzednia wersja z sida libpam-systemd nie trafiła do testinga, więc nie wiem czy obecna trafi od razu za kilka dni (teoretycznie za 3 dni).

Offline

 

#44  2014-08-23 20:53:19

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Można było mieć równocześnie SystemD i OpenRC, wtedy tylko trzeba wskazać  kernelowi init, który ma podnieść, albo  ustalić to dowiązaniem /sbit/init.

System się podniesie do poziomu konsoli na pewno, ale nie wiem, jakie zależności będzie miał np manager logowania i środowisko graficzne.
Ale uwaga, taki test robiłem wieki temu, przed wchłonięciem Udeva przez SystemD.
Czy teraz usługa udeva czy logind się podniesie bez SystemD,
nie sprawdzałem.

Pozdro
;-)

Ostatnio edytowany przez Jacekalex (2014-08-23 20:59:38)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#45  2014-08-23 20:59:17

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Przejście na OpenRC

Teraz to raczej niemożliwe. Chyba, że wywali się policykit, udisk i pewnie pół KDE przy okazji.

Ja bym poczekał te kilka dni. Jak nie trafi pakiet do testinga, to dopiero wtedy bym zaczął kombinować.

Offline

 

#46  2014-08-23 21:03:21

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Udisk jest tylko nakładką na Udeva, Policykit u mnie nie woła o systemd, w Debianie trzeba by pociągnąć pewnie jakąś inną wersję.
Pół KDE  wymaga udiska? wręcz przeciwnie, udiska wymaga kdelibs, a to już nie pół, tylko całe KDE. xD

Dopiero w KDE5 jest zamiast kdelibs jest zgraja bibliotek z projektu kde-frameworks, także tam może by się dało zastąpić udiska garścią regułek udeva, zamiast SystemD wrzucić Eudev i OpenRC, i zrobić w ten sposób system, albo po prostu skompilować udiska i policykit bez systemd.

Albo Gentusia zatrudnić, tam flagi policykit, udev i udisk są w kdelibs opcjonalne, nie obowiązkowe, i raczej w kde-frameworks/*   się to nie zmieni. xD

Ostatnio edytowany przez Jacekalex (2014-08-23 21:10:24)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#47  2014-08-23 21:09:06

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Przejście na OpenRC

[quote=Jacekalex]Udisk jest tylko nakładką na Udeva, Policykit u mnie nie woła o systemd, w Debianie trzeba by pociągnąć pewnie jakąś inną wersję.[/quote]
W Debianie nie „woła”, a wręcz „wymaga” ;)
Wersja z sida nie wymaga.

Offline

 

#48  2014-08-23 21:12:37

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

[quote=yossarian][quote=Jacekalex]Udisk jest tylko nakładką na Udeva, Policykit u mnie nie woła o systemd, w Debianie trzeba by pociągnąć pewnie jakąś inną wersję.
.[/quote]
W Debianie nie „woła”, a wręcz „wymaga” ;)
Wersja z sida nie wymaga.[/quote]
Czyżby Sid zaczynał leczyć się z miłości do systemd?

Bo to, że SystemD wyjdzie Linuxowi bokiem, tak samo, jak kiedyś HAL, to tego  jestem pewien, nie spodziewałem się jednak, że tak szybko. xD

Ostatnio edytowany przez Jacekalex (2014-08-23 21:14:01)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#49  2014-08-23 21:16:31

  yossarian - Szczawiożerca

yossarian
Szczawiożerca
Skąd: Shangri-La
Zarejestrowany: 2011-04-25

Re: Przejście na OpenRC

Ludzie odpowiedzialni za systemd-shim przez pół roku go nie naprawiali i w końcu naprawiona wersja trafiła tylko do sida.

Offline

 

#50  2014-08-23 21:36:39

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Przejście na OpenRC

Ciekawe, kiedy powstanie jakiś pulseaudio-shim, który będzie udawał PA. ;)
W każdym razie fakt, że systemd-shim od czasu do czasu dostaje aktualizację pokazuje, że "natura nie znosi próżni". :D


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)

[ Generated in 0.023 seconds, 13 queries executed ]

Informacje debugowania

Time (s) Query
0.00014 SET CHARSET latin2
0.00005 SET NAMES latin2
0.00174 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.117.148.105' WHERE u.id=1
0.00122 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.117.148.105', 1713515050)
0.00056 SELECT * FROM punbb_online WHERE logged<1713514750
0.00078 DELETE FROM punbb_online WHERE ident='3.128.198.21'
0.00083 DELETE FROM punbb_online WHERE ident='47.128.30.198'
0.00122 DELETE FROM punbb_online WHERE ident='52.167.144.180'
0.00098 DELETE FROM punbb_online WHERE ident='54.36.148.121'
0.00096 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=25854 AND t.moved_to IS NULL
0.00018 SELECT search_for, replace_with FROM punbb_censoring
0.00638 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=25854 ORDER BY p.id LIMIT 25,25
0.00104 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=25854
Total query time: 0.01608 s