Edit 29 Dec 2018: Please see
my other post on the next page for a more comprehensive guide.
---
Don't hold me responsible if these instructions don't work (I wrote them for myself as a guide ages ago and they might be funky).
TL;DR Ext4 with journalling disabled: mke2fs -t ext4 -O ^has_journal -L 'DESIREDLABELHERE' '/dev/sd**'
note: use the sd** of your target disk. Check for it with Display Disk Freespace command: man df
Full guide below:
# Formatting External Drives
Alternative methods to reparation and format: Linux/Ubuntu Disk Utility, Gnome Partition Editor (GParted), or just do directly on router...
## Directly on the router
### Check disk details
Discover the /dev/sd* number of the target usb drive using either of these commands.
1. Show partition table for each DISK, then exit: `fdisk -l`
2. Print filesystem usage statistics (only shows mounted disks): `df -h`
### Repartition the disk
You must unmount the disk before repartitioning: `umount /tmp/mnt/disknamehere**`
Begin partitioning the disk: `fdisk /dev/sd*`
Display menu: `m` or `help`
View the existing partition table: `p`
Complete wipe and replace with a new partition table of type mdos MBR: `o`
_Note: It's best to create a whole new empty partition table, because the existing partition table may be locked (such as when formatted on a Mac as GPT, you'd see displayed "Found valid GPT with protective MBR; using GPT" and it wouldn't give you any options in the menu)_
Create new partition: `n` and choose `p` for primary.
Make sure the partition is "Id 83 System Linux".
Write/save the partition table and quit fdisk utility: `w`
### Format the partition
View the saved partition table: `fdisk -l`
Specify the partition to format **:
Ext2 preset: `mkfs.ext2 /dev/sd**`
Ext3 preset: `mkfs.ext3 /dev/sd**`
Ext4 journalling disabled: `mke2fs -t ext4 -O ^has_journal -L 'LABELHERE' '/dev/sd**'`
Popular options for the mke2fs command:
-t : set file system type
-L : set a new volume label
-O : specify a feature to use (eg. '-O ^64bit' = disable 64 bit feature)
Important Tip: mkfs.[type] is actually an alias of the real binary called `mke2fs`.
### Remount / Reboot
_ASUS-WRT apparently doesn't truly understand how to remount disks, so it's best to reboot_
Reboot the router: `/sbin/reboot`
Or if you really can't be bothered rebooting during testing, this command should work, just don't rely on it.
Remount the disk: `mount /dev/sd** /tmp/mnt/disknamehere`
### Change the label
You can rename the partition anytime you like.
`tune2fs -L "NEWLABELHERE" /dev/sd**`