[nycbug-talk] rc.conf / rc'ng hacking
Charles Sprickman
spork at bway.net
Thu Oct 13 14:53:15 EDT 2011
On Oct 13, 2011, at 2:45 PM, Isaac Levy wrote:
> Hi Mark,
>
> A couple of comments (some of them obvious):
>
> - How many boxes, and how physically close are they?
> Performing the buildworld/buildkernel dance, tar-piping /usr/src to N machines, and install/mergemaster seems pretty simple and scriptable, except for,
>
> - The mfsroot bit:
Just a quick pointer in case you're not aware of it - mfsbsd might be helpful as it's already got many of the basics in doing a remote install/upgrade handled. http://mfsbsd.vx.sk/ It's based on "depenguinator". I use it in combination with PXE booting, but that's not the only option.
Charles
> You want to change disk layout without PXE booting, or local disk access- on what sounds like unknown/aging hardware.
> 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...
>
> --
> 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 trange.
>
> --
> 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?
>
> Best,
> .ike
>
>
>
> 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="10.9.8.30"
>> ifconfig_bge0="inet 10.9.8.230 netmask 255.255.254.0 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
>>
>
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/talk
More information about the talk
mailing list