Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-16-2014, 10:27 AM
|
#2
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,994
|
Member Response
Hi,
Slackware-current is using; util-linux-2.21.2
I suspect PV will consider the upgrade to util-linux for -current;
Quote:
Tuesday, October 15, 2013 From http://karelzak.blogspot.com/2013/10...24-fdisk8.html
util-linux v2.24 - fdisk(8)
This release is mostly about small incremental changes, a small exception is fdisk(8).
I have finished fdisk(8) refactoring, this task we started with Davidlohr Bueso and Petr Uzel two releases ago. The result is a code that is easy to extend and all disklabel specific code is no more maintained together as a ball of spaghetti.
The goal is to have one library (libfdisk) shared between all the fdisks (sfdisk, cfdisk, ...). Now it's used in fdisk only. I hope that one day we're going to have shared library with a public stable API.
The most visible changes:
- fdisk dialogs and output unification, more verbose messages
- colors for warnings
- new (but backwardly compatible) menus
- all operations for all disklabels based on sectors by default
- man page clean up
- improved GPT disklabel support (rename partition, partition and disk UUID modification)
The last missing thing is support for manual modification of hybrid GPT. This is planned for the next release v2.25.
|
Quote:
Friday, June 20, 2014 From http://karelzak.blogspot.com/2014/06...inux-v225.html
new cfdisk (util-linux v2.25)
cfdisk is a popular ncurses partitioning tool. Unfortunately, it has been ignored by developers for many many years. The original version does not a have clue
about 4K disks, modern disk I/O limits (alignment offset, optimal I/O sizes, etc),
and it was all about MBR (DOS) only.
It was impossible to improve the old code by refactoring, so the new version is written from scratch. The new cfdisk is based on on the same code like fdisk, so it shares all the necessary features required for new disks and it supports MBR, GPT, SGI and SUN disk labels. Some features have been removed:
- it does not have a clue about CHS addressing any more
- it's impossible to play any games with disk geometry (use fdisk if you believe that CHS setting makes any sense)
- 'm' command (maximize disk usage of the current partition) is not implemented
- 'p' command and --print command line option are not implemented (use partx or lsblk)
- 'u' (units) command is not implemented, all is based on sectors or real sizes
The idea is to keep cfdisk pretty simple and easy to use for end users. Advanced users or users who want to do some unusual things have to use fdisk or parted.
New features:
- output formatting based on libsmartcols
- tree-like output for MBR extended and logical partitions
- show free space on place where the gap is really located
- colors
- new 's'ort command to reorder partition according to start sectors
- partitions aligned to I/O limits, 1MiB start offset, etc.
- it's still possible to recompile with slang library (although I personallyprefer ncursesw)
|
Looks good,especially for cfdisk and additions to fdisk will help.
Hope this helps.
Have fun & enjoy!

|
|
1 members found this post helpful.
|
09-16-2014, 10:27 AM
|
#3
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
Isn't there already gdisk and cgdisk for newer disks ?
|
|
|
09-16-2014, 10:33 AM
|
#4
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,994
|
Member Response
Hi,
Yes, both are provided but I do tend to work with fdisk. That way with new options a user like myself can stick with what they know. If the need arises then either cgdisk or gdisk could be selected to meet those needs.
Hope this helps.
Have fun & enjoy!

|
|
|
09-16-2014, 11:17 AM
|
#5
|
Senior Member
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727
|
Being a programmer myself, which in my past, I wrote a partitioning program for the graphical installer of DARKSTAR Linux, I remember an alpha version of the installer that had spectacular side effects, "helping" a few hundred hundreds Linux lovers from Romania to significantly improve their experience in data recovery.
Because that version of the installer, still I must remember that it was a (declared) ALPHA version, has the bad habit to cancel or format partitions, in a random, if the harddisk was bigger of 60-80GB.
Therefore, I will look suspicious on a new and fresh (re)written (c)fdisk. Because, the partitioning applications aren't cats, but big cats. Hard to tame.
PS. The spectacular bug, discovered later in my partitioning program was an bad casting ("long int" instead of "long long int"), but just a wrong line of code was enough to "kill" the data in hundreds computers. 
Last edited by Darth Vader; 09-16-2014 at 11:28 AM.
|
|
|
09-16-2014, 01:23 PM
|
#7
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
That's just another example of how corporate Red Hat has Linux by the balls, but people find a way around.
|
|
|
09-16-2014, 04:44 PM
|
#8
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,994
|
Member Response
Hi,
I am sure PV has run into situations of this type before. Red Hat doesn't dictate to a independent thinker like PV. Slackware is still the best Gnu/Linux to date. I have been using Slackware from the beginning and find that it meets my needs. Sure, I sometimes need to tweak things a bit but that is the Slackware way. Let the user decide what is best! Very Flexible for the user that desires to make changes to their system!
Quote:
"Knowledge is of two kinds. We Know a subject ourselves, or we know where we can find information upon it."- Samuel Johnson
|
Hope this helps.
Have fun & enjoy!

