From: "Jérôme Pouiller" <jezz@sysmic.org>
To: buildroot@busybox.net
Subject: [Buildroot] [1/2] first_boot_rootfs_resizer: New Package.
Date: Tue, 03 Jan 2017 12:39:06 +0100 [thread overview]
Message-ID: <3158593.OjcTtQLqz9@sagittea> (raw)
In-Reply-To: <20161202101028.26736-1-daggs@gmx.com>
Hello,
On Friday 02 December 2016 12:10:27 daggs wrote:
[...]
> + p2_start=`fdisk -l ${DEV} | grep ${PART} | awk '{print $2}'`
> + p2_finish=`fdisk -l ${DEV} | grep sectors | awk '{printf $5}'`
> +
> + fdisk ${DEV} <<EOF
> +p
> +d
> +2
> +n
> +p
> +2
> +$p2_start
> +$p2_finish
> +p
> +w
> +EOF
This script always resize 2nd partition, isn't? Is it the expected
behavior? I think it should resize last partition.
For information, I wrote a similar script for a customer some time ago:
for part in 4 3 2 1; do
for file in ${device}${part} ${device}p${part}; do
if [ -e $file ]; then
echo ',+,' | sfdisk -q -L -D -uM -N $part $device
[ $? -eq 0 ] || exit 1
resize2fs -p $file
[ $? -eq 0 ] || exit 1
e2fsck -f $file
[ $? -le 1 ] || exit 1
exit 0
fi
done
done
Also note, we did use this script during flash procedure, not during
first boot. Therefore, we do not need to detect first boot (and I think
it is safer).
BR,
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
next prev parent reply other threads:[~2017-01-03 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 10:10 [Buildroot] [PATCH 1/2] first_boot_rootfs_resizer: New Package Dagg Stompler
2016-12-02 10:10 ` [Buildroot] [PATCH 2/2] odroidc2: use first boot fs resize pkg Dagg Stompler
2016-12-17 15:51 ` Thomas Petazzoni
2016-12-23 13:43 ` daggs
2016-12-17 15:50 ` [Buildroot] [PATCH 1/2] first_boot_rootfs_resizer: New Package Thomas Petazzoni
2016-12-23 13:41 ` daggs
2016-12-23 14:00 ` Thomas Petazzoni
2016-12-23 19:08 ` daggs
2017-01-03 11:39 ` Jérôme Pouiller [this message]
2017-02-25 10:54 ` [Buildroot] [1/2] " daggs
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=3158593.OjcTtQLqz9@sagittea \
--to=jezz@sysmic.org \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox