All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Koen Kooi <koen@dominion.thruhere.net>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 6/6] mkefidisk: Use msdos partition tables
Date: Wed, 20 Mar 2013 09:48:46 -0700	[thread overview]
Message-ID: <5149E86E.8030500@linux.intel.com> (raw)
In-Reply-To: <719374A5-E704-46DB-8D1E-11A5387A72B2@dominion.thruhere.net>



On 03/20/2013 12:49 AM, Koen Kooi wrote:
> 
> Op 19 mrt. 2013, om 23:15 heeft Darren Hart <dvhart@linux.intel.com> het volgende geschreven:
> 
>> While GPT works fine when writing to actual media, it cannot be reliably
>> used for distributing disk images as it requires the backup table to be
>> on the last block on the device, which of course varies from device to
>> device. Use MSDOS tables instead.
>>
>> Use mkfs to label the filesystems as msdos tables do not support
>> partition labeling.
> 
> I was wondering if it's possible to run parted in fixup mode
> manually. I did that on the target itself to fix the off-by-one
> error, so running it on the host should work as well.

I thought of that as well, but that doesn't help with the disk image
problem. I don't like the idea of shipping images that have to be fixed
on first boot without any clear motivation. For the purposes of these
images, I don't see any clear advantage of GPT.

--
Darren

> 
> regards,
> 
> Koen
> 
> 
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> ---
>> scripts/contrib/mkefidisk.sh | 16 +++++++---------
>> 1 file changed, 7 insertions(+), 9 deletions(-)
>>
>> diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh
>> index 6ff12af..acadd49 100755
>> --- a/scripts/contrib/mkefidisk.sh
>> +++ b/scripts/contrib/mkefidisk.sh
>> @@ -156,20 +156,18 @@ echo "*****************"
>> echo "Deleting partition table on $DEVICE ..."
>> dd if=/dev/zero of=$DEVICE bs=512 count=2
>>
>> -echo "Creating new partition table (GPT) on $DEVICE ..."
>> -parted $DEVICE mklabel gpt
>> +# Use MSDOS by default as GPT cannot be reliably distributed in disk image form
>> +# as it requires the backup table to be on the last block of the device, which
>> +# of course varies from device to device.
>> +echo "Creating new partition table (MSDOS) on $DEVICE ..."
>> +parted $DEVICE mklabel msdos
>>
>> echo "Creating boot partition on $BOOTFS"
>> parted $DEVICE mkpart primary 0% $BOOT_SIZE
>>
>> -# GPT doesn't have a real boot flag, parted will change the GUID to EFI System
>> -# Partition, which is what we want
>> echo "Enabling boot flag on $BOOTFS"
>> parted $DEVICE set 1 boot on
>>
>> -echo "Labeling $BOOTFS as EFI System Partition"
>> -parted $DEVICE name 1 "EFI System Partition"
>> -
>> echo "Creating ROOTFS partition on $ROOTFS"
>> parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END
>>
>> @@ -184,10 +182,10 @@ parted $DEVICE print
>> #
>> echo ""
>> echo "Formatting $BOOTFS as vfat..."
>> -mkfs.vfat $BOOTFS
>> +mkfs.vfat $BOOTFS -n "efi"
>>
>> echo "Formatting $ROOTFS as ext3..."
>> -mkfs.ext3 $ROOTFS
>> +mkfs.ext3 $ROOTFS -L "root"
>>
>> echo "Formatting swap partition...($SWAP)"
>> mkswap $SWAP
>> -- 
>> 1.8.1.2
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



      reply	other threads:[~2013-03-20 17:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 22:15 [PATCH 0/6] mkefidisk: Various fixes for 1.4 M6 Darren Hart
2013-03-19 22:15 ` [PATCH 1/6] mkefidisk: Cleanup comment length Darren Hart
2013-03-19 22:15 ` [PATCH 2/6] mkefidisk: Always specify a root= kernel parameter Darren Hart
2013-03-19 22:15 ` [PATCH 3/6] mkefidisk: Boot with ro kernel parameter instead of rw Darren Hart
2013-03-19 22:15 ` [PATCH 4/6] mkefidisk: Always use rootwait and document kernel parameters used Darren Hart
2013-03-19 22:15 ` [PATCH 5/6] mkefidisk: Remove startup.nsh Darren Hart
2013-03-19 22:15 ` [PATCH 6/6] mkefidisk: Use msdos partition tables Darren Hart
2013-03-20  7:49   ` Koen Kooi
2013-03-20 16:48     ` Darren Hart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5149E86E.8030500@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=koen@dominion.thruhere.net \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.