From owner-freebsd-questions@FreeBSD.ORG Thu May 14 12:03:01 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 D34F91065686 for ; Thu, 14 May 2009 12:03:01 +0000 (UTC) (envelope-from artis.caune@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.187]) by mx1.freebsd.org (Postfix) with ESMTP id 620DF8FC23 for ; Thu, 14 May 2009 12:03:01 +0000 (UTC) (envelope-from artis.caune@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so518591mue.3 for ; Thu, 14 May 2009 05:03:00 -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 :content-transfer-encoding; bh=ViG5GKbp/2fRRil2lkC3DOjxMuiNC8liAsElPpuDRpI=; b=iK+gqm8elIaQqiNhMXV2mbumJSVc2outfcgQ1LpEu+208gQIEi6V2HGbVRArFU4xYT sFHOaw+RqYw9ppD25yzHJGbBQjF9KbAqw0OWqbnsJFHqiqfqzIJQzER/K2Q+I9zk9bss 1GZ6SighjPaxapMEjrpNeAy/11IWvIXhoYnNc= 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:content-transfer-encoding; b=pjr9qc/ceA9sDGdzA5l4/sDwValV9XM9nGV0jn9GykkRiLzMxP+aBF4TVpSE4GtWui aHdvarFVwttjaIgBj9i1e7HByHJwgWNb6lG7KCp2/66ZLPOGGD6Tgx9sCuy/uNF4QOfj WXzK0a44oEi1Ri1OPCybYnSdSeusTnKRzIAGs= MIME-Version: 1.0 Received: by 10.102.215.1 with SMTP id n1mr877996mug.109.1242300593241; Thu, 14 May 2009 04:29:53 -0700 (PDT) In-Reply-To: <92bcbda50904281344yba00584wcb32444c4e817cca@mail.gmail.com> References: <92bcbda50904281344yba00584wcb32444c4e817cca@mail.gmail.com> Date: Thu, 14 May 2009 14:29:53 +0300 Message-ID: <9e20d71e0905140429m12fdec2dp12f705dfb28c394@mail.gmail.com> From: Artis Caune To: n j Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: User Questions Subject: Re: fixit console with sshd 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: Thu, 14 May 2009 12:03:02 -0000 2009/4/28 n j : > I was just wondering if someone could give me a quick advice on how > (or at least confirm it's possible) to start sshd in fixit console > i.e. how to boot FreeBSD off the CD1 (6.4-RELEASE) and enable SSH > access to it. > > I believe booting off a live CD and restoring a backup over network > should be a relatively common recovery scenario, but googling around > produced no usable results other than "get FreeSBIE live cd". or you can build your own live cd: # BUILDDIR=/home/my_live_cd # mkdir $BUILDDIR # cd /usr/src # make buildworld # make buildkernel # make installworld DESTDIR=$BUILDDIR # make distribution DESTDIR=$BUILDDIR # make installkernel DESTDIR=$BUILDDIR echo '/dev/acd0 / cd9660 ro 0 0' >> $BUILDDIR/etc/fstab echo 'init_script="/etc/rc.my"' >> $BUILDDIR/boot/loader.conf echo "exec /bin/sh" > $BUILDDIR/etc/rc.my # you probably should script /etc/rc.my and # mount rw memory fs over /var, /tmp, and others # add useful packages mount -t devfs devfs $BUILDDIR/dev for pkg in apg-2.3.0b_1 bonnie++-1.93.04 stress-1.0.0; do cp /home/pkgs/${pkg}.tbz $BUILDDIR/ chroot $BUILDDIR pkg_add /${pkg}.tbz rm $BUILDDIR/${pkg}.tbz done umount $BUILDDIR/dev # generate ssh keys chroot $BUILDDIR /etc/rc.d/sshd keygen # mkisofs -quiet -b boot/cdboot -no-emul-boot -r -iso-level 4 -V "my live cd" -o /home/my_live_cd.iso $BUILDDIR # burncd -v -s max data /home/my_live_cd.iso fixate You can even read some new manpages while fixing servers :) -- Artis Caune Everything should be made as simple as possible, but not simpler.