Add option to sfdisk to use maximum partition size
Bug #686124 reported by
Alex Bligh
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: util-linux
The attached patch adds the ability to make a partition the maximum size possible. This gives the equivalent functionality to omitting the size parameter in the input, but works with -N too. So this lets you resize a partition to maximum size by
echo ",+," | sfdisk -N1 /dev/sda
This is non-trivial to do without the patch as -N makes the default size the existing size. As there is (without this patch) no way of reading the maximum size, the only option is to delete the partition and recreate it.
This is needed for cloud-init to resize an image on first boot.
Related branches
lp:~smoser/ubuntu/natty/util-linux/lp-686124
- Ubuntu branches: Pending requested
-
Diff: 62 lines (+32/-1)3 files modifieddebian/changelog (+27/-0)
fdisk/sfdisk.8 (+3/-1)
fdisk/sfdisk.c (+2/-0)
tags: | added: patch |
To post a comment you must log in.
This patch was sent upstream at http:// marc.info/ ?l=util- linux-ng& m=1291663492144 23&w=2