Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 40

Thread: Howto: avoid having to reboot!

  1. #21
    Join Date
    Mar 2005
    Location
    Australia
    Beans
    418
    Distro
    The Feisty Fawn Testing

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by joshuapurcell
    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?
    "telinit N", where N is the runlevel to change to, is the canonical way - however "init N" works fine too (although there may be Unixes where it doesn't work).

  2. #22
    Join Date
    Jul 2005
    Location
    Sunny Coast Australia
    Beans
    30
    Distro
    Hardy Heron (Ubuntu Development)

    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
    Pete,

    1. On my ubuntu setup I have a bridged network which the graphical utility cannot understand, so I am forced to use the /etc/network/interfaces file. To add a default gateway in this is easy.

    Code:
    iface eth0 inet static 
    address 192.168.1.2 
    network 192.168.1.0 
    netmask 255.255.255.0 
    broadcast 192.168.1.255
    gateway 192.168.1.1 
    2. When restarting network from remote I have also had the problem you describe. I believe it is because when you loose connectivity, linux no longer can process the command because it looses its output.

    There is a handy program called "screen" It acts like a buffer between your shell and the output display. Think of it like VNC for ssh/telnet. (You can disconnect from it and your application stays running.

    This is how it works for me:
    ssh -l user somewhere.com
    # screen
    # /etc/init.d/network restart

    ----Disconnected----
    ssh -l user somewhere.com
    # screen -r (This re-attaches me to a running screen)

  3. #23
    Join Date
    May 2005
    Location
    Jyväskylä, Finland
    Beans
    31
    Distro
    Kubuntu

    Re: HOWTO: avoid having to reboot!

    Quote Originally Posted by Heliode
    That's also a good one! Not recommended if you are running a server people depend upon, but great for workstation users who don't like to wait for their system to reboot!
    That's the reason for wall command:

    # echo "**** off" | wall && init 1


  4. #24
    Join Date
    Nov 2005
    Location
    Finland, Oulu
    Beans
    1,501
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: avoid having to reboot!

    The tweak firefox link is down. But there is another thread that does what you say... search for 'diggity' and find the firefox link. Just trust me... that is how I remembered to find it.
    Like my avatar? Help us make more and your own! http://launchpad.net/memaker
    Book of Mormon-MP3 or BOOK
    "Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy

  5. #25
    Join Date
    May 2005
    Location
    Kansas City, Missouri, US
    Beans
    230

    Re: HOWTO: avoid having to reboot!

    If you make changes to /etc/fstab you can test or implement them right away without rebooting by simply doing:
    Code:
    sudo mount

  6. #26
    Join Date
    Apr 2006
    Location
    Brazil
    Beans
    21
    Distro
    Ubuntu 6.06

    Re: Hotwo: avoid having to reboot!

    First of all, thanks for the tips (the "HOWTO backup" is awesome).

    Why both of the lines does not do the same job?
    I mean.. both of the lines should do the same thing, isnt it?

    oem@ubuntu:/etc/init.d$ sudo networking restart
    sudo: networking: command not found

    and this dont:
    oem@ubuntu:/etc/init.d$ sudo /etc/init.d/networking restart


    I know its a tipic roockie question, but you know...

    networking is a service running.. and Bash interprets like as a command, this is why i got command not found. Right?
    But why bash does not interpret when i put all the path along with?

    Thx

  7. #27
    Join Date
    May 2005
    Location
    Kansas City, Missouri, US
    Beans
    230

    Re: Hotwo: avoid having to reboot!

    Networking isn't a command, but a service run at boot time. The script for it is located in /etc/init.d, and the way to restart is it
    Code:
    sudo /etc/init.d/networking restart
    This kind of "command" will work for any service, by the way...as far as I know. It's handy to restart, or to stop, or start, a service sometimes as a way of troubleshooting--for example, when there's no sound. (But this evening the main trouble was that I had my headphones plugged into the wrong outlet, and it took me an hour to find out.)

    The "restart" isn't a command recognized by bash but a special function associated with the scripts in init.d. With "sudo networking restart" bash interprets the word immediately after "sudo" as referring to a command--but that command doesn't exist. When a PATH follows "sudo," bash knows something special's going on: Either a command is coming up that is executed out of the directory being stated, or a special function. So there's no error message as long as either a command or a special function follows the path statement.
    Last edited by jonrkc; June 28th, 2006 at 07:27 AM.

  8. #28
    Join Date
    Mar 2007
    Beans
    3

    Question Re: Hotwo: avoid having to reboot!

    I have read through this thread and found the howto and follow up posts informative. I do have a question regarding performance, relating to memory.

    I've noticed when I have multiple applications open, performance of course decreases somewhat because the available hardware memory is being minimized. Ok, well if I close many of these and leave a few open, will the memory being used from those programs be cleanly released back into availability?

    As well, is it a good practice to periodically Ctrl-Alt-Backspace, just because, or is it only necessary after applied config or update changes?

    Thanks

  9. #29
    Join Date
    Sep 2005
    Location
    Winnipeg, Canada
    Beans
    174
    Distro
    Ubuntu

    Re: Hotwo: avoid having to reboot!

    These do the job for me

    Code:
    sudo modprobe --force ndiswrapper
    
    sudo ifup --force eth1
    no need to unload and reload.
    linux, linux, linux

  10. #30
    Join Date
    Dec 2007
    Beans
    19
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Hotwo: avoid having to reboot!

    After reading this thread, somebody might have a solution for one of the reasons I reboot my hardy workstation almost once a day.

    It seems like if I ever watch a video which is flash encoded then all my sound drivers are messed up except those for real player until I reboot. Totem will no longer play any sounds, nor will VLC until I restart my system. Does some body have a command line that could fix my sound issue(s) without rebooting?

Page 3 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
  •