You are not logged in.

#1 2008-03-30 21:41:06

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

An unusual question about rc.conf. Not really sure where to put it.

Hello, I have a really weird question for my first post. I haven't had any luck elsewhere, so I'm now turning here.

I have Arch set up to boot into Xfce with gdm, hal, fam, samba, et cetera. I also have the ability to boot into a terminal from GRUB.

I would like to know if it is possible to specify an alternate rc.conf file to be used in GRUB. Ideally, I would like to have "Arch Full" which has everything running, "Arch Server" which has no GUI and samba httpd and mysqld running, "Arch Minimal" which is just a terminal, and so on. I was planning to make a seperate rc.conf file for each. Something like "/etc/rc.conf.full", "/etc/rc.conf.server", et cetera.
Is it possible to change the rc.conf file used by passing a parameter in GRUB? I looked into the kernel boot parameters, but that didn't help.

Last edited by Barrucadu (2008-03-30 21:43:52)

Offline

#2 2008-03-30 22:22:35

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: An unusual question about rc.conf. Not really sure where to put it.

AFAIK, there isn't this functionality built into the Arch boot scripts.  If you want this functionality then you could edit /etc/rc.sysinit so it chooses which rc.conf file to source based on a kernel boot parameter.

Offline

#3 2008-03-30 22:32:15

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: An unusual question about rc.conf. Not really sure where to put it.

http://wiki.archlinux.org/index.php/Adding_Runlevels

You might want to edit rc.single too, as it does a somewhat ugly

if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
  # Shutdown daemons

But who ever needed to go single user anyway?


edit: I just noticed the wiki page is wrong (I think)

rm:2345:wait:/etc/rc.multi
rm:5:wait:/etc/rc.multi5

should be

rm:234:wait:/etc/rc.multi
rn:5:wait:/etc/rc.multi5

Last edited by carlocci (2008-03-30 22:40:30)

Offline

#4 2008-03-30 22:42:14

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: An unusual question about rc.conf. Not really sure where to put it.

retsaw wrote:

AFAIK, there isn't this functionality built into the Arch boot scripts.  If you want this functionality then you could edit /etc/rc.sysinit so it chooses which rc.conf file to source based on a kernel boot parameter.

That sounds like my best option. I've never done anything like this before, so how would I go about checking the boot parameters?

Offline

#5 2008-03-30 22:51:39

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: An unusual question about rc.conf. Not really sure where to put it.

I've just tried the runlevels method and get a kernel panic. I am using runlevels 7 and 8. Normal Arch still works fine though.

Edit: I just switched to runlevels 2 and 4. It all works smile
By disabling all the daemons, my "Arch Mini" uses 26MB of RAM!

Last edited by Barrucadu (2008-03-30 23:03:37)

Offline

#6 2008-03-30 23:41:11

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: An unusual question about rc.conf. Not really sure where to put it.

Barrucadu wrote:

I've just tried the runlevels method and get a kernel panic. I am using runlevels 7 and 8. Normal Arch still works fine though.

Edit: I just switched to runlevels 2 and 4. It all works smile
By disabling all the daemons, my "Arch Mini" uses 26MB of RAM!

Wow. That is impressive. That's like sub-Damn Small Linux-land.

Offline

#7 2008-04-01 18:23:35

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: An unusual question about rc.conf. Not really sure where to put it.

Barrucadu wrote:
retsaw wrote:

AFAIK, there isn't this functionality built into the Arch boot scripts.  If you want this functionality then you could edit /etc/rc.sysinit so it chooses which rc.conf file to source based on a kernel boot parameter.

That sounds like my best option. I've never done anything like this before, so how would I go about checking the boot parameters?

you can find them in /proc/cmdline

Offline

#8 2008-04-01 20:32:33

alex_anthony
Member
From: UK
Registered: 2007-09-25
Posts: 344

Re: An unusual question about rc.conf. Not really sure where to put it.

Put what you did in the wiki. It would be interesting to try that some time without having to find this thread.

Offline

#9 2008-04-02 10:33:36

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: An unusual question about rc.conf. Not really sure where to put it.

I'm not sure what to put in the wiki - I just followed the steps in there.

Offline

#10 2008-04-02 11:36:13

alex_anthony
Member
From: UK
Registered: 2007-09-25
Posts: 344

Re: An unusual question about rc.conf. Not really sure where to put it.

well what changes did you have to make to rc.sysinit? Maybe post your edited version

Offline

Board footer

Powered by FluxBB