Re: SOLVED? - Re: Command line for creating partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/08/2014 06:11 PM, Chris Murphy wrote:
On Aug 8, 2014, at 2:16 PM, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> wrote:

On 08/08/2014 03:00 PM, Chris Murphy wrote:
On Aug 8, 2014, at 4:29 AM, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> 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.

I was very unclear, that is what I meant, that I got the remove sigs for each partition, but I am assuming that the command for the partition part was what I gave. So the whole set is:

wipefs -a /dev/sdb1
wipefs -a /dev/sdb2
wipefs -a /dev/sdb3
wipefs -a /dev/sdb
parted /dev/sdb rm 3
parted /dev/sdb rm 2
parted /dev/sdb rm 1
parted /dev/sdb mklabel msdos (or gpt)

So much nicer what anaconda does in the kickstart with 'clearpart' ! A standalone util/script for that is handy for someone working on a USB drive of any sort.


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


--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux