[Parted-maintainers] Bug#879555: parted: Option '-s' incompatible with shrinking a partition
Sean Warner
plica2006 at gmail.com
Wed Jun 26 23:45:05 BST 2024
I am also having this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879555
$ parted -v
parted (GNU parted) 3.6
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+
Written by
<http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.
$ cat /etc/lsb-release
DISTRIB_ID="ManjaroLinux"
DISTRIB_RELEASE="24.0.2"
DISTRIB_CODENAME="Wynsdey"
-- If increasing the size of a partition the following command works
but if reducing the size of a partition it gives a warning "Warning:
Shrinking a partition can cause data loss, are you sure you want to
continue?" and the command just exits back to the command prompt and no
changes are made to the partition.
sudo parted -s /dev/loop0 resizepart 1 46280703s
I assumed that parted -s would automatically supply a default value of
'Yes' in this instance?
According to the Parted Man page:
-s, --script
never prompts for user intervention
Is this a bug or am I misunderstanding something?
>From researching the interweb this might be a bug that for many years
has never been addressed.
There appears to be no way to make this work with parted -s. The only
option is to resort to the undocumented ---pretend-input-tty <-- But is
this safe to keep using if not documented? Any plans to make it an
official "thing" in Parted?
Example that will work whether increasing or reducing the partition
size:
echo -e "resizepart 1 46280703s\nyes\nunit s\nprint\nquit" | sudo
parted /dev/loop0 ---pretend-input-tty
Any help much appreciated,
Flex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/parted-maintainers/attachments/20240626/75609d24/attachment.htm>
More information about the Parted-maintainers
mailing list