Code: Select all
sudo dd if=/dev/zero of=rootfs bs=1M count=0 seek=2048
Code: Select all
time sudo mkfs.$TYPE -F rootfs
Here are the results:
Code: Select all
ext2 18 seconds
ext3 62 seconds
ext4 21 seconds
When we make rootfs and homefs files at boot-time in the Live system, I will follow skidoo's suggestion and warn people it could take a long time. I can also display the mkfs output:
Code: Select all
mke2fs 1.42.7 (21-Jan-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
Another thing to check is the partition alignment. If you do an"sudo fdisk -l /dev/sdX" where X is the letter for your usb stick then you want the first entry to start at 2048. If it starts at 63, this could be making your stick much slower.
BAD:
Code: Select all
/dev/sda1 * 63 433754 216846 83 Linux
Code: Select all
/dev/sde1 * 2048 15265791 7631872 83 Linux