From owner-freebsd-questions@FreeBSD.ORG Wed Apr 22 08:18:56 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38382106564A for ; Wed, 22 Apr 2009 08:18:56 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-fx0-f167.google.com (mail-fx0-f167.google.com [209.85.220.167]) by mx1.freebsd.org (Postfix) with ESMTP id 88DA58FC16 for ; Wed, 22 Apr 2009 08:18:55 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by fxm11 with SMTP id 11so2969465fxm.43 for ; Wed, 22 Apr 2009 01:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=iRvwwPv6J3QLKE8pCZvcVEPSEFo4GE6o/sDQB0FZ6k8=; b=C+wPmHXCBlLLf/LqV1lzjsZcyD9xs+thPwBpQtPbFoBDndTEqDeF4I8+Ym0nvpIWRC Ipy6GfKcamT8rmfqUdDaSgrw7bSs3WmxJ8bt1FMrBn1Yb+LMBu5HJIuB5f5u8n+Fx4+d yVdmMqlhE03HAVoUnSMV5zNG2Nq/H5t4p9jaY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Cn4qpElfqvw2dLmIVthAiY8wx4UMX/FB1MC9zWLBNChbYAbjxKGnibrYQZtW0xCV3c E6v/jv8+3+y2NxHg64VG5heX759+r+IEN0HJhOGEaRUNEAGsF88vcBALCBelbkyS67kF +BVy3MRTkZ6RLWYSAW0xJ3mKpLXD/nGueee90= MIME-Version: 1.0 Received: by 10.223.105.195 with SMTP id u3mr2410061fao.13.1240388334569; Wed, 22 Apr 2009 01:18:54 -0700 (PDT) In-Reply-To: References: Date: Wed, 22 Apr 2009 11:18:54 +0300 Message-ID: <991123400904220118y1b5d3ca7w5e7128d05820cbf6@mail.gmail.com> From: =?UTF-8?B?T2RoaWFtYm8gIOODr+OCt+ODs+ODiOODsw==?= To: complists@risei.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Customized Remote Install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 08:18:56 -0000 On Tue, Apr 21, 2009 at 11:42 PM, Scott Seekamp wrote: > I've done a lot of searching and maybe this capability doesn't exist, but I > am looking to do this: > > I am at my company's HQ, we have a new field office that I am setting up a > FreeBSD server. The technical knowledge at the site windows only, so I > basically have someone I can have put a CD in a drive and power a machine > on. > > My problem is that the default install of FreeBSD has password > authentication turned off, and root SSH disabled. Being a small office, they > don't have a IP KVM or some way for me to get to the box to configure it. > > My hope was that I could make an automated install CD/DVD that configured > all the options I want AND change some base config files so I can actually > get to the box (or install an SSH key). > > I know I can do the scripted sysinstall, but from what I could find I would > need a floppy or additional CD to put the answer file on. > > I'm open to other options if someone has gone down this road before! All you need is that the guy at the field office knows something about PC hardware and can type a few commands on any command line. Then there should be a phone. FreeBSD is not as silly as Linux when you move a disk from one box to another. If it is a "server" box (which requires no GUI) then the only changes you are likely to make are on the network configurations (ifconfig_* in rc.conf and resolv.conf) and the rest will remain pretty much the same. What I have done is that I have a prototype, which is a SATA disk. I am pretty much okay of the next machine I want to install has a SATA disk, but I am also not worried if it has PATA disk as I know I will only need a change in /etc/fstab. So what I normally do is this: Attach my prototype disk as master on the machine to install, while slaving the disk that the machine had. I enter sysinstall and disklable/newfs the slave disk. I make the disk bootable, enable softupdates on it and I normally create the root mount point (/). Once done, I change the mount point again to, say, /newdisk, so the slave disk is now mounted on /newdisk. After this: dump L0af - / | (cd /newdisk/; restore -rf -) # BTW, I have the habit of creating only / and swap! So now I have a duplicate system on the slave disk. cd /newdisk; ee etc/rc.conf ; ee etc/fstab; ee etc/resol.conf Here I change the ifconfig_ line for the network device (as seen from dmesg.boot), ensure that fstab refers to the correct device names and voila! I save, shutdown, remove my prototype disk, restore the slave disk to master position and reboot and I have a system identical to the proto. Once connected to a live network, I can ssh to it from anywhere I want using my own account and the su to root if needed, though I always prefer sudo. Now, if only you can follow my way, you only need to ship your prototype disk to the field office and get the windows lunnie to do the disk connections, type the commands, etc and you have a server running at the field office in no time! Of course tell him to pack your prototype disk safely and return it to you. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "Clothes make the man. Naked people have little or no influence on society." -- Mark Twain