From owner-freebsd-questions@freebsd.org Sun Apr 29 18:18:45 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1321DFB3E86 for ; Sun, 29 Apr 2018 18:18:45 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FAC36C754 for ; Sun, 29 Apr 2018 18:18:44 +0000 (UTC) (envelope-from jude.obscure@yandex.com) Received: from mxback3o.mail.yandex.net (mxback3o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1d]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 5CE3F2D828C5; Sun, 29 Apr 2018 21:18:41 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback3o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id lLtAcUByeZ-IfrKVsk7; Sun, 29 Apr 2018 21:18:41 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1525025921; bh=DK63ieKWjVnQBI+xhXOKdaiTAWgC+8o+t7Q6hxViui0=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=QKJiVHRtCcBwk8iNcOwMTH91i2gD3BluLayAkvAhl7D9oalSQdeNmLd+d3OxqHJmZ rxN3r4xzE4eTXRZOYYx5wN/AFxuC88A0zdmVwgE50I2iVpoZC+iaT+z7GvuIuZ6rqZ frgJS0avAO5aA1qPEVM7wToGDJC2gIAMardIGVhk= Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id VSrDnOrnQR-IdqGcQRZ; Sun, 29 Apr 2018 21:18:39 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1525025920; bh=DK63ieKWjVnQBI+xhXOKdaiTAWgC+8o+t7Q6hxViui0=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=qT8DOQ7RvVQlZ41OjC/zTm+ObBrx9IaurJ/JLc2FfyrbNNDbrOSk0qY37jXFaC0Y5 81Zzrf99g7mBpH0rKMFe2jDpr7WWSoYkxDb0LErWkYMZouz2CkT3te5KNbt9TPOgia FQZ2e08JhcL8FqJ+F7nsTpymq1B9niMi5TBFLG6U= Authentication-Results: smtp4p.mail.yandex.net; dkim=pass header.i=@yandex.com Subject: Re: Restoring bootcode To: Robert Fitzpatrick , FreeBSD References: <5AE5F327.3050702@webtent.org> From: Manish Jain Message-ID: Date: Sun, 29 Apr 2018 23:48:04 +0530 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5AE5F327.3050702@webtent.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2018 18:18:45 -0000 On 04/29/18 22:00, Robert Fitzpatrick via freebsd-questions wrote: > Something happens to the bootcode since an upgrade a while back and I've > been starting this 10.4-RELEASE server at the loader OK prompt using > 'set currdev=disk0s1a' and then boot. Here is the server system... > > root@dev:~ # gpart show > =>      63  41942977  ada0  MBR  (20G) >         63  41929587     1  freebsd  [active]  (20G) >   41929650     13390        - free -  (6.5M) > > =>       0  41929587  ada0s1  BSD  (20G) >          0   1024000       1  freebsd-ufs  (500M) >    1024000    524288       2  freebsd-swap  (256M) >    1548288  20480000       4  freebsd-ufs  (9.8G) >   22028288  19901299       5  freebsd-ufs  (9.5G) > > I've tried the following to install the boot code, but still ending up > at the loader prompt... > > root@dev:~ # gpart bootcode -b /boot/mbr ada0 > bootcode written to ada0 > > I also tried with ada0s1 with same result. Clearly I don't understand > how to get this done, can someone help? > Hi Robert, /boot/mbr needs you to set ada0s1 as the active partition. The easier solution in your case perhaps is: gpart bootcode -b /boot/boot0 ada0 gpart bootcode -b /boot/boot ada0s1 -- Tx and Regards, Manish Jain