On Friday 29 Jul 2016 12:20:14 james wrote:
> On 07/29/2016 09:27 AM, R0b0t1 wrote:
> 
> 
> 
> 
> 
> I
> OK, so I have finally switch my posting to this email. Gmane.org is dead
> for now (hence my delayed responses).
> 
> [1] https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/
> 
> So in one thread, I'm going to post to variety of recent posts;
> recreated since I have a new email address now anyways and just got it
> setup with gentoo-user. (sorry if this makes the thread hard to follow.
> 
>  > Neil
>  > 
>  >  It's the ESP (EF00) that can be used as /boot, EF02 is a special
>  > 
>  > partition that should exist but not be used.
> 
> Agreed. The posted example partition tables (PT) were just an attempt
> to motivate any respondant to post an actual (PT) presented by whatever
> tool so I could actually see what I'm trying to drive to. Soon, later
> tonight or tomorrow, I'll post an actual attempt from recovered failures.
> 
>  > Tomh
>  > The OP wants a partition scheme for both "standard" and efi firmware,
>  > so he wants an EF02 (gdisk name) of 1MB and an EF00 (also gdisk name).
> 
> Yes, this is a key point.
> 
>  > The OP wanted the EF02 to be mounted as "/boot" so it has to be
>  > larger than 100MB in order to accomodate multiple kernels (and
>  > possibly initramfs "thingies" as they're sometimes called here).
>  > 
>  > It's the ESP (EF00) that can be used as /boot, EF02 is a
>  > special partition that should exist but not be used.
> 
> OK, my problem is I do not know exactly what this looks like. I am
> assuming I can do it all with gdisk (which is gptfdisk right)?
> 
> So this is just a starting point of what the PT & fstab cold look like
> 
> Number  Start   End     Size    Type     File system     Flags
>   1      1049kB  211MB   210MB   primary  ext2            boot
>   2      211MB   139GB   138GB   primary  linux-swap(v1)
>   3      139GB   952GB   813GB   primary  ext4
>   4      952GB   2000GB  1049GB  primary  ext4
> 
> corresponding fstab::
> 
> /dev/sda1   /boot        ext2    defaults,noatime     0 2
> /dev/sda2   none         swap    sw		      0 0
> /dev/sda3   /         	 ext4    defaults,noatime     0 1
> /dev/sda4   /usr/local   ext4    defaults,noatime     0 1
> 
>  > David Haller
>  > You'd have to get rid of one of those partitions (I'd say /boot).
> 
> OK, I was already thinking about placing /boot under '/' anyway, as
> many of the stage-4 images I will be using in the auto-image installs
> are commonly found as using just 2 partitions anyway ('/' and swap)
> 
> The '/usr/local' will be optional depending on disk size and available
> space to provide this third partition. /usr/local will not be needed for
> boot(strap) and can be mounted after the systems is up. So /boot
> is part of / now.
> 
>  > Mick
>  > It seems you did not use gdisk or a late version of parted to created
>  > the partition table?  Modern partition tools align the logical and
>  > physical sectors to 4096B.
> 
> Yep, I just 'dogged' the PT hoping someone would create and post what it
> should look like, or copy/paste a correct example from somewhere. Sorry
> 
>  >> 1      1049kB  211MB   210MB   primary  ext2    boot
>  > 
>  > Instead of ext2 follow the guide for creating a FAT fs partition with
>  > an EF00 partition type.
>  > James should set the boot flag in the partition table for /dev/sda1
>  > and mount it under /boot (or /boot/EFI) in fstab.
> 
> I'm going to do away with a separate /boot for now and 'boot' partition
> will be moved under /.
> 
>  > R0b0t1
>  > 
>  > > It seems you did not use gdisk or a late version of parted to
>  > 
>  > created the partition table?  Modern partition tools align the
>  > logical and physical sectors to 4096B.
>  > 
>  > It can be changed. SSDs are best used with 512B sectors. But, err...
> 
> Well, proper alignment was automatically taken care of with newer tools?
> That sort of perfromance issue is also critical. Eventuall, SSD and usb3
> mmc and all sorts of other media will be used, depending on the embedded
> board's supported interface mix that will work with the vendor's (board)
> bootstrap code to bring up linux.
> 
>  > The protective MBR can point to another one and you can select which
>  > GPT partitions are in it. But that's getting into some rube goldberg
>  > action.
> 
> Is this true if one is using grub-legacy?
> 
> While I'm at it (gentoo specific) what is the difference in
> sys-boot/grub-static (0.96-r1 to  0.97-r12) and sys-boot/grub (0.97-r16)
> in slot zero?
> 
> I'm assuming that sys-boot/grub-2.02_beta2-r9++ is all grub-2 with
> current enhancements.
> 
> 
> I do appreciate all the inputs, and appologize again for the
> transitioning emails, complicated by the demise of gmane.org (my fav
> reading/posting for gentoo-user).
> 
> I'm going to post back as soon as I get an actually 2T disk setup with
> all of this advise, just to check what folks think and eventually with
> the results of booting a variety of mbr systems (efi and newer embedded
> systems as they are purchased.)
> 
> I have a few SSD to experiment with now and may try some usb devices
> after the spinning rust PT is happy.
> 
> 
> James

I'm on the road to post fully, but here's an SSD with UEFI MoBo and GPT 
tables:
=================
# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 468862128 sectors, 223.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E682BFC8-0C85-459B-BA14-87F4E68CD711
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 468862094
Partitions will be aligned on 2048-sector boundaries
Total free space is 27368557 sectors (13.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1093631   533.0 MiB   EF00  ESP
   2         1093632        43036671   20.0 GiB    8300  root
   3        43036672       441495551   190.0 GiB   8300  home
==================================
The note about protective MBR is because it was created automatically with 
gdisk.

eix -l fdisk
[I] sys-apps/gptfdisk
     Available versions:  
            0.8.10	[ncurses static KERNEL="linux"]
       ~    1.0.0	[ncurses static KERNEL="linux"]
            1.0.1	[ncurses static KERNEL="linux"]
     Installed versions:  1.0.1(10:39:35 28/05/16)(ncurses -static 
KERNEL="linux")
     Homepage:            http://www.rodsbooks.com/gdisk/
     Description:         GPT partition table manipulator for Linux


Same deal but viewing it using fdisk:
=====================
# fdisk /dev/sda

Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E682BFC8-0C85-459B-BA14-87F4E68CD711

Device        Start       End   Sectors  Size Type
/dev/sda1      2048   1093631   1091584  533M EFI System
/dev/sda2   1093632  43036671  41943040   20G Linux filesystem
/dev/sda3  43036672 441495551 398458880  190G Linux filesystem
==================================


and parted:
=========
parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA OCZ-ARC100 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  560MB   559MB   fat32        ESP   boot, esp
 2      560MB   22.0GB  21.5GB  btrfs        root
 3      22.0GB  226GB   204GB   btrfs        home
==================================

I don't use grub on this MoBo, just the EFI stub.  Hope this helps for now.

-- 
Regards,
Mick