Add CE system partition manually

Hi,

is there any easy method, how I could add CE system partition manually? Currently I am using USB stick for boot+DATA on VIM3L, formatted through rufus. I have 750GB HDD, used for TV archive, 80% full.

I want it to use also for CE-ng booting+DATA device (instead USB stick). I could resize existing partition, name it as storage /dev/sda2: LABEL="STORAGE" UUID="xxxx" TYPE="ext4" PARTUUID="yyyy")

And create lets say 512MB/1GB free space. And now, how create COREELEC system partition like /dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="COREELEC" LABEL="COREELEC" UUID="xxxx" TYPE="vfat" PARTUUID="yyyy" without need to format whole disc through rufus etc?

Any help appretiated, as I wouldnt like to mess my HDD or something like that…

This code creates system partition, the problem is, that its designes system partition as first, and I am not sure, how to configure it for adding system partition on disk, which already have STORAGE partition :frowning:

SYSTEM_SIZE=512
SYSTEM_PART_START=8192
SYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 ))
DISTRO_BOOTLABEL="COREELEC"
DISTRO_DISKLABEL="STORAGE"
DISK_LABEL="msdos"
DISK="/dev/sda1"
UUID_SYSTEM="$(blkid --output udev /dev/sda1 | grep ^ID_FS_UUID= | cut -d= -f2)"

# create part2
parted -s "${DISK}" mklabel ${DISK_LABEL}
sync
parted -s "${DISK}" -a min unit s mkpart primary fat32 ${SYSTEM_PART_START} ${SYSTEM_PART_END}
parted -s "${DISK}" set 1 boot on
sync

# create filesystem on part1
echo "image: creating filesystem on part1..."
OFFSET=$(( ${SYSTEM_PART_START} * 512 ))
HEADS=4
TRACKS=32
SECTORS=$(( ${SYSTEM_SIZE} * 1024 * 1024 / 512 / ${HEADS} / ${TRACKS} ))

shopt -s expand_aliases  # enables alias expansion in script
alias mformat="mformat -i ${DISK}@@${OFFSET} -h ${HEADS} -t ${TRACKS} -s ${SECTORS}"

mformat -v "${DISTRO_BOOTLABEL}" -N "${UUID_SYSTEM//-/}" ::
sync

It seems that CE update process on VIM3l doesnt write u-boot at all…

About | FAQ | Terms of Service | Privacy Policy | Legal Notice