NetworkGradeLinux / mion

Main repository for the mion network operating system
Other
15 stars 0 forks source link

Create Mion root partition that uses the entire disk space during ONIE installation #69

Closed frederic-loui closed 3 years ago

frederic-loui commented 3 years ago

Hi, By default with ONIE installer for stordis-bf2556x-1t or accton-wedge100bf-32x:

Is it possible to consider an option where Mion is using the entire disk space left ? The command used seemed to be:

    sgdisk --new="${part_num}::+${PART_SIZE_MB}MB" \
        --attributes="${part_num}:=:${gpt_attr_bitmask}" \
        --change-name="${part_num}:${VOLUME_LABEL}" "${blk_dev}" ||
            error "Unable to create partition ${part_num} on ${blk_dev}"

actually the command would be: (based on this documentation usage of 0 special meaning)

    sgdisk --new="${part_num}:0:0 \
        --attributes="${part_num}:=:${gpt_attr_bitmask}" \
        --change-name="${part_num}:${VOLUME_LABEL}" "${blk_dev}" ||
            error "Unable to create partition ${part_num} on ${blk_dev}"

The value 0 has a special-case meaning for several of the fields:

  • In the partition number field, 0 indicates that the next available number should be used (numbering starts at 1).

  • In the starting address field, 0 indicates that the start of the largest available block of free space should be used. Some space at the start of the hard drive is always reserved for the partition table itself.

  • In the ending address field, 0 indicates that the end of the largest available block of free space should be used.

Merci ! Frederic

CommitThis commented 3 years ago

Duplicate of https://github.com/NetworkGradeLinux/meta-mion/issues/58

I will quote your message though, thanks. Will probably come in useful.