Re: SOLVED? - Re: Command line for creating partitions
thanks. I will study this a bit. On 08/11/2014 09:41 PM, Chris Murphy wrote: On Aug 10, 2014, at 5:47 PM, Robert Moskowitz wrote: Thanks for all the help. And I figured out another way when you want a real clean card for dd of an image then xz for a compressed form for distribution. I did: dd if=/dev/zero of=/dev/sdb bs=1M and everything is gone. Three critiques :-) 1. This doesn't remove the backup GPT, if present, which is at the end of the drive in the last ~34 sectors. 2. It's definitely not reversible, so if you make a mistake (which you shouldn't anyway of course), maybe one of your boots flips drive designations (which does happen and is expected), you've just obliterated the wrong drive. 3. It doesn't remove filesystem signatures beyond 1MB, so they could remotely be trouble down the road. So I still like wipefs -a for each partition, then for the whole device, better. Built the partition table, the partitions, laid down the files, booted up clean, then dd the image, xz compressed it and I now have a ice compressed image I can restore to start at a clean point and can distribute to others. Oh. Well, you will have latent sectors that previously had data on them that will be vacuumed up with this dd image because it's a sector copy. So even unused sectors that have latent data will find their data in your dd image and xz will be thwarted making it as small (and private) as possible. Who knows what data is on those old latent sectors. So now you can ignore everything else I suggested prior to this. If SD card reacts to TRIM, which many do, you can: a.) mkfs.btrfs /dev/sdX b.) wipefs -a /dev/sdX The default mkfs.btrfs behavior is a whole device TRIM, then it writes out a tiny amount of metadata, much less than other filesystems. Using wipefs removes that btrfs signature, and now you can build your media. On thing though is that SD card garbage collection might take a while and depends a lot on its firmware. So in the short term the dd read of the sdcard might still return latent data, until the firmware actually goes about erasing it. Another option, is ATA security erase, but I don't know if SD cards support this. I know the above will work because I've been doing it the past few days for other testing. Either way, the result is that there will be essentially no latent sector data, and your dd image will contain piles of zeros that xz will then compress away. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On Aug 10, 2014, at 5:47 PM, Robert Moskowitz wrote: > > Thanks for all the help. And I figured out another way when you want a real > clean card for dd of an image then xz for a compressed form for distribution. > I did: > > dd if=/dev/zero of=/dev/sdb bs=1M > > and everything is gone. Three critiques :-) 1. This doesn't remove the backup GPT, if present, which is at the end of the drive in the last ~34 sectors. 2. It's definitely not reversible, so if you make a mistake (which you shouldn't anyway of course), maybe one of your boots flips drive designations (which does happen and is expected), you've just obliterated the wrong drive. 3. It doesn't remove filesystem signatures beyond 1MB, so they could remotely be trouble down the road. So I still like wipefs -a for each partition, then for the whole device, better. > Built the partition table, the partitions, laid down the files, booted up > clean, then dd the image, xz compressed it and I now have a ice compressed > image I can restore to start at a clean point and can distribute to others. Oh. Well, you will have latent sectors that previously had data on them that will be vacuumed up with this dd image because it's a sector copy. So even unused sectors that have latent data will find their data in your dd image and xz will be thwarted making it as small (and private) as possible. Who knows what data is on those old latent sectors. So now you can ignore everything else I suggested prior to this. If SD card reacts to TRIM, which many do, you can: a.) mkfs.btrfs /dev/sdX b.) wipefs -a /dev/sdX The default mkfs.btrfs behavior is a whole device TRIM, then it writes out a tiny amount of metadata, much less than other filesystems. Using wipefs removes that btrfs signature, and now you can build your media. On thing though is that SD card garbage collection might take a while and depends a lot on its firmware. So in the short term the dd read of the sdcard might still return latent data, until the firmware actually goes about erasing it. Another option, is ATA security erase, but I don't know if SD cards support this. I know the above will work because I've been doing it the past few days for other testing. Either way, the result is that there will be essentially no latent sector data, and your dd image will contain piles of zeros that xz will then compress away. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On 08/10/2014 05:20 PM, Chris Murphy wrote: On Aug 9, 2014, at 9:07 PM, Robert Moskowitz wrote: On 08/08/2014 06:11 PM, Chris Murphy wrote: On Aug 8, 2014, at 2:16 PM, Robert Moskowitz wrote: On 08/08/2014 03:00 PM, Chris Murphy wrote: On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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 Sure. These can be combined as: wipefs -a /dev/sdb[123] There are quite a few examples of this, including making LVM pvs, and Btrfs volumes, e.g. mkfs.btrfs -mraid1 -draid1 /dev/sdb[123] And also for multiple disk partition table obliteration: wipefs -a /dev/sd[bcd] I like wipefs because it tells you what it's removing, so you can restore it, and also has an option for backing up that which it's removing so you can easily restore it if you got sloppy with the command and bashed the wrong device. Not that this should be habit forming, like being able to make a proper gimlet. Thanks for all the help. And I figured out another way when you want a real clean card for dd of an image then xz for a compressed form for distribution. I did: dd if=/dev/zero of=/dev/sdb bs=1M and everything is gone. Built the partition table, the partitions, laid down the files, booted up clean, then dd the image, xz compressed it and I now have a ice compressed image I can restore to start at a clean point and can distribute to others. Making slow, steady progress. Maybe not as good as other more experienced, but hey, for a change I will be providing something. In particular Redsleeve for Cubieboards. So much nicer what anaconda does in the kickstart with 'clearpart' ! Yes and blivet makes an appearance in F21 proper although I'm not sure yet if this is an API or how it'll get leveraged. Another pony trick is system-storage-manager package, which takes the form of ssm on the command line; but this tool is post partition management, working with LVM and filesystems. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On Aug 9, 2014, at 9:07 PM, Robert Moskowitz wrote: > > On 08/08/2014 06:11 PM, Chris Murphy wrote: >> On Aug 8, 2014, at 2:16 PM, Robert Moskowitz wrote: >> >>> On 08/08/2014 03:00 PM, Chris Murphy wrote: On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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 Sure. These can be combined as: wipefs -a /dev/sdb[123] There are quite a few examples of this, including making LVM pvs, and Btrfs volumes, e.g. mkfs.btrfs -mraid1 -draid1 /dev/sdb[123] And also for multiple disk partition table obliteration: wipefs -a /dev/sd[bcd] I like wipefs because it tells you what it's removing, so you can restore it, and also has an option for backing up that which it's removing so you can easily restore it if you got sloppy with the command and bashed the wrong device. Not that this should be habit forming, like being able to make a proper gimlet. > > So much nicer what anaconda does in the kickstart with 'clearpart' ! Yes and blivet makes an appearance in F21 proper although I'm not sure yet if this is an API or how it'll get leveraged. Another pony trick is system-storage-manager package, which takes the form of ssm on the command line; but this tool is post partition management, working with LVM and filesystems. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On 08/08/2014 06:11 PM, Chris Murphy wrote: On Aug 8, 2014, at 2:16 PM, Robert Moskowitz wrote: On 08/08/2014 03:00 PM, Chris Murphy wrote: On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On Aug 8, 2014, at 2:16 PM, Robert Moskowitz wrote: > > On 08/08/2014 03:00 PM, Chris Murphy wrote: >> On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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 -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On 08/08/2014 03:00 PM, Chris Murphy wrote: On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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 ?? thanks for all of this. This removes the signature for the partition table. Most any tool will consider it invalid, rather than broken, so it's not going to offer to fix it, it'll offer to repartition it: so in the GPT case, it gets a whole new disk identifier GUID rather than just restoring the signature. It is possible, btw to restore the signature and thus restore the partition table and all of its partitions (since those sectors aren't actually erased). You could also blow away 34 sectors from the start and end of the drive using dd if=/dev/zero. That's a hammer. Oh and I mentioned cgdisk (member of the gdisk family) that was wrong, it's curse-based. You want to look at sgdisk which is for use in scripts and accepts all commands from the CLI. It has a way to delete partitions individually. Note that this does not employ wipefs, so the actual filesystem contained within the partition you've deleted is still intact; and this also leaves the partition header intact, all it's doing is removing a partition table entry. sgdisk also has two zap options: one overwrites everything (sectors containing both MBR and GPT structures), the other option overwrites only the sectors containing GPT structures. So it really depends what you want to achieve, and how arbitrary the source drives are going to be. If you're writing a program or script you might look at python-blivet which has done a ton of work abstracting all of this stuff, if you can do what you need to do in python, 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. then you can use sane pthyon code to do things like wipe all fs's, delete all partitions, create new GPT, add new partitions, format them. And you don't need to know the prose for the 5 different utilities to make that happen. python-blivet is actually at the core of the Fedora installer, specifically for manipulating storage (it does everything you can imagine in including create, modify, destroy LVM objects; btrfs subvolumes; bunch of md raid stuff, etc.) http://pkgs.fedoraproject.org/cgit/python-blivet.git/ -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On 08/08/2014 02:24 PM, Chris Murphy wrote: On Aug 8, 2014, at 4:29 AM, Robert Moskowitz wrote: I am learning how to use parted in command line format. 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. Also learned that the unused 4Mb I am seeing on most SD cards is for a reason. To get on the 4Mb alignment for performance reasons. It's 4KB, not 4MB, and it doesn't apply to SSDs, only HDD's specifically the 512e AF variety. a.) It's AF, Advanced Format, which means it has 4096 byte physical sectors, and 512e means it's emulating 512 byte sectors. So it appears as having 512 byte logical sectors, while having 4096 byte physical sectors. So one real sector has 8 logical sectors, which is where the performance problem can occur, when effectively asking the drive to update portions of a sector it causes the drive firmware to read-modify-write the sector. It is for SDcards that I was dealing with, and my information comes from: http://www.gnu.org/software/parted/manual/parted.html Now, we will show how to partition a low-end flash device (“low-end”, as of 2011/2012). For such devices, you should use 4MiB-aligned partition^. This command creates a tiny place-holder partition at the beginning, and then uses all remaining space to create the partition you’ll actually use: $parted -s /dev/sdX -- mklabel msdos \ mkpart primary fat32 64s 4MiB \ mkpart primary fat32 4MiB -1s I figured out that you really don't need the tiny place-holder, just leave it unallocated. Good to know about HDD and SSD as that will be later thanks parted /dev/sdb mkpart offset fat32 0 4 When I do that, parted complains. "Warning: The resulting partition is not properly aligned for best performance." What you should do is use 1 and 5, assuming you really want only a 4MB partition. In that case the result ends up being: Number Start End Size File system NameFlags 1 2048s 10239s 8192s offset msftdata If you want to agree to the widely used convention, use LBA 2048 as the start. If you want to do your own thing, you could find out the erase block size for your SSD and align on those boundaries, but due to the non-transparency of the flash translation layer, there's no guarantee this means you're actually aligned on erase block boundaries: but it seems like a good idea, doesn't hurt anything, but might be a waste of effort depending on how things are actually implemented in the SSD. parted /dev/sdb mkpart uboot ext3 4 516 But it is still acting strange. Print is showing that ext3 partition fat32! That's probably because libparted is finding a latent FAT32 superblock. The first thing to understand about parted, is that it's crusty. It used to do a lot of stuff that it doesn't do anymore but has the legacy operands of what it used to do. It used to format and resize volumes and partitions in one go, and it no longer does this. There is no partition type code that tells parted what the filesystem is, so it looks (maybe via libblkid, not sure) for the actual partition contents to see what filesystem it is and tells you that. But it's totally superfluous information in a partitioning tool. But in parted parlance you have to know these weird things because of its legacy. Likewise it doesn't directly tell you, or let you directly tell it, what a GPT partition's partition type GUID is. You have to tell it a filesystem, and then it sets the type code accordingly, which is quite honestly maddening. But whatever you just have to accept it if you're going to use parted. Its view of the world is abstracted to the degree it'll give you a completely distorted picture, and it's why I don't like it. So your first command with fat32, doesn't actually cause the partition to be formatted fat32. It merely set the partition type GUID to EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data). Due to poor decision making, if you're using a Fedora 20 or older version, parted uses that same type code when specifying ext3 as the file system. Out of essentially unlimited UUIDs parted devs chose to usurp a Microsoft one. It baffles me whether I'm sober or drunk. The Fedora 21 version, parted will set an ext3 partition to partition type code 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem) instead. And meanwhile gdisk and cgdisk have done this correctly for years. The parted "File system" column is not a reflection of the partition type GUID, it's actually looking for filesystem superblocks to identify what the filesystem is. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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?
Re: SOLVED? - Re: Command line for creating partitions
On Aug 8, 2014, at 4:29 AM, Robert Moskowitz 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. This removes the signature for the partition table. Most any tool will consider it invalid, rather than broken, so it's not going to offer to fix it, it'll offer to repartition it: so in the GPT case, it gets a whole new disk identifier GUID rather than just restoring the signature. It is possible, btw to restore the signature and thus restore the partition table and all of its partitions (since those sectors aren't actually erased). You could also blow away 34 sectors from the start and end of the drive using dd if=/dev/zero. That's a hammer. Oh and I mentioned cgdisk (member of the gdisk family) that was wrong, it's curse-based. You want to look at sgdisk which is for use in scripts and accepts all commands from the CLI. It has a way to delete partitions individually. Note that this does not employ wipefs, so the actual filesystem contained within the partition you've deleted is still intact; and this also leaves the partition header intact, all it's doing is removing a partition table entry. sgdisk also has two zap options: one overwrites everything (sectors containing both MBR and GPT structures), the other option overwrites only the sectors containing GPT structures. So it really depends what you want to achieve, and how arbitrary the source drives are going to be. If you're writing a program or script you might look at python-blivet which has done a ton of work abstracting all of this stuff, if you can do what you need to do in python, then you can use sane pthyon code to do things like wipe all fs's, delete all partitions, create new GPT, add new partitions, format them. And you don't need to know the prose for the 5 different utilities to make that happen. python-blivet is actually at the core of the Fedora installer, specifically for manipulating storage (it does everything you can imagine in including create, modify, destroy LVM objects; btrfs subvolumes; bunch of md raid stuff, etc.) http://pkgs.fedoraproject.org/cgit/python-blivet.git/ Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: SOLVED? - Re: Command line for creating partitions
On Aug 8, 2014, at 4:29 AM, Robert Moskowitz wrote: > I am learning how to use parted in command line format. 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. > > Also learned that the unused 4Mb I am seeing on most SD cards is for a > reason. To get on the 4Mb alignment for performance reasons. It's 4KB, not 4MB, and it doesn't apply to SSDs, only HDD's specifically the 512e AF variety. a.) It's AF, Advanced Format, which means it has 4096 byte physical sectors, and 512e means it's emulating 512 byte sectors. So it appears as having 512 byte logical sectors, while having 4096 byte physical sectors. So one real sector has 8 logical sectors, which is where the performance problem can occur, when effectively asking the drive to update portions of a sector it causes the drive firmware to read-modify-write the sector. > > parted /dev/sdb mkpart offset fat32 0 4 When I do that, parted complains. "Warning: The resulting partition is not properly aligned for best performance." What you should do is use 1 and 5, assuming you really want only a 4MB partition. In that case the result ends up being: Number Start End Size File system NameFlags 1 2048s 10239s 8192s offset msftdata If you want to agree to the widely used convention, use LBA 2048 as the start. If you want to do your own thing, you could find out the erase block size for your SSD and align on those boundaries, but due to the non-transparency of the flash translation layer, there's no guarantee this means you're actually aligned on erase block boundaries: but it seems like a good idea, doesn't hurt anything, but might be a waste of effort depending on how things are actually implemented in the SSD. > parted /dev/sdb mkpart uboot ext3 4 516 > > But it is still acting strange. Print is showing that ext3 partition fat32! That's probably because libparted is finding a latent FAT32 superblock. The first thing to understand about parted, is that it's crusty. It used to do a lot of stuff that it doesn't do anymore but has the legacy operands of what it used to do. It used to format and resize volumes and partitions in one go, and it no longer does this. There is no partition type code that tells parted what the filesystem is, so it looks (maybe via libblkid, not sure) for the actual partition contents to see what filesystem it is and tells you that. But it's totally superfluous information in a partitioning tool. But in parted parlance you have to know these weird things because of its legacy. Likewise it doesn't directly tell you, or let you directly tell it, what a GPT partition's partition type GUID is. You have to tell it a filesystem, and then it sets the type code accordingly, which is quite honestly maddening. But whatever you just have to accept it if you're going to use parted. Its view of the world is abstracted to the degree it'll give you a completely distorted picture, and it's why I don't like it. So your first command with fat32, doesn't actually cause the partition to be formatted fat32. It merely set the partition type GUID to EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data). Due to poor decision making, if you're using a Fedora 20 or older version, parted uses that same type code when specifying ext3 as the file system. Out of essentially unlimited UUIDs parted devs chose to usurp a Microsoft one. It baffles me whether I'm sober or drunk. The Fedora 21 version, parted will set an ext3 partition to partition type code 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem) instead. And meanwhile gdisk and cgdisk have done this correctly for years. The parted "File system" column is not a reflection of the partition type GUID, it's actually looking for filesystem superblocks to identify what the filesystem is. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
SOLVED? - Re: Command line for creating partitions
I am learning how to use parted in command line format. 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. Also learned that the unused 4Mb I am seeing on most SD cards is for a reason. To get on the 4Mb alignment for performance reasons. So here is some things that I have figured out: parted /dev/sdb mklabel gpt parted /dev/sdb mkpart offset fat32 0 4 parted /dev/sdb mkpart uboot ext3 4 516 But it is still acting strange. Print is showing that ext3 partition fat32! # parted /dev/sdb mkpart uboot ext3 4 516 Information: You may need to update /etc/fstab. [root@lx120e ~]# parted /dev/sdb print Model: Generic- Multi-Card (scsi) Disk /dev/sdb: 7969MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End SizeFile system NameFlags 1 17.4kB 4000kB 3983kB offset 2 4194kB 516MB 512MB fat32uboot On 08/08/2014 01:37 AM, Cameron Simpson wrote: On 07Aug2014 16:29, Robert Moskowitz wrote: On 08/07/2014 03:13 PM, Joachim Backes wrote: have a look at /sbin/cfdisk OK. One more to study. I was also told about gdisk. But all of these are command menu programs. Not one-liners. The nice 'one-liners' in kckstart files are just commands to anaconda, it seems. No such program and 'clearpart' or 'part'. Though I suppose I could deal with a program that read a command file of such commands. We have used sfdisk for a long time for cloning partition tables from one drive to another. That cloning is done by dumping the table and then reading the dump. But that means that there is a dump format to sfdisk's output, and you can just craft the right input. Definitely purely command line. Cheers, Cameron Simpson Tomkin Coleman (tcol...@nv7.uswnvg.com) wrote: | Well, yes, get the bike but BEWARE!! | At first, you will just want to get, like, a 250 Rebel, just for commuting | and maybe a little fun, but you will wind up buying a 550, (just in case you | want to tour), and then you will stop paying any attention to the theatre | company you are working with and the graduate school you are attending, and | then you will spend all your summers touring and riding around with your | newfound biking buddies, and then you will find that you have got a real job | just so you can buy the bike of your dreams and pretty soon you will find | that your entire life has centered around your monster bike and you can only | date women who love bikes and hang with buddies who love bikes and work at a | job that supports your lifestyle and you will be incredibly happy, but always | very greasy. S! The meaning of life is supposed to be a SECRET! :-) - Bob Larson..DoD#1711..b...@honshu.ho.att.com..1994 Suzuki RF600R -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On 07Aug2014 16:29, Robert Moskowitz wrote: On 08/07/2014 03:13 PM, Joachim Backes wrote: have a look at /sbin/cfdisk OK. One more to study. I was also told about gdisk. But all of these are command menu programs. Not one-liners. The nice 'one-liners' in kckstart files are just commands to anaconda, it seems. No such program and 'clearpart' or 'part'. Though I suppose I could deal with a program that read a command file of such commands. We have used sfdisk for a long time for cloning partition tables from one drive to another. That cloning is done by dumping the table and then reading the dump. But that means that there is a dump format to sfdisk's output, and you can just craft the right input. Definitely purely command line. Cheers, Cameron Simpson Tomkin Coleman (tcol...@nv7.uswnvg.com) wrote: | Well, yes, get the bike but BEWARE!! | At first, you will just want to get, like, a 250 Rebel, just for commuting | and maybe a little fun, but you will wind up buying a 550, (just in case you | want to tour), and then you will stop paying any attention to the theatre | company you are working with and the graduate school you are attending, and | then you will spend all your summers touring and riding around with your | newfound biking buddies, and then you will find that you have got a real job | just so you can buy the bike of your dreams and pretty soon you will find | that your entire life has centered around your monster bike and you can only | date women who love bikes and hang with buddies who love bikes and work at a | job that supports your lifestyle and you will be incredibly happy, but always | very greasy. S! The meaning of life is supposed to be a SECRET! :-) - Bob Larson..DoD#1711..b...@honshu.ho.att.com..1994 Suzuki RF600R -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On Thu, 7 Aug 2014, Joe Zeff wrote: On 08/07/2014 01:40 PM, Robert Moskowitz wrote: It was fdisk that was complaining. Those messages aren't complaints, they're just informing you. (I'm not sure any more, but I think that at one time the space between the end of the partition and the cylinder boundary couldn't be used.) I suspect that at this point, the only reason fdisk still tells you that is that none of the maintainers consider it worth the bother to remove that code. Sooner or later, somebody will get tired of seeing it and it will go away. I have had a partition tool quit on me for want of cylinder alignment. Don't remember which one. I think that sfdisk will do what OP wants. -- Michael henne...@web.cs.ndsu.nodak.edu "SCSI is NOT magic. There are *fundamental technical reasons* why it is necessary to sacrifice a young goat to your SCSI chain now and then." -- John Woods -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On 08/07/2014 01:40 PM, Robert Moskowitz wrote: It was fdisk that was complaining. Those messages aren't complaints, they're just informing you. (I'm not sure any more, but I think that at one time the space between the end of the partition and the cylinder boundary couldn't be used.) I suspect that at this point, the only reason fdisk still tells you that is that none of the maintainers consider it worth the bother to remove that code. Sooner or later, somebody will get tired of seeing it and it will go away. -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
Chris thanks for this detailed reply! On 08/07/2014 04:14 PM, Chris Murphy wrote: On Aug 7, 2014, at 12:45 PM, Robert Moskowitz wrote: I am working now more on handcrafting my SD cards for arm testing. Gparted did not do a good job, allowing me to make parititions not on 'cylinder boundaries'. FWIW cylinder boundaries are legacy and irrelevant, for either SSDs (including SD cards) or HDDs. You have to go back two epochs to get to CHS being relevant. Everything is LBA these days. The boundary you want is simply 2048 for 512 byte (logical) sectors, which is a 1MB boundary. That's the easiest and works well for everything, you don't have to think about it any further. Any recent parted, fdisk, and gdisk do this. It was fdisk that was complaining. #fdisk -l Disk /dev/nand: 3984 MB, 3984588800 bytes 255 heads, 63 sectors/track, 484 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x Disk /dev/mmcblk0: 15.6 GB, 15560867840 bytes 4 heads, 16 sectors/track, 474880 cylinders Units = cylinders of 64 * 512 = 32768 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000cd80a Device Boot Start End Blocks Id System /dev/mmcblk0p1 33 16416 524288 83 Linux Partition 1 does not end on cylinder boundary. /dev/mmcblk0p2 16417 49184 1048576 82 Linux swap / Solaris Partition 2 does not end on cylinder boundary. /dev/mmcblk0p3 49185 46518413312000 83 Linux Partition 3 does not end on cylinder boundary. And the labels it created were not recognized when I mounted the drive. I had to use the disk utility to fix the labels. Not recognized? That's vague. What does happen? The volume label appears garbled, or is blank? What is "disk utility"? There's "Disks" a.k.a. gnome-disks. With Gparted, I removed the original MSDOS partition on the created and formated the above partitions labeling them uboot and rootfs. I removed the drive and remounted it (this wsa on my F20 notebook) and they were mounted under /run/media/rgm/ with their UUIDs, not these labels. I started up Gnome-disk-utility and sure enough, no labels, so unmounted, I labeled the partitions, and they remounted as I wanted them to be named. Is the SD card being GPT partitioned or MBR partitioned? GPT partitions support partition names, MBR partitioning doesn't. So maybe there's a weird conflict somewhere between volume labels (a filesystem name), and partition names (a GPT only thing). Anyway, to script it and to put this up on some wikis, I really need to do this by command line. So I have looked at both fdisk and parted. Neither are for 'simple' command lines. Fdisk takes me back to my DOS days (wonder where MS got it from?). So first I want a command that will delete all partitions on /dev/sdb fdisk and gdisk have only interactive modes. parted has both command line and interactive modes, it sounds like you're only familiar with the interactive mode. But I'm not sure if it accepts MB units in command line mode; it does in interactive mode. Possibly cfdisk or cgdisk will offer what you want. I will look more at parted. Of course, I understand how many MB I want each, but I am suppose to (or so from the warnings that 'fdisk -l' provided) maintain boundaries. If you specify all partition start and end values in MB, or in sectors that are 2048 divisible, it's fine. You can even get away with much less, the only time alignment really matters is 4096 sector HDD's, so that's an 8 sector or 4KB alignment. It's just that 1MB or 1GB units is ultimately all we care about for partition sizes, and they happen to align. Further down the road, I will be setting this up on a HD or SSD, so that will be a concern before I can say I am 'done'. -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On 08/07/2014 03:13 PM, Joachim Backes wrote: On 08/07/2014 08:45 PM, Robert Moskowitz wrote: I am working now more on handcrafting my SD cards for arm testing. Gparted did not do a good job, allowing me to make parititions not on 'cylinder boundaries'. And the labels it created were not recognized when I mounted the drive. I had to use the disk utility to fix the labels. Anyway, to script it and to put this up on some wikis, I really need to do this by command line. So I have looked at both fdisk and parted. Neither are for 'simple' command lines. Fdisk takes me back to my DOS days (wonder where MS got it from?). So first I want a command that will delete all partitions on /dev/sdb then create a partition as ext3, then one as linux-swap, and finally ext4. Of course, I understand how many MB I want each, but I am suppose to (or so from the warnings that 'fdisk -l' provided) maintain boundaries. thanks for any pointers to the best tool(s) for this. So far my search foo has only gone to old fdisk pages. Hi Robert, have a look at /sbin/cfdisk OK. One more to study. I was also told about gdisk. But all of these are command menu programs. Not one-liners. The nice 'one-liners' in kckstart files are just commands to anaconda, it seems. No such program and 'clearpart' or 'part'. Though I suppose I could deal with a program that read a command file of such commands. -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On Aug 7, 2014, at 12:45 PM, Robert Moskowitz wrote: > I am working now more on handcrafting my SD cards for arm testing. Gparted > did not do a good job, allowing me to make parititions not on 'cylinder > boundaries'. FWIW cylinder boundaries are legacy and irrelevant, for either SSDs (including SD cards) or HDDs. You have to go back two epochs to get to CHS being relevant. Everything is LBA these days. The boundary you want is simply 2048 for 512 byte (logical) sectors, which is a 1MB boundary. That's the easiest and works well for everything, you don't have to think about it any further. Any recent parted, fdisk, and gdisk do this. > And the labels it created were not recognized when I mounted the drive. I > had to use the disk utility to fix the labels. Not recognized? That's vague. What does happen? The volume label appears garbled, or is blank? What is "disk utility"? There's "Disks" a.k.a. gnome-disks. Is the SD card being GPT partitioned or MBR partitioned? GPT partitions support partition names, MBR partitioning doesn't. So maybe there's a weird conflict somewhere between volume labels (a filesystem name), and partition names (a GPT only thing). > Anyway, to script it and to put this up on some wikis, I really need to do > this by command line. > > So I have looked at both fdisk and parted. Neither are for 'simple' command > lines. Fdisk takes me back to my DOS days (wonder where MS got it from?). > > So first I want a command that will delete all partitions on /dev/sdb fdisk and gdisk have only interactive modes. parted has both command line and interactive modes, it sounds like you're only familiar with the interactive mode. But I'm not sure if it accepts MB units in command line mode; it does in interactive mode. Possibly cfdisk or cgdisk will offer what you want. > Of course, I understand how many MB I want each, but I am suppose to (or so > from the warnings that 'fdisk -l' provided) maintain boundaries. If you specify all partition start and end values in MB, or in sectors that are 2048 divisible, it's fine. You can even get away with much less, the only time alignment really matters is 4096 sector HDD's, so that's an 8 sector or 4KB alignment. It's just that 1MB or 1GB units is ultimately all we care about for partition sizes, and they happen to align. Chris Murphy -- users mailing list users@lists.fedoraproject.org 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
Re: Command line for creating partitions
On 08/07/2014 08:45 PM, Robert Moskowitz wrote: > I am working now more on handcrafting my SD cards for arm testing. > Gparted did not do a good job, allowing me to make parititions not on > 'cylinder boundaries'. And the labels it created were not recognized > when I mounted the drive. I had to use the disk utility to fix the > labels. Anyway, to script it and to put this up on some wikis, I really > need to do this by command line. > > So I have looked at both fdisk and parted. Neither are for 'simple' > command lines. Fdisk takes me back to my DOS days (wonder where MS got > it from?). > > So first I want a command that will delete all partitions on /dev/sdb > > then create a partition as ext3, then one as linux-swap, and finally > ext4. Of course, I understand how many MB I want each, but I am suppose > to (or so from the warnings that 'fdisk -l' provided) maintain boundaries. > > thanks for any pointers to the best tool(s) for this. So far my search > foo has only gone to old fdisk pages. > Hi Robert, have a look at /sbin/cfdisk It is part of util-linux. Kind regards Joachim Backes -- Fedora release 20 (Heisenbug) Kernel-3.15.8-200.fc20.x86_64 Joachim Backes http://www-user.rhrk.uni-kl.de/~backes -- users mailing list users@lists.fedoraproject.org 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
Command line for creating partitions
I am working now more on handcrafting my SD cards for arm testing. Gparted did not do a good job, allowing me to make parititions not on 'cylinder boundaries'. And the labels it created were not recognized when I mounted the drive. I had to use the disk utility to fix the labels. Anyway, to script it and to put this up on some wikis, I really need to do this by command line. So I have looked at both fdisk and parted. Neither are for 'simple' command lines. Fdisk takes me back to my DOS days (wonder where MS got it from?). So first I want a command that will delete all partitions on /dev/sdb then create a partition as ext3, then one as linux-swap, and finally ext4. Of course, I understand how many MB I want each, but I am suppose to (or so from the warnings that 'fdisk -l' provided) maintain boundaries. thanks for any pointers to the best tool(s) for this. So far my search foo has only gone to old fdisk pages. -- users mailing list users@lists.fedoraproject.org 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
Re: Creating partitions
On Sun, Oct 23, 2011 at 1:36 PM, Reindl Harald wrote: > > I would like to keep simple my disk, and reading the Fedora installation > > guide found that there are only 3 partitions required, SWAP, BOOT (ext3) > > and ROOT / (ext3)... I still don't like the idea of an independent boot > this is simply not true > since F14 for sure ext4 is default, F13 i neve installed from scratch > /dev/md1 ext4 29G 8,0G 21G 28% / > /dev/md0 ext4485M 51M 430M 11% /boot > /dev/md2 ext43,6T 1,2T 2,4T 34% /mnt/data > I forgot to say it was another distro, now am moving to Fedora but always in the past I've used swap and root only... of course Fedora uses ext4 :P Take care -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
Am 23.10.2011 20:22, schrieb Joe Zeff: On 10/23/2011 07:57 AM, Miguel Cardenas wrote: > I would like to keep simple my disk, and reading the Fedora installation > guide found that there are only 3 partitions required, SWAP, BOOT (ext3) > and ROOT / (ext3)... I still don't like the idea of an independent boot > partition but let's do it in the Fedora way... so, I want to know if > this layout may work for me... I want to ask before doing it to save > hours of installation just to try and see the results... You only need a /boot partition if root is ext4, because legacy grub doesn't grok it. If you only use ext3, you can get away with two partitions: / and swap. (I have a separate /home, but no /boot.) __ this is simply not true since F14 for sure ext4 is default, F13 i neve installed from scratch /dev/md1 ext4 29G 8,0G 21G 28% / /dev/md0 ext4485M 51M 430M 11% /boot /dev/md2 ext43,6T 1,2T 2,4T 34% /mnt/data signature.asc Description: OpenPGP digital signature -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
Am 23.10.2011 16:57, schrieb Miguel Cardenas: > For years I used to create 2 primary partitions, SWAP and EXT3, but now I > found that Fedora > requires a different layout with more partitions like other *nix operating > systems that distribute > the space in more areas for home, root, usr, etc. fedora REQUIRES nothing but a partition you can even use a single partition without seperate boot you can manually define a partition layout in anaconda /usr is SURELY not required and not recommended for several reasons and not part of teh default partition scheme - per default fedora would install LVM (a not so smart default) but it is not wise to have /home on the same partition as the system if you ever want to reinstall it and a small /boot is also wise because look back at times where / as ext4 was possible but not for /boot [root@ns2:~]$ df -hT Dateisystem Typ Size Used Avail Use% Eingehängt auf /dev/sdb1 ext46,0G 1,2G 4,8G 20% / /dev/sda1 ext4494M 20M 475M 4% /boot [root@ns2:~]$ cat /etc/redhat-release Fedora release 14 (Laughlin) [root@buildserver64:~]$ df -hT | grep -v tmpf Dateisystem TypGröße Benut Verf Ben%% Eingehängt auf rootfs rootfs 15G 4,8G 10G 33% / /dev/sdb1 ext4 15G 4,8G 10G 33% / /dev/sda1 ext4190M 43M 148M 23% /boot [root@buildserver64:~]$ cat /etc/redhat-release Fedora release 15 (Lovelock) > I still don't like the idea of an independent boot > partition but let's do it in the Fedora way... /boot on a own partition doe snot hurt and offers more flexibility but it is not required so, I want to know if this layout may work for me... I want to ask > before doing it to save hours of installation just to try and see the > results... > > #1 PRIMARY type 0c (Win95 Fat32 LBA) > #2 EXTENDED > A - SWAP type 82 > B - BOOT /boot type 83 (linux ext3) > C - ROOT / type 83 (linux ext3) why will anybody use ext3 these days instead ext4? > And one additional doubt... Fedora worked fine on this laptop but just bought > a new one, it comes with Windows7 > preinstalled and want to keep the original system backed up... Do you think > it is safe to use Clonezilla for any > modern hard disk? My doubt is because I have a relatively old IDE disk (80Gb) > that after restoring a Clonezilla > backup it does not boot anymore, I guess it is due a possible different > geometry interpretation by my installed > linux and the Clonezilla bootable linux, since the disk is ok and works > always perfect... you can even boot with a live-cd and make "dd if=dev/sda of=/dev/sdb bs=16M" and make a bytewise clone on an additional disk or even use dd over a pipe and ssh to clone a whole machine including a raid10 - linux is not as stoopid as windows if hardware changes > And, after the backup, during the Fedora installation, it asks how to use the > hard disk, there is an option to > shrink a used partition, but would it work with Win7? As far as I know a NTFS > partition can not be shrinked... is > it possible? can you comment something about this? be advised to make a full backup! NTFS can be shrinked all the last years and current gparted is supporting it but maybe winodws is too dumb to recognize the change and will not boot can not say anything about this because i never use windows outside vmware signature.asc Description: OpenPGP digital signature -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
On Sun, 2011-10-23 at 09:57 -0500, Miguel Cardenas wrote: > Hello > > I've installed Fedora 15 to try the distro, it was a bit difficult at > first (I have used Slackware for the last 8 years) but I'm beginning > to become familiar with Fedora usage, although I have a few doubts > about the partitions. > > For years I used to create 2 primary partitions, SWAP and EXT3, but > now I found that Fedora requires a different layout with more > partitions like other *nix operating systems that distribute the space > in more areas for home, root, usr, etc. > > I would like to keep simple my disk, and reading the Fedora > installation guide found that there are only 3 partitions required, > SWAP, BOOT (ext3) and ROOT / (ext3)... I still don't like the idea of > an independent boot partition but let's do it in the Fedora way... so, > I want to know if this layout may work for me... I want to ask before > doing it to save hours of installation just to try and see the > results... > > #1 PRIMARY type 0c (Win95 Fat32 LBA) > #2 EXTENDED > A - SWAP type 82 > B - BOOT /boot type 83 (linux ext3) > C - ROOT / type 83 (linux ext3) > > And one additional doubt... Fedora worked fine on this laptop but just > bought a new one, it comes with Windows7 preinstalled and want to keep > the original system backed up... Do you think it is safe to use > Clonezilla for any modern hard disk? My doubt is because I have a > relatively old IDE disk (80Gb) that after restoring a Clonezilla > backup it does not boot anymore, I guess it is due a possible > different geometry interpretation by my installed linux and the > Clonezilla bootable linux, since the disk is ok and works always > perfect... > > So, do you think it would be a good idea to backup Win7 on a SATA > 500Gb disk, no datafiles yet, just the operating system, I want to > keep it for the license... > > And, after the backup, during the Fedora installation, it asks how to > use the hard disk, there is an option to shrink a used partition, but > would it work with Win7? As far as I know a NTFS partition can not be > shrinked... is it possible? can you comment something about this? > > Thanks for your help! > > > -- > Miguel Cardenas You can customize your partitions using the Custom option in the installation sequence. It is all easier if you install the Windows first in the first partition. -- === The end of labor is to gain leisure. === Aaron Konstam telephone: (210) 656-0355 e-mail: akons...@sbcglobal.net -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
On 10/23/2011 12:15 PM, Daniel B. Thurman wrote: > I have found for ext3 that if the contents of /boot was modified > in any way, it can affect whether or not the bootloader could > boot off of /boot partition. My advice is to use /boot for ext3& ext4. Thank you, that's nice to know. I stay out of /boot at all times unless I have no choice, such in tweaking the timeout in grub.conf, and I've never had the slightest trouble with it. I do have a separate /boot partition on my laptop, but / there is ext4. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
On 10/23/2011 11:22 AM, Joe Zeff wrote: > On 10/23/2011 07:57 AM, Miguel Cardenas wrote: >> I would like to keep simple my disk, and reading the Fedora installation >> guide found that there are only 3 partitions required, SWAP, BOOT (ext3) >> and ROOT / (ext3)... I still don't like the idea of an independent boot >> partition but let's do it in the Fedora way... so, I want to know if >> this layout may work for me... I want to ask before doing it to save >> hours of installation just to try and see the results... > You only need a /boot partition if root is ext4, because legacy grub > doesn't grok it. If you only use ext3, you can get away with two > partitions: / and swap. (I have a separate /home, but no /boot.) I have found for ext3 that if the contents of /boot was modified in any way, it can affect whether or not the bootloader could boot off of /boot partition. My advice is to use /boot for ext3 & ext4. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
On 10/23/2011 07:57 AM, Miguel Cardenas wrote: > I would like to keep simple my disk, and reading the Fedora installation > guide found that there are only 3 partitions required, SWAP, BOOT (ext3) > and ROOT / (ext3)... I still don't like the idea of an independent boot > partition but let's do it in the Fedora way... so, I want to know if > this layout may work for me... I want to ask before doing it to save > hours of installation just to try and see the results... You only need a /boot partition if root is ext4, because legacy grub doesn't grok it. If you only use ext3, you can get away with two partitions: / and swap. (I have a separate /home, but no /boot.) -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
I keep it fairly simple. Just one ext4 partition, for / per distro with the bootloader installed to the partition. The system came with Vista and a recovery partition on a 500GB hard drive. Here's the process I followed: 1. Shrink the Vista partition (I gave it 50 GB) 2. Create a 1GB boot partition immediately following the boot partition. 3. Create an extended partition for my Linux distros and misc. files 4. Create a 20GB partition for Fedora, and a couple of 80GB partitions for the misc. stuff 5. Install Fedora using the 1GB boot partition as /boot, and the 20GB partition as / (no swap). Install grub to the hard drive's MBR. 6. Unmount /boot and remount the boot partition on /media 7. Copy the contents of /mnt to /boot 8. Install grub on the Fedora partition 9. Manually modify the grub config file on /media to chainload the bootloader on the Fedora partition. Keeping a separate boot partition not tied to any one distro I might happen to install works for me; YMMV. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Creating partitions
On Sun, 2011-10-23 at 09:57 -0500, Miguel Cardenas wrote: > For years I used to create 2 primary partitions, SWAP and EXT3, but > now I found that Fedora requires a different layout with more > partitions like other *nix operating systems that distribute the space > in more areas for home, root, usr, etc. That's news to me. It used to be *advised* to use several partitions, then that advice changed to being a bare minimum of / /boot and swap (great fun in doing a fsck on a whopping huge partition on today's huge large drives). But either was just advice, only the bare minimum were required, and swap could be a file in a partition, though that hasn't always been a good idea. > > I still don't like the idea of an independent boot partition but let's > do it in the Fedora way... It used to be advised to have a separate /boot partition, near the start of the disc, so that the BIOS will have no trouble reading it to begin booting. Some computers couldn't boot up from files deep into the drive. I don't know how valid that concern is, any more. Now, there's a second purpose to the /boot partition, it's also used to hold large amounts of files during an upgrade-installation, since that /boot partition will not be removed during an upgrade, but other partitions may be. -- [tim@localhost ~]$ uname -r 2.6.27.25-78.2.56.fc9.i686 Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Creating partitions
Hello I've installed Fedora 15 to try the distro, it was a bit difficult at first (I have used Slackware for the last 8 years) but I'm beginning to become familiar with Fedora usage, although I have a few doubts about the partitions. For years I used to create 2 primary partitions, SWAP and EXT3, but now I found that Fedora requires a different layout with more partitions like other *nix operating systems that distribute the space in more areas for home, root, usr, etc. I would like to keep simple my disk, and reading the Fedora installation guide found that there are only 3 partitions required, SWAP, BOOT (ext3) and ROOT / (ext3)... I still don't like the idea of an independent boot partition but let's do it in the Fedora way... so, I want to know if this layout may work for me... I want to ask before doing it to save hours of installation just to try and see the results... #1 PRIMARY type 0c (Win95 Fat32 LBA) #2 EXTENDED A - SWAP type 82 B - BOOT /boot type 83 (linux ext3) C - ROOT / type 83 (linux ext3) And one additional doubt... Fedora worked fine on this laptop but just bought a new one, it comes with Windows7 preinstalled and want to keep the original system backed up... Do you think it is safe to use Clonezilla for any modern hard disk? My doubt is because I have a relatively old IDE disk (80Gb) that after restoring a Clonezilla backup it does not boot anymore, I guess it is due a possible different geometry interpretation by my installed linux and the Clonezilla bootable linux, since the disk is ok and works always perfect... So, do you think it would be a good idea to backup Win7 on a SATA 500Gb disk, no datafiles yet, just the operating system, I want to keep it for the license... And, after the backup, during the Fedora installation, it asks how to use the hard disk, there is an option to shrink a used partition, but would it work with Win7? As far as I know a NTFS partition can not be shrinked... is it possible? can you comment something about this? Thanks for your help! -- Miguel Cardenas -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines