Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Howto: avoid having to reboot!

  1. #11
    Join Date
    Apr 2005
    Location
    seoul, korea
    Beans
    130
    Distro
    Ubuntu Breezy 5.10

    Re: Hotwo: avoid having to reboot!

    thanks a lot. i will try it right away

  2. #12
    Join Date
    Jan 2005
    Beans
    346

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by _Pete_
    Also good trick to really get everything restarted without rebooting is going
    to the single user mode (init 1) and then back to the normal runlevel (init 2).
    what are the commands for #2?

    i can get to single user mode with sudo /etc/init.d/single start but i can't figure out how to get back to normal mode ...

  3. #13
    Join Date
    Jan 2005
    Beans
    346

    Re: HOWTO: avoid having to reboot!

    also the ipw2200 card does have to be reloaded sometimes (this is a nasty bug that they've been trying to fix for a long time now .. sooner or later it will be gone).

    to do this i wrote a simple shell script

    sudo rmmod ipw2200
    sudo modprobe ipw2200
    sudo ifdown eth0
    sudo rm /etc/network/interfaces
    sudo ln -s /etc/network/interfaces.home /etc/network/interfaces
    sudo ifup eth0

    that just reloads the module, takes down the interface, and i use different /etc/network/interfaces.* files for the different network enviorments i'm in (have one for home, one for work etc etc) and the third and fourth command remove the symbolic link and link whatever interface file i need at the time. then it brings the interface back up of course.

    writing different etc/network/interface files and having different versions of a script like that is the easiest way i've found to manage wireless networks. i can just type home or work or class and the network works great.

  4. #14
    Join Date
    Jun 2005
    Location
    The Netherlands
    Beans
    110
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Hotwo: avoid having to reboot!

    Quote Originally Posted by Heliode
    did you try;

    sudo /etc/init.d/networking restart

    sudo ifdown eth0

    sudo ifup eth0

    sudo dhclient eth0 (if you're using DHCP)
    k thnx dude

    i was getting worried because the networking restart doesnt do anything, wel it doesnt refresh the dhcp lease but now i know how thnx

    used to working with fedora core and red hat so i was typing "service network restart" more often because of frustration

  5. #15
    Join Date
    Mar 2005
    Beans
    115

    Re: Hotwo: avoid having to reboot!

    Whoops... can a mod please change

    Reload this Page Hotwo: avoid having to reboot!

    into

    Reload this Page Howto: avoid having to reboot!

    ?

    "Windows is something to overcome"

    Howto's by me:
    Tweak firefox! (URL now works..)
    Backup/Restore your system!
    Avoid having to reboot


    Compentux.org
    , the Linux Tip & Howto gathering initiative!

  6. #16
    Join Date
    Apr 2005
    Location
    The Netherlands
    Beans
    14

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by jerome bettis
    what are the commands for #2?

    i can get to single user mode with sudo /etc/init.d/single start but i can't figure out how to get back to normal mode ...
    sudo init 1
    sudo init 2

    to switch to runlevel 1 and 2 respectively

  7. #17
    Join Date
    Oct 2004
    Location
    Panamá
    Beans
    1,427
    Distro
    Ubuntu Studio 9.04 Jaunty Jackalope

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by Tobi Vollebregt
    sudo init 1
    sudo init 2

    to switch to runlevel 1 and 2 respectively
    Actually you don't need to use sudo when going back to runlevel 2 'cause in singleuser you're actually in the root account.

  8. #18
    Join Date
    Feb 2005
    Beans
    11

    Re: HOWTO: avoid having to reboot!

    Hi All,

    I'm working on a ubuntu hoary 5.04, installed as server only, via ssh command line, with no gui available, on a remote machine, that I don't want to bug the locals to reboot.

    3 Questions, if I may:

    1) does one _permanently_ set the default route by adding a gateway line to the /etc/networking/interfaces file? ("sudo ip route add default via" wasn't permanent after reboot, ugh, and so my ssh access from the outside external network no longer worked...)

    2) /etc/init.d/networking restart drops my remote connection and doesn't bring the interfaces back up (so I have to ask the locals to reboot because I could no longer diagnose the problem). What would cause the connection to permanently drop? Could it be not having a gateway line in the interfaces file? Is there something else wrong with "network restart" in hoary? I'm I missing something else?

    3) Is there a lighter way to simply "reload" the interfaces file besides "networking restart"? Would something like "if-down && if-up" be lighter and do the job (remember, I'm working through a remote ssh terminal).

    Thanks!
    Pete

  9. #19
    Join Date
    Oct 2004
    Beans
    30

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by _Pete_
    Also good trick to really get everything restarted without rebooting is going
    to the single user mode (init 1) and then back to the normal runlevel (init 2).
    How do you do that?

    sorry didn't read above, please ignore
    Last edited by xinel; August 26th, 2005 at 10:13 AM. Reason: the answer to my question was already in thread

  10. #20
    Join Date
    Apr 2005
    Location
    Dallas
    Beans
    217
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by PeteJ
    Hi All,

    I'm working on a ubuntu hoary 5.04, installed as server only, via ssh command line, with no gui available, on a remote machine, that I don't want to bug the locals to reboot.

    3 Questions, if I may:

    1) does one _permanently_ set the default route by adding a gateway line to the /etc/networking/interfaces file? ("sudo ip route add default via" wasn't permanent after reboot, ugh, and so my ssh access from the outside external network no longer worked...)

    2) /etc/init.d/networking restart drops my remote connection and doesn't bring the interfaces back up (so I have to ask the locals to reboot because I could no longer diagnose the problem). What would cause the connection to permanently drop? Could it be not having a gateway line in the interfaces file? Is there something else wrong with "network restart" in hoary? I'm I missing something else?

    3) Is there a lighter way to simply "reload" the interfaces file besides "networking restart"? Would something like "if-down && if-up" be lighter and do the job (remember, I'm working through a remote ssh terminal).

    Thanks!
    Pete
    I've never quite figured this one out, but I don't get disconnected from a server when issuing the network restart command (while connected through telnet or ssh). You would think you'd get disconnected... ifdown eth0 && ifup eth0 should do the trick as well.

    Also, I find myself using the networking gui front-end every day a couple of times (when coming and going from work/home). You get to it through this command:

    network-admin

    You are able to bring your network devices up/down, and change their configuration easily (almost as easily as editing the needed /etc/network/interfaces config file).

    EDIT: Speaking of the init comman mentioned above, I've always used that to change the runlevel, but recently I've read about the telinit command. I've heard that it's better to use telinit, but I can't seem to find a difference between the two commands. Anyone have a clue?
    Last edited by joshuapurcell; September 20th, 2005 at 03:29 AM.

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •