View previous topic :: View next topic |
Author |
Message |
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Sun May 15, 2011 11:55 pm Post subject: |
|
|
I recently updated to openrc and found something that I think is broken. I followed the docs here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
It's way down to the bottom. Anyway, these grub lines no longer work as they did with the old baselayout:
Code: | title Gentoo boot level
kernel (hd0,0)/bzImage-2.6.38-r5-1 root=/dev/sda3 softlevel=boot
title Gentoo single user
kernel (hd0,0)/bzImage-2.6.38-r5-1 root=/dev/sda3 softlevel=single |
When I boot those, it always goes to the default runlevel regardless. What is the new way to do this? I ask not just for myself but for others as well plus the docs need to be updated to. As described in the docs, there are several reasons a person could need to boot to a runlevel other than default.
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6145 Location: Dallas area
|
Posted: Mon May 16, 2011 12:27 am Post subject: |
|
|
Not sure about boot, but for single init replace "softlevel=single" with "S" _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Last edited by Anon-E-moose on Mon May 16, 2011 12:35 am; edited 2 times in total |
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Mon May 16, 2011 12:34 am Post subject: |
|
|
Thanks. I got single working so far. I just added "rw single" to the end. I can't get it to boot to a specific runlevel tho. There should be a way to do this and there used to be but openrc is either different or has some missing features. I sometimes boot to nonetwork, if DSL is down, and sometimes just want to boot to the boot runlevel. Right now, that is not doable.
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6145 Location: Dallas area
|
Posted: Mon May 16, 2011 12:36 am Post subject: |
|
|
I haven't played with it in a long time, but using "2" should boot up runlevel 2 - no network, "3" runlevel 3, etc _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
takefive n00b
Joined: 17 May 2011 Posts: 4
|
Posted: Wed May 18, 2011 1:45 pm Post subject: |
|
|
Hello.
What is the required format for the /etc/init.d scripts? I notice /etc/init.d/vmware isn't working anymore. It does something like this:
Code: |
SCRIPTNAME="$0"
BASENAME=`basename "$SCRIPTNAME"`
# Check permissions
if [ "`id -ur`" != '0' ]; then
echo 'Error: you must be root.'
echo
exit 1
fi
vmwareService "$1"
exit 0
|
And vmwareService will actually do the work.
Looking at the other scripts I see they have a start() and a stop() function. Also they have a #!/sbin/runscript on the first line instead of #!/bin/bash.
How should I modify my vmware script in order to work? I think I could add the start() and stop() functions, but what about #!/sbin/runscript? |
|
Back to top |
|
|
vyedmic n00b
Joined: 02 Dec 2010 Posts: 40
|
Posted: Fri May 20, 2011 1:47 am Post subject: Entries in fstab ignored |
|
|
Hello.
Updated just yesterday and I have an issue with some entries in /etc/fstab being skipped and don't understand why. Everything worked fine before the upgrade and mount -a works fine still. Problem is that some of my daemons need the additional partitions and I have to start them super ugly way from /etc/local.d
Code: | /dev/sdc1 /boot ext2 noauto,noatime 1 2
/dev/sdc3 / ext3 noatime 0 1
/dev/sdc2 none swap sw 0 0
/dev/sda /mnt/store ext3 noatime,rw 0 3
/dev/sdb1 /mnt/webstore ext3 noatime,rw 0 4
/dev/sdb2 /mnt/store2 ext3 noatime,rw 0 5
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /selinux selinuxfs defaults 0 0
|
It's the /dev/sda /dev/sdb1 and /dev/sdb2 partitions that don't get mounted on boot. Also the /dev/sdc1 (boot partition) is mounted automatically and rw! Any help would be much appreciated.
EDIT: Had a look through /etc/init.d/localmount and don't see anything that could cause this.
EDIT2: Seemingly putting mtab into Code: | depend()
{
after ...
}
|
fixed stuff and so should everyone else who has this issue that me only had. Thanks for help. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3414 Location: Canada
|
Posted: Mon May 23, 2011 5:56 am Post subject: Re: Entries in fstab ignored |
|
|
vyedmic wrote: | Hello.
Updated just yesterday and I have an issue with some entries in /etc/fstab being skipped and don't understand why. Everything worked fine before the upgrade and mount -a works fine still. Problem is that some of my daemons need the additional partitions and I have to start them super ugly way from /etc/local.d
Code: | /dev/sdc1 /boot ext2 noauto,noatime 1 2
/dev/sdc3 / ext3 noatime 0 1
/dev/sdc2 none swap sw 0 0
/dev/sda /mnt/store ext3 noatime,rw 0 3
/dev/sdb1 /mnt/webstore ext3 noatime,rw 0 4
/dev/sdb2 /mnt/store2 ext3 noatime,rw 0 5
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /selinux selinuxfs defaults 0 0
|
It's the /dev/sda /dev/sdb1 and /dev/sdb2 partitions that don't get mounted on boot. Also the /dev/sdc1 (boot partition) is mounted automatically and rw! Any help would be much appreciated.
EDIT: Had a look through /etc/init.d/localmount and don't see anything that could cause this.
EDIT2: Seemingly putting mtab into Code: | depend()
{
after ...
}
|
fixed stuff and so should everyone else who has this issue that me only had. Thanks for help. |
did you check that you have mtab in the boot runlevel ? |
|
Back to top |
|
|
vyedmic n00b
Joined: 02 Dec 2010 Posts: 40
|
Posted: Tue May 24, 2011 1:31 am Post subject: Re: Entries in fstab ignored |
|
|
dmpogo wrote: | did you check that you have mtab in the boot runlevel ? |
Yes I have and yes I do. Only after I have put the mtab into for my localmount initscript it finally recognized my fstab fully.
And with that /boot being rw that was just me panicking. There's no security issue really. Sorry to be a pain. |
|
Back to top |
|
|
douganla n00b
Joined: 13 Apr 2011 Posts: 8
|
Posted: Thu Jun 23, 2011 7:26 pm Post subject: baselayout upgrade now getting nfsmount network unreachable |
|
|
After emerging sys-apps/baselayout-2.0.2 which includes openrc-0.8.2-r1, I cannot get nfs to mount. I am getting "network is unreachable". I have followed the openrc migration guide
http://www.gentoo.org/doc/en/openrc-migration.xml and made the adjustments to /etc/conf.d/net and /etc/rc.conf.
I checked and my net.eth0 and net.eth1 both start but they say the same thing in them (had to type, cannot cut and paste, no ssh) generally they both say:
start () {
einfo "Starting lo:3"
ebegin " Bringing up lo:3"
ifconfig lo:3 209.251.130.3 netmask 255.255.255.128 up 2>/dev/null
eend $?
}
How can net.eth0 and net.eth1 be the same? The scripts for net.eth0 and net.eth1 were very different before I did the emerge. Any help with this would be greatly appreciated. |
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Thu Jun 23, 2011 7:45 pm Post subject: |
|
|
Isn't net.eth0 and net.eth1 supposed to be links to net.lo like this:
Code: | root@fireball / # ls -al /etc/init.d/net.eth0
lrwxrwxrwx 1 root root 6 May 10 18:32 /etc/init.d/net.eth0 -> net.lo
root@fireball / # |
I don't have a net.eth1 but if I did it would link to net.lo as well.
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
Yuu Apprentice
Joined: 23 Dec 2008 Posts: 223 Location: France
|
Posted: Thu Jun 30, 2011 10:50 am Post subject: Re: shell_var |
|
|
deurk wrote: | Can anyone find a reason for this to be displayed when I restart a service?
Code: | * Caching service dependencies ... /lib64/rc/sh/rc-functions.sh: line 91: shell_var: command not found [ ok ] |
|
Sometimes, when I restart a service, I have the same issue and I didn't find any solution.
Any ideas ?
Thank you, and sorry if the subject has already been aborded.
---
Edit: found it.
I had a really old open-iscsi initscript in /etc/init.d/; and because I don't have sys-block/open-iscsi installed. So, I just removed this file and now it works flawlessly. Thus, rc-update -u is now running without complaints :] _________________ Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Last edited by Yuu on Thu Aug 25, 2011 11:36 am; edited 1 time in total |
|
Back to top |
|
|
KarlisRepsons Apprentice
Joined: 03 Nov 2008 Posts: 229 Location: Latvia
|
Posted: Fri Jul 01, 2011 4:46 pm Post subject: |
|
|
I wonder if anyone can help debugging this:
after a full system update and doing what openrc migration guide is telling, still this problem is left:
· on bootup all services in boot runlevel are started up just fine, but then nothing happens until I hit Ctrl+C
(this is then being output: "Entering runlevel 3");
· on shutdown the process goes to hwclock, it succeeds and then a freeze again...
Note that I do it on a system, which runs partially in RAM... The previous system worked just fine. |
|
Back to top |
|
|
KarlisRepsons Apprentice
Joined: 03 Nov 2008 Posts: 229 Location: Latvia
|
Posted: Mon Jul 04, 2011 8:11 am Post subject: |
|
|
Resolved my problem: silly enough I had set up syslog-ng to read a pipe /var/log/rc.log, where openrc was writing it's logs... It worked, but with various complications. Now it's a file, which is also read, but cron does $(echo -n > rc.log)... |
|
Back to top |
|
|
Paczesiowa Guru
Joined: 06 Mar 2006 Posts: 593 Location: Oborniki Śląskie, Poland
|
Posted: Wed Jul 06, 2011 8:44 pm Post subject: |
|
|
this worked in openrc-0.8.2:
Code: | routes_SSID="default via 192.168.0.253" |
but it doesn't work in 0.8.3, is it a bug or the syntax changes? |
|
Back to top |
|
|
Crenshaw Guru
Joined: 23 Jun 2004 Posts: 474 Location: Poland
|
Posted: Sat Sep 10, 2011 4:41 pm Post subject: |
|
|
Could someone look into this? https://forums.gentoo.org/viewtopic-t-893564-highlight-openrc.html I've got similar errors like these guys.
The problem is that during shutdown localmount gets killed when unmounting filesystems. This happens before root service is stopped so
when booting again I start with unclean root filesystem. That's not nice.
I've got a fresh install with openrc-0.9.3 on board.
fstab:
Code: |
/dev/sda5 / reiserfs noatime,notail 0 1
/dev/sda6 none swap sw 0 0
/dev/pool/home /home reiserfs noatime,notail 0 0
|
rc-update show boot
Code: |
bootmisc | boot
fsck | boot
hostname | boot
hwclock | boot
keymaps | boot
lvm | boot
modules | boot
mtab | boot
net.lo | boot
procfs | boot
root | boot
swap | boot
sysctl | boot
termencoding | boot
urandom | boot
|
any ideas what I might done wrong? |
|
Back to top |
|
|
milkteafuzz n00b
Joined: 10 Sep 2011 Posts: 2 Location: Austin, TX
|
|
Back to top |
|
|
MarcusXP Apprentice
Joined: 18 Apr 2007 Posts: 237 Location: Toronto, ON, Canada
|
Posted: Tue Sep 13, 2011 6:20 am Post subject: |
|
|
When my system boots (or when restarting some services) I get some warnings:
For example:
Quote: | W520 ~ # /etc/init.d/sshd restart
sshd | * Use of the opts variable is deprecated and will be
sshd | * removed in the future.
sshd | * Please use extra_commands or extra_started_commands.
sshd | * Stopping sshd ... [ ok ]
sshd | * Use of the opts variable is deprecated and will be
sshd | * removed in the future.
sshd | * Please use extra_commands or extra_started_commands.
sshd | * Starting sshd ... [ ok ] |
How do I get rid of these warnings?
I suspect they are related to openrc, but I can't figure out what to do next..
thanks in advance!
**EDIT**
I am running
Quote: | [ebuild R ~] sys-apps/openrc-0.9.3-r1 |
|
|
Back to top |
|
|
Kollin Veteran
Joined: 25 Feb 2006 Posts: 1139 Location: Sofia/Bulgaria
|
Posted: Tue Sep 13, 2011 7:32 am Post subject: |
|
|
MarcusXP wrote: | When my system boots (or when restarting some services) I get some warnings:
For example:
Quote: | W520 ~ # /etc/init.d/sshd restart
sshd | * Use of the opts variable is deprecated and will be
sshd | * removed in the future.
sshd | * Please use extra_commands or extra_started_commands.
sshd | * Stopping sshd ... [ ok ]
sshd | * Use of the opts variable is deprecated and will be
sshd | * removed in the future.
sshd | * Please use extra_commands or extra_started_commands.
sshd | * Starting sshd ... [ ok ] |
How do I get rid of these warnings?
I suspect they are related to openrc, but I can't figure out what to do next..
thanks in advance!
**EDIT**
I am running
Quote: | [ebuild R ~] sys-apps/openrc-0.9.3-r1 |
|
Wait for the next openrc releases. To remove those messages you need to edit the initscripts and replace 'opts variable' with extra_commands or extra_started_commands.If you are brave/knowledgeable enough you can do it your self .I'm going to wait... _________________ "Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..." |
|
Back to top |
|
|
MarcusXP Apprentice
Joined: 18 Apr 2007 Posts: 237 Location: Toronto, ON, Canada
|
Posted: Tue Sep 13, 2011 11:28 am Post subject: |
|
|
Kollin wrote: | Wait for the next openrc releases. To remove those messages you need to edit the initscripts and replace 'opts variable' with extra_commands or extra_started_commands.If you are brave/knowledgeable enough you can do it your self .I'm going to wait... |
I will take your advice and wait for next release
I have something else that really bothers me.
I thought I got rid of it when I uninstalled networkmanager (I thought that was causing the issue, but it seems that I was wrong).
When I restart net.eth0, I get this annoying error message saying that dhcpd is already running... how can I fix it?!
It seems to be related to the openrc version (I have a server running openrc-0.8.3-r1 and doesn't have this problem...
Quote: | W520 ~ # /etc/init.d/net.eth0 restart
net.eth0 | * Bringing up interface eth0
net.eth0 | * dhcp ...
net.eth0 | * Running dhcpcd ...
net.eth0 |dhcpcd[12869]: dhcpcd already running on pid 7813 (/var/run/dhcpcd-eth0.pid) [ !! ]
net.eth0 | * ERROR: net.eth0 failed to start
|
|
|
Back to top |
|
|
Kollin Veteran
Joined: 25 Feb 2006 Posts: 1139 Location: Sofia/Bulgaria
|
Posted: Tue Sep 13, 2011 1:20 pm Post subject: |
|
|
MarcusXP wrote: | Kollin wrote: | Wait for the next openrc releases. To remove those messages you need to edit the initscripts and replace 'opts variable' with extra_commands or extra_started_commands.If you are brave/knowledgeable enough you can do it your self .I'm going to wait... |
I will take your advice and wait for next release
I have something else that really bothers me.
I thought I got rid of it when I uninstalled networkmanager (I thought that was causing the issue, but it seems that I was wrong).
When I restart net.eth0, I get this annoying error message saying that dhcpd is already running... how can I fix it?!
It seems to be related to the openrc version (I have a server running openrc-0.8.3-r1 and doesn't have this problem...
Quote: | W520 ~ # /etc/init.d/net.eth0 restart
net.eth0 | * Bringing up interface eth0
net.eth0 | * dhcp ...
net.eth0 | * Running dhcpcd ...
net.eth0 |dhcpcd[12869]: dhcpcd already running on pid 7813 (/var/run/dhcpcd-eth0.pid) [ !! ]
net.eth0 | * ERROR: net.eth0 failed to start
|
|
Let dhcpcd manage network interfaces.
Just do /etc/init.d/dhcpcd restart
Dhcpcd is very powerful these days and you can do almost everything with it
man dhcpcd _________________ "Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..." |
|
Back to top |
|
|
MarcusXP Apprentice
Joined: 18 Apr 2007 Posts: 237 Location: Toronto, ON, Canada
|
Posted: Wed Sep 14, 2011 2:30 pm Post subject: |
|
|
I checked the manual and I couldn't find a way to restart DHCPCD for one interface only (eth0, for example).
Also, dhcpcd doesn't respond well to stop/start/restart commands:
Quote: | Sync ~ # /etc/init.d/dhcpcd stop
* WARNING: dhcpcd is already stopped
Sync ~ # /etc/init.d/dhcpcd start
* Starting DHCP Client Daemon ...
* start-stop-daemon: /sbin/dhcpcd is already running
* Failed to start dhcpcd [ !! ]
* ERROR: dhcpcd failed to start |
however, on another machine same commands are working fine (at least no errors are reported).
The funny thing is that I can do:
Quote: | DL1 ~ # /etc/init.d/dhcpcd stop
* Stopping DHCP Client Daemon ...
* Will stop /sbin/dhcpcd
* Will stop PID in pidfile `/var/run/dhcpcd.pid'
* Will stop processes of `/sbin/dhcpcd'
* Sending signal 15 to PID 12747 ... [ ok ]
DL1 ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:b2:22:e5
inet addr:10.10.10.80 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:feb2:22e5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:360610645 errors:0 dropped:102 overruns:0 frame:0
TX packets:554428706 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:357652375355 (333.0 GiB) TX bytes:400864178611 (373.3 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5392 (5.2 KiB) TX bytes:5392 (5.2 KiB)
sit0 Link encap:IPv6-in-IPv4
inet6 addr: ::127.0.0.1/96 Scope:Unknown
inet6 addr: ::10.10.10.80/96 Scope:Compat
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
DL1 ~ # /etc/init.d/dhcpcd start
* Starting DHCP Client Daemon ...
* Detaching to start `/sbin/dhcpcd' ... |
.. while connected remotely.
Wasn't supposed dhcpcd to release the IP address when I stop it? (thus, it should break the SSH connection that I had)
And when I start it, to re-negotiate with the DHCP server and assign an IP address again (could be the previous one or different one), but at least there should be a negotiation with the DHCP server? (which I don't see happening) |
|
Back to top |
|
|
Kollin Veteran
Joined: 25 Feb 2006 Posts: 1139 Location: Sofia/Bulgaria
|
Posted: Wed Sep 14, 2011 7:23 pm Post subject: |
|
|
I don't use dhcpcd's start/stop scripts anymore i'm controlling it with the console options..
or
or
Code: | dhcpcd -k && dhcpcd eth0 | etc.
Man pages are sweet _________________ "Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..." |
|
Back to top |
|
|
SeeksTheMoon Apprentice
Joined: 24 Sep 2003 Posts: 163
|
Posted: Fri Sep 16, 2011 8:10 pm Post subject: |
|
|
Hi, I want to know if it is possible to view/interact with openrc over a serial line because I did not find out how to do it.
So far I configured grub, the kernel and agetty to work via serial line, but openrc shows black silence, though I need to see what is going on and I want to be able to interact e.g. with "I" or dmcrypt passwords. |
|
Back to top |
|
|
wolfieh n00b
Joined: 17 Nov 2009 Posts: 54
|
Posted: Sat Sep 17, 2011 5:36 pm Post subject: |
|
|
something i discovered the other day when upgrading hard disk: init hangs withouth error if base /dev is empty (before udev is mounted). You need to copy some device files to make it work |
|
Back to top |
|
|
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Fri Oct 07, 2011 10:40 am Post subject: Re: shell_var |
|
|
Yuu wrote: | deurk wrote: | Can anyone find a reason for this to be displayed when I restart a service?
Code: | * Caching service dependencies ... /lib64/rc/sh/rc-functions.sh: line 91: shell_var: command not found [ ok ] |
|
Sometimes, when I restart a service, I have the same issue and I didn't find any solution.
---
Edit: found it.
I had a really old open-iscsi initscript in /etc/init.d/; and because I don't have sys-block/open-iscsi installed. So, I just removed this file and now it works flawlessly. Thus, rc-update -u is now running without complaints :] |
How did you figure out which script was causing the issue? I'll try to hunt down the script that is causing the same issue for me.
I edited some scripts in /etc/init.d/ that had the shell_variable in them, but that didn't help. So I edited the rc-functions.sh instead, and put the variable after "shell_variable" inside {} (shouldn't you have it as a rule and always do that?), and now the problem seems fixed:
Code: | 90 depend
-91 local _rc_svcname=$(shell_var "$RC_SVCNAME") _deptype= _depends=
92
90 depend
+91 local _rc_svcname=$(shell_var "${RC_SVCNAME}") _deptype= _depends=
92 |
_________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
|