From owner-freebsd-cloud@freebsd.org Wed Apr 12 04:34:22 2017 Return-Path: Delivered-To: freebsd-cloud@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDEFD3A63B for ; Wed, 12 Apr 2017 04:34:22 +0000 (UTC) (envelope-from 0100015b6070c546-05c6cf24-36e1-487f-be5e-b2bb6efd4472-000000@amazonses.com) Received: from a8-13.smtp-out.amazonses.com (a8-13.smtp-out.amazonses.com [54.240.8.13]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 451C5C2D for ; Wed, 12 Apr 2017 04:34:21 +0000 (UTC) (envelope-from 0100015b6070c546-05c6cf24-36e1-487f-be5e-b2bb6efd4472-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1491971655; h=Subject:To:References:From:Reply-To:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=OIbNsX9lOIof4jp7uxrUQFYykbr+wdze1M/lls57iI4=; b=mnnsKRSSKmflYKvQVQ1nO/ebFKIb4dtVZCRdDM5AiVOH2XqBa1GWuk1Qfp04PInt 2nEaPCunldhSMHAEVxBAU90yvTmS+xGQtqFfPMiM1NZRmhV+XF+D8i6ATYVo5TrRa3I Fa1Cj/I936vsXEjI7ern01rE8HYUigHJ6VAIbMRc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1491971655; h=Subject:To:References:From:Reply-To:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=OIbNsX9lOIof4jp7uxrUQFYykbr+wdze1M/lls57iI4=; b=G+IZ6FCDUwnqVNbhLmG4qWsTIpGKGbseegVWV/h6Wk/mmpCR4y3xFQop/xZChMcb UyV2ZUhw5RcyBK03BjvrZMmbqF7FLOjNvtLg2WW5M45ictLAT3sgPtjLvUcb0duOq5j CBOm6uI48oDWXpW+EdyFZOya0zUBHrUiFiC+GIJU= Subject: Re: amazon/xen... any way at all to pass a message/signal/semaphoere/morse-code to the boot loader? To: Julian Elischer , FreeBSD Lists , Toomas Soome , freebsd-cloud@freebsd.org References: From: Colin Percival Reply-To: freebsd-cloud@freebsd.org Message-ID: <0100015b6070c546-05c6cf24-36e1-487f-be5e-b2bb6efd4472-000000@email.amazonses.com> Date: Wed, 12 Apr 2017 04:34:15 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2017.04.12-54.240.8.13 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: freebsd-cloud@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "FreeBSD on cloud platforms \(EC2, GCE, Azure, etc.\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 04:34:22 -0000 [CCing freebsd-cloud, which is the right place for discussions of FreeBSD/EC2] On 04/11/17 21:03, Julian Elischer wrote: > In Amazon ec2 they have no console access (though I heard rumors that it was > available I have not seen any sign of it) so I'd like to put a "recovery > partition" into an AMI. > The trick is how to convince it to boot to that instead of the regular action. Can you get what you want via gptboot's support for selecting the partition to boot via "bootonce" and "bootme" flags? > The ideal thing would be if there was way to 'influence' one of the smbios > values in some way, and have the boot code see it, but I'm open to any > suggestions. > I really need only 1 bit of information to get through. > > Possibilties include "changing the VM to have only 2G of ram" (we'd never do > that in a real machine). > or maybe temporarily removing all the disks other than the root drive? Almost > anything I could do to signal the boot code to behave differently. I don't think adding/removing disks will be useful, since the extra disks will be Xen blkfront devices; AFAIK the boot loader doesn't know anything about these. (The boot device is also a blkfront device but gets ATA emulation for the benefit of boot loaders.) Maybe you can repurpose some of the logic used for booting over NFS? I've never heard of people booting over NFS when the initial bootstrap comes from disk rather than PXE, but I assume it's possible...? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid