Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bIc7P-0000pv-F9 for mharc-grub-devel@gnu.org; Thu, 30 Jun 2016 09:34:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIc7I-0000ik-Cq for grub-devel@gnu.org; Thu, 30 Jun 2016 09:34:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIc7D-0001IK-Gx for grub-devel@gnu.org; Thu, 30 Jun 2016 09:34:51 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:33433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIc7D-0001IB-8v for grub-devel@gnu.org; Thu, 30 Jun 2016 09:34:47 -0400 Received: by mail-lf0-x233.google.com with SMTP id f6so55624051lfg.0 for ; Thu, 30 Jun 2016 06:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=2T18CA//q77a9gSZ0kaVuWBBRrS1M+0aSXEWj3Bu6R4=; b=CXdYxKeBrwUddULFRs5BUJ2s7Hoca68b6KoSHFcJ28aykFVDIW2UFl1OQuwi5UCNdV BODwBMFUxOtU93WhMQz8x79rHpdC42dyR8JiZl8QquTvCnIJecMbKSOnzpUmcArkx5I0 16jKUUaRLi7BvF0rt05lAx123pe04JwuTHaM5NFpgARVB6FSYUVjVSDMsorkoTFUwxv8 K6INGd3pKA7auqj8MT50EWK3giG7ob04TsvHGrimwEf6FXIHA43RiUnrGOGaytxt8ByW XlQy0nTpi2rMCuumTV8emBjn9gxsYbZBnUrYxQ+rzJvvrN18uzGYWzNksmmUzSSaZN+v wOvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=2T18CA//q77a9gSZ0kaVuWBBRrS1M+0aSXEWj3Bu6R4=; b=GM+RUmesNcuPka180/WI8GIsgJhfjPafsAEj3TzMd+waj2bhYnNZrIJnTbwdSDZPK/ v9QcfGcTRCZaAvBSRu3N50F5q0KUFQeAPhZiJ9pJbH6cHvAH2MyR4x8SMjy99pfrqJe3 vT8EshTra3hePgx+xD/Q+4VUY18wj63fUK/9q2K2FVjVYDlwoGtjSb558GnzDRa754kw 4q2Xsg/qX9E5Wic07kcTjEIMR+4uUxt8Ds5+unUhKkN/cnF3yIdOmYXZlqjt8O0TBtNv v61glW3re+UW1FF6ebk5A3frM6uvftMFHPWPOISqu5CeiC34Z96vGr8du8Ebv4aI6tQv ebhA== X-Gm-Message-State: ALyK8tK8Yb3Nh8VsalsizcUpNYb3S3XlvD9i+JPHG/Ae+rVhUTqg3fgD2nrXHkdN5ykdmA== X-Received: by 10.25.15.159 with SMTP id 31mr5278647lfp.123.1467293685813; Thu, 30 Jun 2016 06:34:45 -0700 (PDT) Received: from [64.233.161.16] (gate.reksoft.ru. [188.64.144.36]) by smtp.googlemail.com with ESMTPSA id s87sm1494705lfg.46.2016.06.30.06.34.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 06:34:44 -0700 (PDT) To: grub-devel@gnu.org From: Basin Ilya Subject: How to make a GRUB image file that can be chainloaded and will not read the MBR gap? Message-ID: <1615b6e9-ba55-ca91-f044-b2b74cad95f3@gmail.com> Date: Thu, 30 Jun 2016 16:34:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::233 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2016 13:34:58 -0000 Hi. I want to make my grub image file independent from the data in the MBR gap, i.e. I want to embed the generated core.img into my custom image file. I have some questions: - Does the grub2 command "chainloader /foo.img" load the whole file or just the 1st 512 bytes? - Does a BOOTSECTOR entry in Windows boot manager load the whole file or just the 1st 512 bytes? If the answer to both questions is "yes", then a custom image can be made that will include core.img and a very simple boot sector, that will assume that core.img is already loaded. To my knowledge, neither of the images that ship with grub2 does that. What preparations should the custom boot sector do? At what offset should core.img be loaded and jumped to?