|
|
|
09-17-2014, 11:52 AM
|
#9
|
Member
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, Sourcemage, 9front
Posts: 407
Rep: 
|
Quote:
Originally Posted by Xsane
Pat may excommunicate util-linux altogether, because as of v2.23-rc1 ... HOLY BOB!... ddate has been removed! 
|
Quote:
Originally Posted by Malaclypse the Younger, Principia Discordia, Page 00042
Greyface and his followers took the game of playing at life more seriously than they took life itself and were known even to destroy other living beings whose ways of life differed from their own." —Malaclypse the Younger, Principia Discordia, Page 00042
|
So much removing in the world today.
|
|
|
09-17-2014, 01:08 PM
|
#10
|
LQ Guru
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,584
|
Fdisk and gdisk work off two different formats.
fdisk is more mbr partitioning, gdisk is for gpt partitioning. They aren't the same tools.
|
|
|
09-17-2014, 03:52 PM
|
#11
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,994
|
Member Response
Hi,
The author/maintainer states that fdisk will have added support for GPT in future fdisk version. As I stated earlier when necessary I will use the tools necessary for a particular task. Like creating GPT, we all know to use gdisk;
Quote:
gdisk - Interactive GUID partition table (GPT) manipulator
|
I believe that the author(as stated) for future fdisk will include GPT creation, currently you can modify GPT labels or UUID in fdisk ver 2.25.
I do look forward to having full modified fdisk to accomplish desired tasks. I won't need parted or gdisk. Until then as I said to use the tool needed for a task. All in one would be fine with me for fdisk support.
Hope this helps.
Have fun & enjoy!

