You are not logged in.
Pages: 1
Is there a way to specify specific config files for Arch at boot time. I would like to create different grub entries depending on where my laptop is at. Ie: home, coffee shop(open wifi), work (wpa closed wifi) etc... Not only would I like to select different network profiles at boot I would also like to have each of these different grub entries load a different set of modules. Such as not loading my wifi card drivers or daemon when I boot using the home profile, and not loading my ethernet driver when I'm on a wireless profile.
Thanks in advance.
Offline
Actually I don't think it's worth it as you have to choose at boot instead of when the system is running, ie there are no advantages, but if you want to try, you might google for runlevels
http://www.linux.com/feature/114107
http://www.linfo.org/runlevel_def.html
http://www.redhat.com/docs/manuals/linu … -init.html
http://wiki.archlinux.org/index.php/Adding_Runlevels
Offline
I guess what I'm looking for is something similar to gentoo's softlevels. You can have an unlimited number of named runlevels that basically run system configuration commands after the sysinit. I can think of five different, at boot, runlevels I would like to be able to select. For my laptop needs at boot would be the most appropriate time to select the system configuration, because once I boot I don't change my configuration. If things did change I could always run a script to adjust my settings after boot, or do it manually, but I haven't yet had the need for that.
I'm guessing that because there is nothing I have found in the wiki, and through basic googling, that Arch doesn't support this?
Thanks for the links btw.
Offline
I would like to create different grub entries depending on where my laptop is
This has been deprecated (and is actually an older version of this wiki article) but may still work. You still need netcfg2 installed I believe.
you can pass a NET= value on the kernel boot line, telling netcfg which profile you wish to start with
I'm not sure you can load specific modules using grub though.
flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)
Offline
Thanks I'll try NET= out.
Does anyone else do dynamic loading of modules based on your laptops location?
Offline
I guess what I'm looking for is something similar to gentoo's softlevels. You can have an unlimited number of named runlevels that basically run system configuration commands after the sysinit.
But afaik you can have only 4 softlevels mapped to init runlevels to choose from at boot. I'm not familiar enough with gentoo though.
I can think of five different, at boot, runlevels I would like to be able to select. For my laptop needs at boot would be the most appropriate time to select the system configuration, because once I boot I don't change my configuration. If things did change I could always run a script to adjust my settings after boot, or do it manually, but I haven't yet had the need for that.
I believe you can manage to have 3 more runlevels editing /etc/inittab
my:789:wait:/my/bootscript
x2:789:respawn:/your/login/manageryou can base your new bootscript on rc.multi: you can change the DAEMONS variable name to DAEMONS{7,8,9} (like it's suggested in the archwiki) and so on, but it might be a pain to mantain, even if init scripts aren't updated often.
I'm guessing that because there is nothing I have found in the wiki, and through basic googling, that Arch doesn't support this?
Not out of the box, but it doesn't take much effort.
Offline
But afaik you can have only 4 softlevels mapped to init runlevels to choose from at boot. I'm not familiar enough with gentoo though.
In gentoo softlevel scripts live at /etc/runlevel/<softlevel name>, they are just directories with sym links to init.d/. To use one you add softlevel=<name of softlevel directory> to the end of your grub kernel line. It works like what dyscoria was suggesting with the NET= and netcfg2. The softlevels themselves are not linked to init runlevels. They are just scripts that are run after a normal N3 boot.
The thing I like about softlevels is that they are simple. Just create a directory and drop in some sym links. I've not much experience using Arch's rc style boot. I'll look into adjusting it to support something like softlevels. I wanted to ask first in case I was missing something obvious. ![]()
Offline
carlocci wrote:But afaik you can have only 4 softlevels mapped to init runlevels to choose from at boot. I'm not familiar enough with gentoo though.
In gentoo softlevel scripts live at /etc/runlevel/<softlevel name>, they are just directories with sym links to init.d/. To use one you add softlevel=<name of softlevel directory> to the end of your grub kernel line. It works like what dyscoria was suggesting with the NET= and netcfg2. The softlevels themselves are not linked to init runlevels. They are just scripts that are run after a normal N3 boot.
thanks for your explanation, now it's clear.
The thing I like about softlevels is that they are simple. Just create a directory and drop in some sym links. I've not much experience using Arch's rc style boot. I'll look into adjusting it to support something like softlevels. I wanted to ask first in case I was missing something obvious.
I think it should be easy to write a script to parse /proc/cmdline, or maybe you could adapt gentoo rc script directly: we steal some guides and wikis of theirs anyway ![]()
Offline
Sorry for bringing this thread back to life but I noticed that appending this to your kernel line in grub seems to work:
NETWORKS=<net_profile_name>
eg:
kernel /boot/vmlinuz26 root=/dev/sda4 ro NETWORKS=HomeWiredWith the older netcfg, it USED to be NET= but I tried this instead and it appears to work. Hope this helps ![]()
Last edited by lefallen (2008-05-29 06:18:39)
JABBER: lefallen -A-T- jabber.quadronyx.com.au
E-MAIL: archlinuxforums -A-T- quadronyx.org
BLOG: http://www.quadronyx.com.au/blogs/fallen
~o~
Offline
Hi guys!
If you're still interested, I wrote a patch to add runlevel support in Arch.
Check it out: http://bbs.archlinux.org/viewtopic.php? … 89#p384789
Greetins by the Shogun.
Have fun and enjoy your life!
Offline
Pages: 1