How to reboot into single user mode WITHOUT cutting off networking? - BSD

This is a discussion on How to reboot into single user mode WITHOUT cutting off networking? - BSD ; Hi - My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to 6.3-RELEASE is that I do *NOT* have physical access to the console, neither via keyboard nor via modem *AND* that UPGRADING and Lucas' book strongly suggest that one ...

+ Reply to Thread
Results 1 to 15 of 15

Thread: How to reboot into single user mode WITHOUT cutting off networking?

  1. How to reboot into single user mode WITHOUT cutting off networking?

    Hi -

    My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    6.3-RELEASE is that I do *NOT* have physical access to the console,
    neither via keyboard nor via modem *AND* that UPGRADING and Lucas' book
    strongly suggest that one needs to "" after a
    "make kernel ..." and before a "make installworld".

    Here comes my idea, and I would like to get your feedback as experienced
    users (csup:/usr/src and portsnap:/usr/ports setup):

    1. csup
    2. make buildworld
    3. make buildkernel && make installkernel KODIR=/boot/kernel-TESTING-GENERIC
    4. nextboot -o "-s" -k kernel-TESTING-GENERIC
    5. ssh to server
    6. mergemaster -p
    7. make installworld
    8. make delete-old
    9. mergemaster -i
    10. reboot
    11. keep my fingers crossed ;-)

    Coming from the UNIX V world I was first looking for a way to "define" a
    customized runlevel like "single user inclusive networking and sshd",
    required by steps 4) and 5). But it seems that I couldn't find something
    appropriate. Does someone know if that can be done easily?

    One could replace steps 4) and 5) by:
    4. nextboot -k kernel-TESTING-GENERIC
    5. ssh to server
    5b. stop all unneeded process of /etc/rc.d

    Alternatively I could create a separate rc.d directory (stripped down)
    for that purpose only, *but* this looks like a very dirty hack to me.

    Any feedback welcome,
    Michael
    --
    to let

  2. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Michael Grimm wrote:

    > My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    > 6.3-RELEASE is that I do *NOT* have physical access to the console,
    > neither via keyboard nor via modem *AND* that UPGRADING and Lucas' book
    > strongly suggest that one needs to "" after a
    > "make kernel ..." and before a "make installworld".


    IMO no need to. Did that many times without single user mode, no problem.
    Stop all unnecessary services and do your upgrade. You can clean up using
    'make delete-old' after the next reboot.

    Helmut

    --
    No Swen today, my love has gone away
    My mailbox stands for lorn, a symbol of the dawn


  3. Re: How to reboot into single user mode WITHOUT cutting off networking?

    When the FB6.3-RC2 is available, the post give a link on how to make a minor
    upgrade, I used it to upgrade my system from FB7-BETA4 -> FB7-RC1
    succeffully. May be you can try it, it is fast and do not to go to single
    user mode.

    The FB6.3-RC2 post link
    is:http://lists.freebsd.org/pipermail/f...er/039352.html
    The link of the upgrade tool link
    is:http://www.daemonology.net/blog/2007...n-upgrade.html
    (It is also in the previous link)

    PS. It does not mention to build the kernel, but only after I have
    re-builded the kernel, I can see the uname changed.

    --Kemian

    "Michael Grimm" дϢ
    news:fm222t$fe0$1@odo.in-berlin.de...
    > Hi -
    >
    > My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    > 6.3-RELEASE is that I do *NOT* have physical access to the console,
    > neither via keyboard nor via modem *AND* that UPGRADING and Lucas' book
    > strongly suggest that one needs to "" after a
    > "make kernel ..." and before a "make installworld".
    >
    > Here comes my idea, and I would like to get your feedback as experienced
    > users (csup:/usr/src and portsnap:/usr/ports setup):
    >
    > 1. csup
    > 2. make buildworld
    > 3. make buildkernel && make installkernel
    > KODIR=/boot/kernel-TESTING-GENERIC
    > 4. nextboot -o "-s" -k kernel-TESTING-GENERIC
    > 5. ssh to server
    > 6. mergemaster -p
    > 7. make installworld
    > 8. make delete-old
    > 9. mergemaster -i
    > 10. reboot
    > 11. keep my fingers crossed ;-)
    >
    > Coming from the UNIX V world I was first looking for a way to "define" a
    > customized runlevel like "single user inclusive networking and sshd",
    > required by steps 4) and 5). But it seems that I couldn't find something
    > appropriate. Does someone know if that can be done easily?
    >
    > One could replace steps 4) and 5) by:
    > 4. nextboot -k kernel-TESTING-GENERIC
    > 5. ssh to server
    > 5b. stop all unneeded process of /etc/rc.d
    >
    > Alternatively I could create a separate rc.d directory (stripped down)
    > for that purpose only, *but* this looks like a very dirty hack to me.
    >
    > Any feedback welcome,
    > Michael
    > --
    > to let



  4. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Helmut Schneider wrote:
    > Michael Grimm wrote:


    >> My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    >> 6.3-RELEASE is that I do *NOT* have physical access to the console,
    >> neither via keyboard nor via modem *AND* that UPGRADING and Lucas'
    >> book strongly suggest that one needs to ""
    >> after a "make kernel ..." and before a "make installworld".

    >
    > IMO no need to. Did that many times without single user mode, no
    > problem. Stop all unnecessary services and do your upgrade. You can
    > clean up using 'make delete-old' after the next reboot.


    Thanks and good to know. But does that include major upgrades as well?

    Regards,
    Michael
    --
    to let

  5. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Kemian Dang wrote:

    > When the FB6.3-RC2 is available, the post give a link on how to make a
    > minor upgrade, I used it to upgrade my system from FB7-BETA4 ->
    > FB7-RC1 succeffully. May be you can try it, it is fast and do not to
    > go to single user mode.


    Thanks for your links. But that's dealing with binary upgrades. I have
    decided to do it via sources, because I want to learn that method.

    And once upon a time in the future I will have to accomplish a major
    upgrade anyway. The main purpose of my posting is to satisfy my
    curiosity how experienced BSD admins upgrade remote machines without
    physical access and if there exists something like "generating a custom
    runlevel".

    Regards,
    Michael
    --
    to let

  6. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Michael Grimm wrote:
    > Helmut Schneider wrote:
    >> Michael Grimm wrote:

    >
    >>> My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    >>> 6.3-RELEASE is that I do *NOT* have physical access to the console,
    >>> neither via keyboard nor via modem *AND* that UPGRADING and Lucas'
    >>> book strongly suggest that one needs to ""
    >>> after a "make kernel ..." and before a "make installworld".

    >>
    >> IMO no need to. Did that many times without single user mode, no
    >> problem. Stop all unnecessary services and do your upgrade. You can
    >> clean up using 'make delete-old' after the next reboot.

    >
    > Thanks and good to know. But does that include major upgrades as well?


    I successfully did an upgrade from 5.3 to 5.4 to 6.0 that way, but in
    general major upgrades should be done in front of a console or at least not
    far away from one.

    --
    No Swen today, my love has gone away
    My mailbox stands for lorn, a symbol of the dawn


  7. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Helmut Schneider wrote:
    > Michael Grimm wrote:


    [successful upgrades with single user mode]
    >> Thanks and good to know. But does that include major upgrades as
    >> well?

    >
    > I successfully did an upgrade from 5.3 to 5.4 to 6.0 that way, but in
    > general major upgrades should be done in front of a console or at
    > least not far away from one.


    Hmm ... Anyway, for my upcoming 6.2->6.3 upgrade I will it a try.

    Regards,
    Michael
    --
    to let

  8. Re: How to reboot into single user mode WITHOUT cutting off networking?

    In article ,
    Michael Grimm wrote:
    >Helmut Schneider wrote:
    >> Michael Grimm wrote:

    >
    >>> My main concern w.r.t. an upcoming upgrade from 6.2-RELEASE-p9 to
    >>> 6.3-RELEASE is that I do *NOT* have physical access to the console,
    >>> neither via keyboard nor via modem *AND* that UPGRADING and Lucas'
    >>> book strongly suggest that one needs to ""
    >>> after a "make kernel ..." and before a "make installworld".

    >>
    >> IMO no need to. Did that many times without single user mode, no
    >> problem. Stop all unnecessary services and do your upgrade. You can
    >> clean up using 'make delete-old' after the next reboot.

    >
    >Thanks and good to know. But does that include major upgrades as well?
    >
    >Regards,
    >Michael
    >--
    >to let


    I've been doing this remotely since 2000 when we moved about
    6 servers into a Level 3 colo.

    However I've always tested a new release on a local machine
    before doing it remotely.

    These machine have been upgraded from early 3.x to 4.11.
    All the machine after that have been upgrades - swap out a machine
    - so that the newer file systems can be installed - which won't
    happen upgrading out of 4.x to a 5.x or later.

    I really liked it when we had some Intel 1100 ?? 1RU servers.
    They had a bios that put the bios output on the serial port, and
    then when the OS booted, it swapped to the OS on the serial port.

    That mean I could go in through a serial port and reconfigure
    the bios if needed and have remote access without having a network
    running. I wish our newer machines had that.

    I've never had a problem about not rebooting on an upgrade.

    Though the newer OS versions take longer to come up and I was
    sweating it a couple of times before the pings came back.

    Bill

    --
    Bill Vermillion - bv @ wjv . com

  9. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Begin
    On Thu, 10 Jan 2008 19:51:35 GMT, Bill Vermillion wrote:
    [snip!]
    > Though the newer OS versions take longer to come up and I was
    > sweating it a couple of times before the pings came back.


    BIOSes vary considerably in quality. Most, even those for server gear,
    seem to still be written with a desktop in mind. I had IBM and fujitsu-
    siemens gear, and the IBM bios took a couple times longer. For example,
    the f-s gear fired off boot and spin-up commands to the entire chain in
    succession, then waited for them all to finish, and print out statuses
    based on the gear being ready. The IBM stuff did it sequentially and
    gave no option to change that. Same with the diagnostic boot and a
    couple more things. The hardware had similarly different sets of plusses
    and minuses. EG the IBMs had really nice bars of diagnostic lights, but
    one of the VRMs was soldered on board, the other was pluggable. Both did
    break, of course. The f-s gear mostly was just really big and awkward.

    And as you say, now you have a nice set of features, the next batch of
    hardware might be completely different. It seems that for real remote
    operation you either have to choose very carefully, or to get real
    server gear, which costs quite a penny more over the usual peecee stuff.
    While not always that much better, it tends to be more constant.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  10. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Bill Vermillion wrote:

    > However I've always tested a new release on a local machine
    > before doing it remotely.


    That saves a lot of tire wear, doesn't it?


    --
    Do not send me email replies -- this is a honeypot
    address for spam.

  11. Re: How to reboot into single user mode WITHOUT cutting off networking?

    In article ,
    jpd wrote:
    >Begin
    >On Thu, 10 Jan 2008 19:51:35 GMT, Bill Vermillion wrote:
    >[snip!]
    >> Though the newer OS versions take longer to come up and I was
    >> sweating it a couple of times before the pings came back.


    >BIOSes vary considerably in quality. Most, even those for server gear,
    >seem to still be written with a desktop in mind. ...


    The Intel machines came out during the boom of the internet in
    2000. Besides having a bios that put the BIOS routines out the
    serial port and then switching to the OS it was really designed for
    server installation.

    It was set up [probably with PXE] so that you could load about
    50 servers in parallel taking only about 1.5 times as long as
    a single server setup. The docs were targeted to the Linux world,
    but the FreeBSD loads were similar but only slightly slower.
    And there was no video on that machine as I recall.

    The 'net meltdown in 2001 sort of ended the machines that were
    truly designed for server mode, even in 'lights-out' environment.
    Too bad that nothing like this exists now - AFAIK - but then again
    dozens of ISPs springing up daily is no longer with us - and we can
    probably be thankful for that.

    >I had IBM and fujitsu-siemens gear, and the IBM bios took a
    >couple times longer. For example, the f-s gear fired off boot and
    >spin-up commands to the entire chain in succession, then waited
    >for them all to finish, and print out statuses based on the gear
    >being ready. The IBM stuff did it sequentially and gave no option
    >to change that. Same with the diagnostic boot and a couple more
    >things. The hardware had similarly different sets of plusses
    >and minuses. EG the IBMs had really nice bars of diagnostic
    >lights, but one of the VRMs was soldered on board, the other was
    >pluggable. Both did break, of course. The f-s gear mostly was
    >just really big and awkward.


    Sounds like IBM still had the 'mainframe attitude' :-) I have
    mixed emoticons on plug-in versus soldered - at least in other
    environments. In my pre-computer employment years I worked
    as a recording engineer. One of our problems with one
    manufacturers machine was the control system used sockected IC's as
    they figured it would be quicker to repair. But the sockets
    would oxidize as the metal on the chips was different than the
    sockets. They finally went to a soldered board. In electronics
    one of the best connections was wire-wrap - done with a machine not
    by hand - as the copper wire wrapped on copper posts would
    see the material migrate [not the correct word but I can't think of
    it at the moment] so they became as one. ISTR the wire-wrap
    approach had an expected lifetime of 17 years while soldered
    were good for about 5. That was telco research and things like
    that were designed for long maintanance free life - while now
    techology advances seem to deem equipment replacement long before
    any soldered interoconnnections would fail.

    But again we now have integration to the extent in chips that all
    those problems aren't seen.

    >And as you say, now you have a nice set of features, the next
    >batch of hardware might be completely different. It seems
    >that for real remote operation you either have to choose very
    >carefully, or to get real server gear, which costs quite a penny
    >more over the usual peecee stuff. While not always that much
    >better, it tends to be more constant.


    We don't have a huge number of servers, but over the years
    we have settled on using only Intel motherboards - as they seem to
    be the most consistent and have given us no problems - except
    to upgrade the BIOSes - but those were done when we built them.

    Bill

    --
    Bill Vermillion - bv @ wjv . com

  12. Re: How to reboot into single user mode WITHOUT cutting off networking?

    In article ,
    Michael Sierchio wrote:
    >Bill Vermillion wrote:
    >
    >> However I've always tested a new release on a local machine
    >> before doing it remotely.

    >
    >That saves a lot of tire wear, doesn't it?


    Well I'm lucky. I have badged 24x7 access to the colo.
    And it's about 15 minutes by car at 3AM. More like 30-45 minutes
    during traffic times :-(

    We've had about 7 or 8 hours total downtime since February 2000
    when we moved into the building. Most of that came from
    a failing Cisco 72?? router. I got a call about 2AM from a client
    with a couple of servers in our rackspace - and drove there - found
    the Cisco and restarted it. About 30 minutes after I got home I
    got another call. Same thing.

    Called my partner and he went to the colo and he restarted the
    Cisco [which would stay up only 30 minutes at a time] and I went
    into one of our FreeBSD boxen and configured that as a router.

    Once that was done the Cicso [cost us about $17,000 as I recall]
    was pulled and the FreeBSD stayed in place for a long time, until
    we replaced it with a Foundry router/switch.

    I'd be a lot more concerned about remote-booting if I weren't so
    close. That facility has NO ONE in the building after regular
    hours - and 'remote-hands' would have to be called in - and that
    would not be cheap. Sort of spooky being in a building with
    hundreds of millions in electronics and absolutely no one anywhere
    near. Of couse the remote video monitoring 'knows all sees all'

    Bill

    --
    Bill Vermillion - bv @ wjv . com

  13. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Bill Vermillion wrote:
    > The 'net meltdown in 2001 sort of ended the machines that were
    > truly designed for server mode, even in 'lights-out' environment.
    > Too bad that nothing like this exists now - AFAIK - but then again


    Well, if we could convince all hw vendors to use OpenBIOS[1] (aka Open
    Firmware) perhaps we could solve it.


    References:
    1) OpenBIOS http://www.openbios.info/
    --
    Torfinn Ingolfsen,
    Norway

  14. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Begin
    On Fri, 11 Jan 2008 15:39:19 GMT, Bill Vermillion wrote:
    > I have mixed emoticons on plug-in versus soldered - at least in other
    > environments.


    Well, in the case I mentioned the VRMs were little PCBs on connectors,
    and anyway, the environment was (somewhat) controlled. The boards were
    of tyan manufacture, altough (I think) customized for IBM. Running
    toward the end I had several of those machines --in roles that didn't
    need much in terms of cpu, of course-- running on a single secondary
    cpu because the on-board VRM had died. Seeing how often the VRM died as
    opposed to the rest of the system, on-board VRMs just didn't make sense.


    [snip!]
    > We don't have a huge number of servers, but over the years
    > we have settled on using only Intel motherboards - as they seem to
    > be the most consistent and have given us no problems - except
    > to upgrade the BIOSes - but those were done when we built them.


    You are small enough that you can, easily enough. But for large server
    farms, or even if you have, say, 10000 peeces to maintain, you get
    problems. Like, oh, some machines die and now you get to buy 5 y/o
    hardware at really steep prices to keep the pool consistent. Otherwise
    your standard images become useless, and you can't maintain that number
    of machines without standardized images. The software still typically
    run on peecee farms is also not very forgiving of hardware changes.

    If you're that big you can buy spares on initial purchase, but that's
    not the end of it. One sensible solution I know is being used is to
    roll out in waves. Every year the oldest quarter of the population gets
    upgraded, and breakdowns get upgraded to whatever is the latest.

    That still means having to maintain four images for hardware reasons. If
    that is the only variable it is doable and definately better than 10000
    images. If you also have to maintain image versions depending on usage
    it gets more annoying.

    Hard to imagine there are still shops that do a brand new installation+
    activation+s/w installation each and every time something breaks or a
    new machine comes in. Truly, that vendor can boast it is /so good/ for
    the economy because of all the work it creates. Wasn't automation ment
    to reduce work needed to get more done instead? But anyway.

    I'm glad I'm running a system that lets me tailor that sort of stuff
    with a bit of scripting instead, no third party s/w needed.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  15. Re: How to reboot into single user mode WITHOUT cutting off networking?

    Bill Vermillion wrote:
    > Michael Grimm wrote:


    [remote FBSD upgrade 6.2 ==> 6.3]

    >> But does that include major upgrades as well?

    >
    > I've been doing this remotely since 2000 when we moved about 6 servers
    > into a Level 3 colo.
    >
    > However I've always tested a new release on a local machine before
    > doing it remotely.


    JFTR: I did test the upgrade under Parallels at my desktop. This worked
    like a charm. Therefore I did upgrade my remote server the same way,
    without any issues as well.

    Thanks to all of you,
    Michael
    --
    to let

+ Reply to Thread