|
|
|
09-17-2014, 05:17 PM
|
#12
|
Member
Registered: Dec 2009
Posts: 358
Rep: 
|
Quote:
Originally Posted by Xsane
|
Do not fear, Bob (tm) is here!
ddate.c, ddate.pl and more programs are at the Discordian Software Archive:
http://www.discordia.ch/Programs/
Maybe we need a new ddate Slack package?
|
|
|
09-18-2014, 05:32 AM
|
#13
|
Senior Member
Registered: Jun 2011
Location: NOVA
Distribution: Debian 12
Posts: 1,079
|
yea it was re written and it was a bit jarring the first time I used it but in the end for me it does the same thing with a mildly different interface i.e. size entered is in G not MB
|
|
|
11-06-2014, 12:39 PM
|
#14
|
Member
Registered: Jan 2014
Posts: 186
Original Poster
Rep: 
|
Now sfdisk completes the set. I suspect it will not show up until the next release: v2.26.
Quote:
Originally Posted by http://karelzak.blogspot.com/2014/10/new-sfdisk.html
Karel Zak's blog
Monday, October 13, 2014
new sfdisk
The last partitioning tool from util-linux package without support for GPT (BSD, SGI, ...) and 4K disks was sfdisk. The situation was exactly the same like with cfdisk, it was impossible to incrementally improve the code, so the new version is written from scratch and based on libfdisk.
The most visible change is that the new sfdisk is all about sectors, it does not support obsolete Cylinder-Head-Sector addressing at all. This is no problem for users who use "--unit S", but if you still rely on old default cylinders than be careful with update. Frankly, LBA addressing is mandatory since ATA-3 (1997) and supported by Linux since beginning.
The new sfdisk also does not support some obscure or rarely used options like
--DOS, --IBM, --DOS-extended, --unhide, --show-extended, --cylinders, --heads, --sectors, --inside-outer, --not-inside-outer.
The last incompatibility is in backup mode. The old implementation uses sfdisk specific backup files. The new implementation uses the same concept like "wipefs --backup". The data are stored to ~/sfdisk-dev-offset.bak by default and it's possible to use dd(1) to restore your partition table or so. The backup files contains only data from the device, nothing else. For example:
# sfdisk --backup /dev/sdb
...
Backup files:
PMBR (offset 0, size 512): /root/sfdisk-sdb-0x00000000.bak
GPT Header (offset 512, size 512): /root/sfdisk-sdb-0x00000200.bak
GPT Entries (offset 1024, size 16384): /root/sfdisk-sdb-0x00000400.bak
...
and to restore:
# dd if=~/sfdisk-sda-0x00000200.bak of=/dev/sdb \
seek=$((0x00000200.bak)) bs=1 conv=notrunc
All is described in the sfdisk man page. The another change is possibility to specify partition sizes in human readable notation {K,M,G,T...}, for example
# sfdisk /dev/sdb <<EOF
label: gpt
, 10G
, 10G
EOF
creates two 10GiB partitions. Note that default is to align all partitions to I/O limits (e.g. physical sector size). The first partition offset is by default 1MiB (e.g. 2048 512-byte-sectors). The partitions are by default aligned to megabytes. The same concept we use for fdisk and cfdisk (and parted probably too).
The default is DOS (MBR) disk label. If you want to use GPT then just add "--label gpt" to the command line or "label: gpt" to the script. The partition type shortcuts like 'L' (for Linux) or 'S' (for swap area) work for MBR as well as for GPT. If you want something else then you can use GUID for GPT or hex codes for MBR.
The new sfdisk supports nested disk labels. This is important for people who use BSD disk labels or hybrid GPT. The new command line option "--label-nested dos" forces sfdisk to modify protective MBR rather than the default GPT disk label. It means that you can manually create hybrid GPT. (No, we don't plan to add any "translate GPT to MBR" high-level feature for hybrid disks, hybrid GPT sucks.)
The nice new feature is that sfdisk allows to add new partitions to your partition table rather than always create whole partition table from scratch, all you need is the new --append command line option.
The important feature is that you can define your own output format for --list by new command line option "--output columns". sfdisk shares this new feature with fdisk where -o modifies 'p'rint output, for example:
# sfdisk --quiet --list -o DEVICE,SIZE,TYPE /dev/sda
Device Size Type
/dev/sda1 1000M EFI System
/dev/sda2 2G Microsoft basic data
/dev/sda3 9.7G Linux swap
/dev/sda4 34.2G Microsoft basic data
/dev/sda5 63.2G Microsoft basic data
/dev/sda6 39.1G Microsoft basic data
You probably already know this concept from lsblk or findmnt. It's also supported to extend the default output by "-o+" notation, for example "fdisk --list -o+UUID /dev/sda" to see UUIDs for GPT partitions.
Another features:
--part-uuid print or change GPT partition UUID
--part-type (or original --id) print or change partition type
--part-label print or changes GPT partition label (name)
--part-attrs print or change GPT partition attribute bites
The script parsing and --dump functionality is within libfdisk. The goal is to support partitioning dumps in fdisk and cfdisk too. It is going to be possible to "sfdisk --dump /dev/sda > foo" and then read the "foo" file to cfdisk or fdisk. And vice-versa, you can compose all your partition table by user-friendly cfdisk, save to the script file (rather than to device) and later use the file by sfdisk, etc.
http://karelzak.blogspot.com/2014/10/new-sfdisk.html
|
|
|
|
11-06-2014, 01:59 PM
|
#15
|
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,311
Rep: 
|
Quote:
Originally Posted by comet.berkeley
Maybe we need a new ddate Slack package?
|
What's wrong with the one we've got already?
Posted on Setting Orange, the 18th day of The Aftermath in the YOLD 3180.
EDIT:
Hadn't read this properly when I wrote the above.
Quote:
Originally Posted by Xsane
|
Eris won't like it.
Last edited by brianL; 11-06-2014 at 04:25 PM.
|
|
|
All times are GMT -5. The time now is 03:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|