From 4bc97b2aa918bda80922ea090128cb8263f8aef8 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Mon, 4 Dec 2017 00:49:10 +0000 Subject: [PATCH] init: fix offset calculation after busybox fdisk change --- packages/sysutils/busybox/scripts/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index c6e8657ef2..435b726b17 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -876,7 +876,7 @@ losetup $LOOP $IMG_FILE # check for MBR partititon - OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^[ ]*Device/{part=1; next}; part{if ($2 == "*") {print $3} else {print $2} ; exit}') + OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^[ ]*Device/{part=1; next}; part{if ($2 == "*") {print $5} else {print $4} ; exit}') if [ -z "$OFFSET" ]; then # check for GPT partititon OFFSET=$(fdisk -u -l $LOOP 2>/dev/null | awk '/^Number/{part=1; next}; part{print $2; exit}')