From owner-freebsd-current@FreeBSD.ORG Mon Oct 1 08:29:11 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BB95106566C for ; Mon, 1 Oct 2012 08:29:11 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mail.kirov.so-ups.ru (mail.kirov.so-ups.ru [178.74.170.1]) by mx1.freebsd.org (Postfix) with ESMTP id B745B8FC0C for ; Mon, 1 Oct 2012 08:29:10 +0000 (UTC) Received: from kas30pipe.localhost (localhost.kirov.so-ups.ru [127.0.0.1]) by mail.kirov.so-ups.ru (Postfix) with SMTP id 5FB48B805E; Mon, 1 Oct 2012 12:29:03 +0400 (MSK) Received: from kirov.so-ups.ru (unknown [172.21.81.1]) by mail.kirov.so-ups.ru (Postfix) with ESMTP id 55B9DB8027; Mon, 1 Oct 2012 12:29:03 +0400 (MSK) Received: by ns.kirov.so-ups.ru (Postfix, from userid 1010) id 3761BBA0D9; Mon, 1 Oct 2012 12:29:03 +0400 (MSK) Received: from [127.0.0.1] (elsukov.kirov.oduur.so [10.118.3.52]) by ns.kirov.so-ups.ru (Postfix) with ESMTP id 02FA2BA0BE; Mon, 1 Oct 2012 12:29:02 +0400 (MSK) Message-ID: <5069544E.9030501@FreeBSD.org> Date: Mon, 01 Oct 2012 12:29:02 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Raoul MEGELAS References: <20120930190658.82A69D480FF@smtp5-g21.free.fr> In-Reply-To: <20120930190658.82A69D480FF@smtp5-g21.free.fr> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-SpamTest-Info: Not protected Cc: freebsd-current@freebsd.org Subject: Re: gpart on macbook air X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 08:29:11 -0000 On 30.09.2012 23:06, Raoul MEGELAS wrote: >> When you are deleting a partition, the kernel completely overwrites the >> partition table and PMBR area. You can compare first 34 blocks before >> deletion and after to see what is going on. > > I can understand that, but i would have thought > that the deletion of the concerned partition was written preserving others??? > > something like: > > - read the gpt table > - find the offset > - zeroes the partition entry > - rewrites the table? > > is not that logic? > > if it is not so, i does not understand this behaviour. Hi, Raoul, The kernel has a copy of the partition table in the memory. When you are deleting some partition, it removes the partition entry from the memory, constructs updated GPT header and table, calculates checksums and writes this data into corresponding places. Any way, this should correctly work. My guess is that Apple's boot loader detects some changes and just doesn't want to work. If you think that gpart incorrectly works, please make a copy of first 34 blocks before and after deletion and send them to me. -- WBR, Andrey V. Elsukov