View previous topic :: View next topic |
Author |
Message |
pmatos Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Thu Jan 19, 2006 6:16 pm Post subject: Quickswitch from grub |
|
|
Hi all,
I've configured quickswitch and I wish to start if with kernel option so I added SWITCHTO=<profile> in grub and added different kernels for different profiles. The problem is in the quickswitch site you can read:
Quote: | To enable this, add the line "/usr/bin/switchto -s" into your rc.local or similar startup file. |
I could find the gentoo 'rc.local' file so I used /etc/conf.d/rc. Needless to say that when I started gentoo... A LOT of messages showed up since everytime the file was read (it seems to be read many times), the switchto command was ran.
Where should I run this command? It should be ran before checking /etc/conf.d/hostname because I change it depending on the profile.
Any ideas on where should I put the switchto command?
Cheers,
Paulo Matos |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sirtalon42 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 09 Aug 2005 Posts: 79
|
Posted: Thu Jan 19, 2006 7:05 pm Post subject: |
|
|
Gentoo's rc.local equivalent file is "/etc/conf.d/local.start". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pmatos Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Thu Jan 19, 2006 7:50 pm Post subject: |
|
|
sirtalon42 wrote: | Gentoo's rc.local equivalent file is "/etc/conf.d/local.start". |
Yes, but the problem is that this should be run before hostname is set by /etc/init.d/hostname and if I want to set a fixed IP address probably this should be ran before any net services. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
0x4a47 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Mar 2004 Posts: 18
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pmatos Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Jan 21, 2006 9:52 pm Post subject: |
|
|
Do you have quicknet boot script to boot at boot or default? Are you also changing hostname successfully?
Cheers,
Paulo Matos |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
0x4a47 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Mar 2004 Posts: 18
|
Posted: Sat Jan 21, 2006 10:06 pm Post subject: |
|
|
i did
Code: |
rc-update del net.eth0 default
rc-update add net.quickswitch default
|
i didn't change the hostname, but as you can edit it in switchto.conf on a per profile basis i guess that works, try it
JG |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pmatos Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Jan 21, 2006 10:20 pm Post subject: |
|
|
0x4a47 wrote: | i did
Code: |
rc-update del net.eth0 default
rc-update add net.quickswitch default
|
i didn't change the hostname, but as you can edit it in switchto.conf on a per profile basis i guess that works, try it
JG |
Unfortunately it doesn't work too well due to the fact that in boot level hostname script is ran and sets the hostname before quickswitch... hummm, now that I'm saying this... Probably I should deactivate that script! ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
0x4a47 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 24 Mar 2004 Posts: 18
|
Posted: Sat Jan 21, 2006 10:24 pm Post subject: |
|
|
well, if you need that hostname script (which only reads /etc/conf.d/hostname), i guess you could either deactivate the hostname init script and set the hostname with quickswitch.
you could also use different /etc/conf.d/hostname files and dynamically changing them in quickswitch config and change the depend() entry in net.quickswitch to load quickswitch before hostname (if that works because hostname is in boot runlevel, hm..)
JG |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pmatos Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sat Jan 21, 2006 10:35 pm Post subject: |
|
|
0x4a47 wrote: | well, if you need that hostname script (which only reads /etc/conf.d/hostname), i guess you could either deactivate the hostname init script and set the hostname with quickswitch.
you could also use different /etc/conf.d/hostname files and dynamically changing them in quickswitch config and change the depend() entry in net.quickswitch to load quickswitch before hostname (if that works because hostname is in boot runlevel, hm..)
JG |
I'll try to deactive it and see what happens. thx for the tips. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|