[nycbug-talk] rc.conf / rc'ng hacking

Mark Saad mark.saad at ymail.com
Thu Oct 13 17:13:24 EDT 2011

On Thu, Oct 13, 2011 at 2:45 PM, Isaac Levy <ike at blackskyresearch.net> wrote:
> Hi Mark,
> A couple of comments (some of them obvious):
> - How many boxes, and how physically close are they?
There are 90 + servers. They are 2000 miles away in Texas and California

> Performing the buildworld/buildkernel dance, tar-piping /usr/src to N machines, and install/mergemaster seems pretty simple and scriptable, except for,
Need to wipe the hd and re-partition , the previous guy set the
servers up with weird disk layouts . I have done this locally in ny
and it works.

> - The mfsroot bit:
> You want to change disk layout without PXE booting, or local disk access- on what sounds like unknown/aging hardware.

The servers are HP DL145g2 and g3 along with some DL380/360 g5 and g6

> I'd think this would fail all over the place, the smallest inconsistency would leave the boxes unusable, requiring physical intervention.
> Tell us how this goes...
I will and they boxes are not that old.

> --
> The rc.conf bit:
> I'd personally copy the files outright to a separate server, possibly toss some comment bits in at the top with other machine info- (ethernet mac addr for id, phyical locaiton, etc...)
> All that auto-parsing to generate the rc.conf bits just sounds strange.

agreed after some discussion on this we are going to just use a
staging ip and a mfsroot/install.cfg per device type to make this

> --
> One last sanity-check question: how many boxes are we talking about, and are you sure the procedure you outline below is cheaper than a fistfull of bootable USB keys, and some install.cfg defaults?

Its going to cost to much to pay the co-lo hotels noc staff , to do
the work and, in one case I cant not ensure the noc staff will not
royally screw this up. IE try to reinstall a windows box with freebsd
and or disconnect a cisco switch and ask where the vga cable goes.

> On Oct 13, 2011, at 11:32 AM, Mark Saad wrote:
>> All
>> I am working on a system to reinstall some of my remote freebsd
>> servers . I can not PXE boot them so here is the idea.
>> 1. Ship a newer kernel to the remote box , which is running
>> 6.x-RELEASE . In my case I have tarballs of 7.x-RELEASE, and
>> 8.x-RELEASE made from
>> the install media's kernel/generic.?? files
>> 2. Ship a custom mfsroot to the remote box, based in part on the one I
>> use for local jumpstarts
>> 3. Ship a loader.conf and loader.rc that instructs the remote box to
>> boot kernel=GENERIC and load the mfsroot and use it as its rootfs
>> So in this state if I reboot the remote server it will boot up and
>> follow the install.cfg I have in the mfsroot and I will have wiped out
>> the remote server,
>> changed the disk layout, which is important to me here, and upgraded
>> it to 7.x-RELEASE or 8.x-RELEASE depending on what I ship to that box.
>> So here is my question, I want to preserve the original rc.conf from
>> the old install. Here is an example.
>> hostname="eir-web30"
>> defaultrouter=""
>> ifconfig_bge0="inet netmask media 100baseTX
>> mediaopt full-duplex"
>> So my idea here was to have the script that creates and ships the
>> custom mfsroot fetch the rc.conf from the server I am going to
>> reinstall
>> and then grab some info from the rc.conf .
>> So following how I use install.cfg I need to grab the NIC type and and
>> well I could search for the first line that do not start with # and
>> look at the line with ifconfig then take the text after _ to the = and
>> set that as my NIC type.
>> So I was tired,lazy yesterday and I was wondering how does rc'ng
>> handle this , surely there has to be a rc'ng function to suck in from
>> rc.subr that I can call to get my nic type etc . I cant find anything,
>> can someone shed some light on how this handled ? Is there an easier
>> way to this ?
>> ---
>> Mark Saad | mark.saad at ymail.com
>> _______________________________________________
>> talk mailing list
>> talk at lists.nycbug.org
>> http://lists.nycbug.org/mailman/listinfo/talk

More information about the talk mailing list