some comments about the new cfdisk
Hi,
Running cfdisk without an argument no longer works - it just blurts out the usage text, instead of picking the first and only hard drive in the system.
When exiting from cfdisk without having changed anything and without having written the table to disk, it still writes to standard output "Syncing disks." (with a missing newline). To a novice that will be an alarming message. I think that when the user did not ask to write anything to disk, cfdisk should not be syncing disks, there is no need to, or at least it should not show that message.
When in the "Select partition type" submenu, it is not possible to exit from there with Esc. Hitting ^C instead kills the entire cfdisk, which is kind of surprising and undesirable: any already made changes would be lost.
I have two megabytes of free space at the tail of the disk. If with the old cfdisk I delete the last partition, it will create a single expanse of free space. But with the new cfdisk it will then have two free spaces:
Quoted 1 line
Quoted 1 line
`-Free space 282779648 312576704 29797057 14.2G
Free space 312578048 312581807 3760 1.9M
It appears to be impossible to reuse that tailing free space.
Benno
Signature · 2 lines
http://www.fastmail.fm - Accessible with your email software
or over the websome more comments about the new cfdisk
My normal terminal emulator has 30 lines, and when in cfdisk typing H, the help screen ends like this:
Note: All of the commands can be entered with either upper or lower
*Press a key to continue.*
One understands what is meant, of course, but it looks a bit unfinished. And one wonders whether there is still more missing. And there might! After reducing the number of lines to twenty (stty rows 20), the help screen ends like this:
*Press a key to continue.*
Since this might destroy data on the disk, you must
:D
Pressing a key does not show the rest of the help text, but it used to.
The help text also shows this entry:
s Fix partitions order
But this item is not shown in the main menu. Does it only appear when the partitions are out of order? Then the help text might want to say so, e.g. "(only when in disarray)".
Pressing s or S in the main menu does not give any feedback. (But one can deduce that it is somehow a valid command, because the help line at the bottom does not disappear when pressing it.) It would be nicer if it said "Everything is in order" or something similar.
When creating a new partition, it accepts as a suffix for sizes both k and K, m and M, g and G. But for sectors it only accepts S, not s.
What is the reason that it accepts the j and k keys for moving the cursor down and up?
Benno
Signature · 1 line
http://www.fastmail.fm - The professional email service
Karel Zak
maintainerQuoted 3 lines · Benno Schulenberg
Running cfdisk without an argument no longer works - it just blurts out the usage text, instead of picking the first and only hard drive in the system.
Yes, this is expected change. I think it's better to force users to type the disk path than hardcode "sda" to the code, but I have no strong opinion about it... no problem to change it.
(The correct way is to scan /proc/partitions and use the first
whole-disk. The original solution with hardcoded /dev/sda and /dev/hda is ugly.)
Quoted 7 lines
When exiting from cfdisk without having changed anything and without having written the table to disk, it still writes to standard output "Syncing disks." (with a missing newline). To a novice that will be an alarming message. I think that when the user did not ask to write anything to disk, cfdisk should not be syncing disks, there is no need to, or at least it should not show that message.
This is bug, fixed in git tree now.
Quoted 4 lines
When in the "Select partition type" submenu, it is not possible to exit from there with Esc. Hitting ^C instead kills the entire cfdisk, which is kind of surprising and undesirable: any already made changes would be lost.
This is bug, fixed in git tree now. (All the menus is also sensitive to 'g' and 'Q'.)
Quoted 7 lines
I have two megabytes of free space at the tail of the disk. If with the old cfdisk I delete the last partition, it will create a single expanse of free space. But with the new cfdisk it will then have two free spaces:
Quoted 1 line
Quoted 1 line
`-Free space 282779648 312576704 29797057 14.2G
Free space 312578048 312581807 3760 1.9M
I guess the last partition is a logical partition. It's because the extended partition (container for logical partitions) has explicitly specified size and the new cfdisk does not change the size.
The way how the new cfdisk works with free space is different, it follows the gaps between partition etc. So it does not magically merge all free space to the one pool. This solution is more generic and usable for all disk labels.
It would be possible to add some extra optimization for MBR to enlarge/reduce the extended partition if there is a free space behind the partition and no possibility to create another primary partition. Not sure... I'll think about it.
Quoted 1 line
It appears to be impossible to reuse that tailing free space.
.. because you already have allocated all primary partitions I guess.
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Karel Zak
maintainerRe: some more comments about the new cfdisk
In reply to Benno SchulenbergQuoted 12 lines · Benno Schulenberg
My normal terminal emulator has 30 lines, and when in cfdisk typing H, the help screen ends like this:
Note: All of the commands can be entered with either upper or lower
*Press a key to continue.*One understands what is meant, of course, but it looks a bit unfinished. And one wonders whether there is still more missing. And there might! After reducing the number of lines to twenty (stty rows 20), the help screen ends like this:
Quoted 7 lines
*Press a key to continue.*
Since this might destroy data on the disk, you must:D
Pressing a key does not show the rest of the help text, but it used to.
Hmm... it seems it will be necessary to add support for UP/DOWN keys for the help screen. OK, but in v2.26 :-)
Quoted 6 lines
The help text also shows this entry:
s Fix partitions order
But this item is not shown in the main menu. Does it only appear when the partitions are out of order?
Well, all the actions and the main menu depend on context, it does not offer useless actions at all.
Quoted 1 line
text might want to say so, e.g. "(only when in disarray)".
OK, added.
Quoted 1 line
Pressing s or S in the main menu does not give any feedback.
Sure, action is no active, menu is no sensitive to the key at all.
Quoted 2 lines
When creating a new partition, it accepts as a suffix for sizes both k and K, m and M, g and G. But for sectors it only accepts S, not s.
Good point, fixed.
Quoted 2 lines
What is the reason that it accepts the j and k keys for moving the cursor down and up?
...backward compatibility (probably for Vi maniacs).
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 8 lines · Karel Zak
Quoted 3 lines · Benno Schulenberg
Running cfdisk without an argument no longer works - it just blurts out the usage text, instead of picking the first and only hard drive in the system.
Yes, this is expected change. I think it's better to force users to type the disk path than hardcode "sda" to the code, but I have no strong opinion about it... no problem to change it.
It would be nice to have the old behaviour back. Either that, or show an error message saying "expecting a device argument" instead of blasting out the entire usage text.
Quoted 5 lines
Quoted 5 lines
I have two megabytes of free space at the tail of the disk. If with the old cfdisk I delete the last partition, it will create a single expanse of free space. But with the new cfdisk it will then have two free spaces:
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
`-Free space 282779648 312576704 29797057 14.2G
Free space 312578048 312581807 3760 1.9MI guess the last partition is a logical partition. It's because the extended partition (container for logical partitions) has explicitly specified size and the new cfdisk does not change the size.
Yes, I figured that out too, after a while.
Quoted 4 lines
It would be possible to add some extra optimization for MBR to enlarge/reduce the extended partition if there is a free space behind the partition and no possibility to create another primary partition. Not sure... I'll think about it.
Don't bother for now. Somehow the current way feels more precise.
Benno
Signature · 1 line
http://www.fastmail.fm - The way an email service should be
On 2014-07-16 13:22 (GMT+0200) Benno Schulenberg composed:
Quoted 9 lines
Quoted 4 lines · Karel Zak
It would be possible to add some extra optimization for MBR to enlarge/reduce the extended partition if there is a free space behind the partition and no possibility to create another primary partition. Not sure... I'll think about it.
Don't bother for now. Somehow the current way feels more precise.
Maybe I'm missing something in this discussion, but...
I find it inexplicably confusing that any partitioning tool would ever describe an extended to exclude any freespace contiguous to any logical partition, regardless how actually defined in the tables. Making creation of a logical in freespace adjoining any existing logical take more than one step makes no sense.
Signature · 6 lines
"The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
Karel Zak
maintainerQuoted 7 lines · Benno Schulenberg
Quoted 5 lines · Karel Zak
Quoted 3 lines · Benno Schulenberg
Running cfdisk without an argument no longer works - it just blurts out the usage text, instead of picking the first and only hard drive in the system.
Quoted 7 lines
Quoted 3 lines
Yes, this is expected change. I think it's better to force users to type the disk path than hardcode "sda" to the code, but I have no strong opinion about it... no problem to change it.
It would be nice to have the old behaviour back. Either that, or show an error message saying "expecting a device argument" instead of blasting out the entire usage text.
OK, fixed. For v2.25 we're going use the original solution from old cfdisk (default to /dev/sda). For v2.26 I'd like to implement dialog where you can select the disk (if you have more disks).
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com