Received: (at 25602) by debbugs.gnu.org; 18 Apr 2017 17:54:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 18 13:54:11 2017 Received: from localhost ([127.0.0.1]:55063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d0XKN-0004rO-9m for submit <at> debbugs.gnu.org; Tue, 18 Apr 2017 13:54:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bcl@HIDDEN>) id 1d0XKL-0004rB-UO for 25602 <at> debbugs.gnu.org; Tue, 18 Apr 2017 13:54:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EBE5C65CE2; Tue, 18 Apr 2017 17:54:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EBE5C65CE2 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bcl@HIDDEN DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EBE5C65CE2 Received: from lister.brianlane.com (ovpn-112-29.phx2.redhat.com [10.3.112.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1BB2E17240; Tue, 18 Apr 2017 17:54:02 +0000 (UTC) Date: Tue, 18 Apr 2017 10:54:00 -0700 From: "Brian C. Lane" <bcl@HIDDEN> To: Phil Susi <psusi@HIDDEN> Subject: Re: bug#25602: [parted] Problem with msdos mbr creation Message-ID: <20170418175328.GF4370@HIDDEN> References: <20170201112803.12ea2a69@jawa> <20170201233352.GG29390@HIDDEN> <b0df9f80-699f-f0f8-9e67-bc0054877e64@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <b0df9f80-699f-f0f8-9e67-bc0054877e64@HIDDEN> User-Agent: Mutt/1.8.0 (2017-02-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 18 Apr 2017 17:54:04 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25602 Cc: 25602 <at> debbugs.gnu.org, Lukasz Majewski <lukma@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) On Tue, Apr 18, 2017 at 11:50:27AM -0400, Phil Susi wrote: > On 2/1/2017 6:33 PM, Brian C. Lane wrote: > > That's the MBR boot code normally used to boot a BIOS system. If it > > causes problems on a non-x86 system you should zero it out (or write the > > system bootloader after partitioning). > > Brian, do you know why parted adds the boot code but fdisk does not? > Maybe we should consider removing it? It's only use is to chain load > the "active partition" boot loader. I can only think of three times > this is going to be used: > > 1) Booting DOS/Windows: they have commands to add the boot code after > the fact, and normally they would partition the disk first. > > 2) Booting with LILO installed to a partition: LILO had a switch to > write the MBR boot code if you ever wanted to do this and anyone still > uses LILO. > > 3) Booting with GRUB installed to a partition: GRUB strongly recommends > installing to the MBR instead, and if you really must put it in a > partition, and don't already have MBR boot code, you can use LILO to add it. > Yeah, I can't think of any good reason to keep it. We should probably just zero it out to prevent old code from causing problems. -- Brian C. Lane (PST8PDT)
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at 25602) by debbugs.gnu.org; 18 Apr 2017 15:48:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 18 11:48:56 2017 Received: from localhost ([127.0.0.1]:54953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d0VNA-0001jv-0C for submit <at> debbugs.gnu.org; Tue, 18 Apr 2017 11:48:56 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:33054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <phillsusi@HIDDEN>) id 1d0VN8-0001jg-1x for 25602 <at> debbugs.gnu.org; Tue, 18 Apr 2017 11:48:54 -0400 Received: by mail-vk0-f66.google.com with SMTP id j127so4070945vkh.0 for <25602 <at> debbugs.gnu.org>; Tue, 18 Apr 2017 08:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=GAPIXFkApcnoSzhspGQOtkzVPfaZatWj346bgh/f7Ao=; b=EmrZxGtpE3s9k+wBUS4ZXkYqpgXGJsRdfuIgtl0RYs3/HqoxHrah8a5RMYfFXQetHs g3WykpyNF1hMuejozffLf+5aaBj3jhejFz8pVpp5iNMFd7vy5VxtJOvKYTs/6D0eQ0Qu nhWA1Nb8MI0Qd1B13YxD9dxsHUv1mF2xh31lymcQx7eZrB6NVCqfUKga/w/c0S7PzYU5 OoDIVab1u+Q/UcdEZ+f3jO5xnWImB3LUEm8m1+0qdbnuypz0k4/7SfI9euoi08z3c4br fUy5PXjNlp7Pd5UvnFb3u5VOBvR19JcTt41l4mVVsrTjNlUSqpAM31WWKyEFuyc4yCXv ARsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=GAPIXFkApcnoSzhspGQOtkzVPfaZatWj346bgh/f7Ao=; b=EF3DjKc1tu8GMfaSjJS/mItz0DokhxFKNnnqqlMBHfcl4HQVad5fdG1E+25jZ9P9gg JokGaXa5m2UgXKqS+7kPQGCQUKALceM0JxNeaDg0G7H2znslo1iQUcLfRxknYuxsZK3q DFHuvIZaB7S6hpE8aArDPMQ/WbY/afe/noTUc0vit6pfrkzaLSFSOnc8ZHJFp/zzmco4 AsexrvRXbZXH0w3y47AXe2Fqyfmy8H35UQ82ari43n5kKwtco7DYyNeqDkQ3n0wQaOLR crzquJP5ukAPoTUnz74fFsYP16Ho+TlnpkhHlcMOZR3wMWhmD8VkAnn3IDVQgdREox4e bviw== X-Gm-Message-State: AN3rC/5a1ULaVAJULNhf3ZM8t0IjsPYqChnJcGe3v7VDgwsn1EIAv17E CsFDSxAKccuCCA== X-Received: by 10.31.98.7 with SMTP id w7mr10303639vkb.165.1492530527315; Tue, 18 Apr 2017 08:48:47 -0700 (PDT) Received: from [10.1.1.184] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12]) by smtp.googlemail.com with ESMTPSA id q42sm2995444uaf.6.2017.04.18.08.48.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 08:48:46 -0700 (PDT) Subject: Re: bug#25602: [parted] Problem with msdos mbr creation To: "Brian C. Lane" <bcl@HIDDEN>, Lukasz Majewski <lukma@HIDDEN> References: <20170201112803.12ea2a69@jawa> <20170201233352.GG29390@HIDDEN> From: Phil Susi <psusi@HIDDEN> Message-ID: <b0df9f80-699f-f0f8-9e67-bc0054877e64@HIDDEN> Date: Tue, 18 Apr 2017 11:50:27 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170201233352.GG29390@HIDDEN> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 25602 Cc: 25602 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.7 (/) On 2/1/2017 6:33 PM, Brian C. Lane wrote: > That's the MBR boot code normally used to boot a BIOS system. If it > causes problems on a non-x86 system you should zero it out (or write the > system bootloader after partitioning). Brian, do you know why parted adds the boot code but fdisk does not? Maybe we should consider removing it? It's only use is to chain load the "active partition" boot loader. I can only think of three times this is going to be used: 1) Booting DOS/Windows: they have commands to add the boot code after the fact, and normally they would partition the disk first. 2) Booting with LILO installed to a partition: LILO had a switch to write the MBR boot code if you ever wanted to do this and anyone still uses LILO. 3) Booting with GRUB installed to a partition: GRUB strongly recommends installing to the MBR instead, and if you really must put it in a partition, and don't already have MBR boot code, you can use LILO to add it.
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at 25602) by debbugs.gnu.org; 2 Feb 2017 20:23:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 15:23:04 2017 Received: from localhost ([127.0.0.1]:54269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZNuK-0005f3-83 for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 15:23:04 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:48483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <lukma@HIDDEN>) id 1cZNuJ-0005eu-9y for 25602 <at> debbugs.gnu.org; Thu, 02 Feb 2017 15:23:03 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3vDrzB2RsFz3hjr0; Thu, 2 Feb 2017 21:23:02 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3vDrzB0kkJzvkY7; Thu, 2 Feb 2017 21:23:02 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 5HJRCglJcn8n; Thu, 2 Feb 2017 21:23:01 +0100 (CET) X-Auth-Info: R9AEASdmmtmjIGr0IW4V3u9jzbdlGMolKhjyFg77980= Received: from jawa (87-206-159-178.dynamic.chello.pl [87.206.159.178]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 2 Feb 2017 21:23:01 +0100 (CET) Date: Thu, 2 Feb 2017 21:23:03 +0100 From: Lukasz Majewski <lukma@HIDDEN> To: "Brian C. Lane" <bcl@HIDDEN> Subject: Re: bug#25602: [parted] Problem with msdos mbr creation Message-ID: <20170202212303.7550d252@jawa> In-Reply-To: <20170202165054.GJ29390@HIDDEN> References: <20170201112803.12ea2a69@jawa> <20170201233352.GG29390@HIDDEN> <20170202100535.5829a4d4@jawa> <20170202165054.GJ29390@HIDDEN> Organization: denx.de X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25602 Cc: 25602 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) On Thu, 2 Feb 2017 08:50:54 -0800 "Brian C. Lane" <bcl@HIDDEN> wrote: > On Thu, Feb 02, 2017 at 10:05:35AM +0100, Lukasz Majewski wrote: > > Hi Brian, > > > > > On Wed, Feb 01, 2017 at 11:28:03AM +0100, Lukasz Majewski wrote: > > > > Dear All, > > > If it > > > causes problems on a non-x86 system you should zero it out > > > > The problem is that we are using it with TI's SDK script to create > > bootable SD card. > > > > In this script we clean (write 0x00) the MBR before we run parted -s > > msdos. > > > > The problem is that parted itself (and silently) puts the code there > > and hence the embedded system thinks that there is a valid > > bootloader code and happily hangs. > > > > Is there any option to parted to avoid adding this code (and behave > > like fdisk)? > > No, the only time it won't write it is if there is something already > there (eg. not 0x00). So if you could get the SDK to write it's > bootloader first, then partition it, parted will leave it untouched. For my SoC the 0x00 address is one of potential places where bootloader binary is placed. The SoC considers this code valid if it finds data different than 0x00 or 0xFF. We normally store bootloader on FAT partition, not at fixed address in the SDcard. When it is not found on FAT partition, then LBA 0x0 is considered as next candidate. If we do have data different than 0x00000000 or 0xFFFFFFFF, then we will hang, not going to other boot options. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@HIDDEN
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at 25602) by debbugs.gnu.org; 2 Feb 2017 16:51:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 11:51:34 2017 Received: from localhost ([127.0.0.1]:54209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZKbe-0000ij-1L for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 11:51:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bcl@HIDDEN>) id 1cZKbb-0000iU-0W for 25602 <at> debbugs.gnu.org; Thu, 02 Feb 2017 11:51:31 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B81161BB0; Thu, 2 Feb 2017 16:51:26 +0000 (UTC) Received: from lister.brianlane.com (ovpn-112-28.phx2.redhat.com [10.3.112.28]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v12GoxxL016199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Feb 2017 11:51:16 -0500 Date: Thu, 2 Feb 2017 08:50:54 -0800 From: "Brian C. Lane" <bcl@HIDDEN> To: Lukasz Majewski <lukma@HIDDEN> Subject: Re: bug#25602: [parted] Problem with msdos mbr creation Message-ID: <20170202165054.GJ29390@HIDDEN> References: <20170201112803.12ea2a69@jawa> <20170201233352.GG29390@HIDDEN> <20170202100535.5829a4d4@jawa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170202100535.5829a4d4@jawa> User-Agent: Mutt/1.7.1 (2016-10-04) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 02 Feb 2017 16:51:26 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25602 Cc: 25602 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) On Thu, Feb 02, 2017 at 10:05:35AM +0100, Lukasz Majewski wrote: > Hi Brian, > > > On Wed, Feb 01, 2017 at 11:28:03AM +0100, Lukasz Majewski wrote: > > > Dear All, > > If it > > causes problems on a non-x86 system you should zero it out > > The problem is that we are using it with TI's SDK script to create > bootable SD card. > > In this script we clean (write 0x00) the MBR before we run parted -s > msdos. > > The problem is that parted itself (and silently) puts the code there > and hence the embedded system thinks that there is a valid bootloader > code and happily hangs. > > Is there any option to parted to avoid adding this code (and behave > like fdisk)? No, the only time it won't write it is if there is something already there (eg. not 0x00). So if you could get the SDK to write it's bootloader first, then partition it, parted will leave it untouched. -- Brian C. Lane (PST8PDT)
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at 25602) by debbugs.gnu.org; 2 Feb 2017 16:34:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 11:34:28 2017 Received: from localhost ([127.0.0.1]:54193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZKL5-0000KH-M2 for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 11:34:28 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:60305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <lukma@HIDDEN>) id 1cZDKh-000570-BL for 25602 <at> debbugs.gnu.org; Thu, 02 Feb 2017 04:05:35 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3vDYxV2qNsz3hn4t; Thu, 2 Feb 2017 10:05:34 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3vDYxV1ZTCzvkWb; Thu, 2 Feb 2017 10:05:34 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 0qBPvTkZRhTL; Thu, 2 Feb 2017 10:05:33 +0100 (CET) X-Auth-Info: 22uca21p3D9Mkz3ZiLshJIYAIp+vAieM49jHVhJzqRY= Received: from jawa (87-206-159-178.dynamic.chello.pl [87.206.159.178]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 2 Feb 2017 10:05:32 +0100 (CET) Date: Thu, 2 Feb 2017 10:05:35 +0100 From: Lukasz Majewski <lukma@HIDDEN> To: "Brian C. Lane" <bcl@HIDDEN> Subject: Re: bug#25602: [parted] Problem with msdos mbr creation Message-ID: <20170202100535.5829a4d4@jawa> In-Reply-To: <20170201233352.GG29390@HIDDEN> References: <20170201112803.12ea2a69@jawa> <20170201233352.GG29390@HIDDEN> Organization: denx.de X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25602 X-Mailman-Approved-At: Thu, 02 Feb 2017 11:34:26 -0500 Cc: 25602 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) Hi Brian, > On Wed, Feb 01, 2017 at 11:28:03AM +0100, Lukasz Majewski wrote: > > Dear All, > > > > My parted version is 3.2. OS: Linux GNU Debian 8.6 > > > > For one of my embedded systems (arm based one) I do use parted to > > create bootable SD card. > > > > parted -s $DRIVE mklabel msdos > > > > First, I do clean up the first 1MiB of SD card: > > > > dd if=/dev/zero of=$DRIVE bs=1024 count=1024 > > > > The problem is that parted is generating following code from the > > very beginning of the MBR: > > > > 00000000 FA B8 00 10 8E D0 BC 00 B0 B8 00 00 8E D8 8E C0 > > 00000010 FB BE 00 7C BF 00 06 B9 00 02 F3 A4 EA 21 06 00 > > 00000020 00 BE BE 07 38 04 75 0B 83 C6 10 81 FE FE 07 75 > > 00000030 F3 EB 16 B4 02 B0 01 BB 00 7C B2 80 8A 74 01 8B > > > > > > What is the purpose of this code? Why is has been put there? > > > > Such data in this place fools the ROM bootloader and hangs the > > board. > > > > Also, fdisk (from util-linux 2.25.2) when is creating "dos" > > partition table is not writing such data. > > That's the MBR boot code normally used to boot a BIOS system. Hmm.... Nice to know :-) > If it > causes problems on a non-x86 system you should zero it out The problem is that we are using it with TI's SDK script to create bootable SD card. In this script we clean (write 0x00) the MBR before we run parted -s msdos. The problem is that parted itself (and silently) puts the code there and hence the embedded system thinks that there is a valid bootloader code and happily hangs. Is there any option to parted to avoid adding this code (and behave like fdisk)? > (or write > the system bootloader after partitioning). > The only fix I do see is to manually write 0x00 to the beginning of the MBR created by parted. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@HIDDEN
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at 25602) by debbugs.gnu.org; 1 Feb 2017 23:34:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 01 18:34:04 2017 Received: from localhost ([127.0.0.1]:53688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZ4Pc-00070a-7A for submit <at> debbugs.gnu.org; Wed, 01 Feb 2017 18:34:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bcl@HIDDEN>) id 1cZ4Pa-000702-F1 for 25602 <at> debbugs.gnu.org; Wed, 01 Feb 2017 18:34:02 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 831D180F90; Wed, 1 Feb 2017 23:33:57 +0000 (UTC) Received: from lister.brianlane.com (ovpn-112-28.phx2.redhat.com [10.3.112.28]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11NXr0t008054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Feb 2017 18:33:56 -0500 Date: Wed, 1 Feb 2017 15:33:52 -0800 From: "Brian C. Lane" <bcl@HIDDEN> To: Lukasz Majewski <lukma@HIDDEN> Subject: Re: bug#25602: [parted] Problem with msdos mbr creation Message-ID: <20170201233352.GG29390@HIDDEN> References: <20170201112803.12ea2a69@jawa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170201112803.12ea2a69@jawa> User-Agent: Mutt/1.7.1 (2016-10-04) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 01 Feb 2017 23:33:57 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25602 Cc: 25602 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) On Wed, Feb 01, 2017 at 11:28:03AM +0100, Lukasz Majewski wrote: > Dear All, > > My parted version is 3.2. OS: Linux GNU Debian 8.6 > > For one of my embedded systems (arm based one) I do use parted to create > bootable SD card. > > parted -s $DRIVE mklabel msdos > > First, I do clean up the first 1MiB of SD card: > > dd if=/dev/zero of=$DRIVE bs=1024 count=1024 > > The problem is that parted is generating following code from the very > beginning of the MBR: > > 00000000 FA B8 00 10 8E D0 BC 00 B0 B8 00 00 8E D8 8E C0 > 00000010 FB BE 00 7C BF 00 06 B9 00 02 F3 A4 EA 21 06 00 > 00000020 00 BE BE 07 38 04 75 0B 83 C6 10 81 FE FE 07 75 > 00000030 F3 EB 16 B4 02 B0 01 BB 00 7C B2 80 8A 74 01 8B > > > What is the purpose of this code? Why is has been put there? > > Such data in this place fools the ROM bootloader and hangs the board. > > Also, fdisk (from util-linux 2.25.2) when is creating "dos" partition > table is not writing such data. That's the MBR boot code normally used to boot a BIOS system. If it causes problems on a non-x86 system you should zero it out (or write the system bootloader after partitioning). -- Brian C. Lane (PST8PDT)
bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.Received: (at submit) by debbugs.gnu.org; 1 Feb 2017 16:42:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 01 11:42:35 2017 Received: from localhost ([127.0.0.1]:53577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cYxzP-00060h-2D for submit <at> debbugs.gnu.org; Wed, 01 Feb 2017 11:42:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <lukma@HIDDEN>) id 1cYs9D-0003pX-EG for submit <at> debbugs.gnu.org; Wed, 01 Feb 2017 05:28:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lukma@HIDDEN>) id 1cYs97-00038A-Fu for submit <at> debbugs.gnu.org; Wed, 01 Feb 2017 05:28:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <lukma@HIDDEN>) id 1cYs97-00037y-Ci for submit <at> debbugs.gnu.org; Wed, 01 Feb 2017 05:28:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <lukma@HIDDEN>) id 1cYs96-0005LF-Ad for bug-parted@HIDDEN; Wed, 01 Feb 2017 05:28:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lukma@HIDDEN>) id 1cYs91-000373-Sm for bug-parted@HIDDEN; Wed, 01 Feb 2017 05:28:11 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:41425) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <lukma@HIDDEN>) id 1cYs91-00036j-MZ for bug-parted@HIDDEN; Wed, 01 Feb 2017 05:28:07 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3vCzq84cj9z3hjqk for <bug-parted@HIDDEN>; Wed, 1 Feb 2017 11:28:04 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3vCzq83LBFzvkLv for <bug-parted@HIDDEN>; Wed, 1 Feb 2017 11:28:04 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id XAx62KbRwPGO for <bug-parted@HIDDEN>; Wed, 1 Feb 2017 11:28:01 +0100 (CET) X-Auth-Info: uOU8Z/4scbd0iwNomA1wVMT9aVH+i98VOt89fMSZGKU= Received: from jawa (87-206-159-178.dynamic.chello.pl [87.206.159.178]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA for <bug-parted@HIDDEN>; Wed, 1 Feb 2017 11:28:01 +0100 (CET) Date: Wed, 1 Feb 2017 11:28:03 +0100 From: Lukasz Majewski <lukma@HIDDEN> To: bug-parted@HIDDEN Subject: [parted] Problem with msdos mbr creation Message-ID: <20170201112803.12ea2a69@jawa> Organization: denx.de X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 01 Feb 2017 11:42:34 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) Dear All, My parted version is 3.2. OS: Linux GNU Debian 8.6 For one of my embedded systems (arm based one) I do use parted to create bootable SD card. parted -s $DRIVE mklabel msdos First, I do clean up the first 1MiB of SD card: dd if=/dev/zero of=$DRIVE bs=1024 count=1024 The problem is that parted is generating following code from the very beginning of the MBR: 00000000 FA B8 00 10 8E D0 BC 00 B0 B8 00 00 8E D8 8E C0 00000010 FB BE 00 7C BF 00 06 B9 00 02 F3 A4 EA 21 06 00 00000020 00 BE BE 07 38 04 75 0B 83 C6 10 81 FE FE 07 75 00000030 F3 EB 16 B4 02 B0 01 BB 00 7C B2 80 8A 74 01 8B What is the purpose of this code? Why is has been put there? Such data in this place fools the ROM bootloader and hangs the board. Also, fdisk (from util-linux 2.25.2) when is creating "dos" partition table is not writing such data. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@HIDDEN
Lukasz Majewski <lukma@HIDDEN>
:bug-parted@HIDDEN
.
Full text available.bug-parted@HIDDEN
:bug#25602
; Package parted
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.