SOLVED? - Re: Command line for creating partitions

Chris Murphy lists at colorremedies.com
Fri Aug 8 22:11:16 UTC 2014


On Aug 8, 2014, at 2:16 PM, Robert Moskowitz <rgm at htt-consult.com> wrote:

> 
> On 08/08/2014 03:00 PM, Chris Murphy wrote:
>> On Aug 8, 2014, at 4:29 AM, Robert Moskowitz <rgm at htt-consult.com> wrote:
>> 
>>> Unfortuately there is no such command to delete all partitions, though you kind of can do it by changing the table type, say from msdos to gpt.
>> I forgot to address this specifically. First, you really should delete the filesystem signature before deleting partitions. This makes the filesystem invalid, and thus things like libblkid and libparted aren't going to recognize latent (stale) filesystems. The tool for this is wipefs part of util-linux. Use it like this for example:
>> 
>> wipefs -a /dev/sdb[123]
>> 
>> That will delete the fs signatures on all file systems found on partitions 1 through 3 on disk sdb. The partition table still contains entries of course, but the filesystems in them are invalidated.
>> 
>> Next, if you want to get rid of all partitions, you can also use wipefs on a whole disk.
> 
> wipefs -a /dev/sdb

That will only remove signatures from either an MBR or GPT. It will not remove signatures from filesystems. You really should remove filesystem signatures first with /dev/sdX[1234…] and then remove the partition map sig with sdX alone.


> No.  I am developing my own notes on how to build up a boot card (and eventually drive) for Redsleeve on my Cubieboard2.  At this stage, I tend to build then break a number of times, so having commands to build rather than having to use a GUI speeds the rebuild time.  But so far no magic for fstab; I am having to put UUIDs in it.
> 
> I have been given nice scripts for F19 & F20 remixes and F21 alpha.  We will see what I will need for Centos7arm development...
> 
> I will then be putting all that I did on the Redsleeve wiki.

blkid will get you the UUID and filesystem type so it's a bit easier to build the fstab; otherwise to automate it with command line instead of GUI, you'd look at kickstart installs which leverages anaconda and blivet to do all of these things for you, then does the install per your requirements.

Chris Murphy



More information about the users mailing list