Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have an usb flash drive and i'd like to create a single ext4 partition on it with parted and mke2fs. the drive has 15,644,672 sectors (512 bytes each). since the first sector (sector 0) is reserved to the mbr, i have 15,644,671 sectors left (from 1 to 15,644,671). i could create a partition here, but since the filesystem, by default, uses 4,096 bytes for each block, the number of sectors should be multiple of 4,096/512=8. this means i should use 15,644,664 sectors only. i could use 1,024 bytes blocks instead and have a partition with 15,644,670 sectors. if i remember correctly, another (much more important) thing to consider is that files or directories occupy only an integer number of blocks. even a 0 byte file occupies either 1,024, 2,048 or 4,096 bytes. so the smallest possible block size seems to me the best choice. are there other rules to check? thanks.

share|improve this question

1 Answer 1

Easiest way: Install GParted and use that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.