OpenWrt Forum Archive

Topic: How to format and mount external hard drive?

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I have a problem. I have TP-Link TL-WR1043ND (v1) and external hard drive WD My Book 2TB. What I want?
I want to have 3 partitions:
1. hfs+ (for MAC backups)
2. hfs+ (for another mac backups)
3. ext?? (for movies - I will watch movies on my TV via DLNA) - maybe ext4

I'm totally noob in this, can you help me please?

I have clean firmware of OpenWRT with installed these modules:

block-mount
cfdisk
kmod-usb-storage
kmod-usb-storage-extras

kmod-fs-ext4
kmod-fs-hfs
kmod-fs-hfsplus
kmod-fs-ntfs
kmod-fs-vfat

I know I must run cfdisk via terminal and I know how to create partitions (thank you GUI).
But what next? How to mount all three partitions please?

Thank you so much.

(Last edited by Renik on 3 Jul 2015, 17:43)

ok so I tried to delete partition and create new from fdisk.
fdisk -l

Device    Boot Start        End     Blocks  Id System
/dev/sda1         63 3906963455 1953481696+ 83 Linux

If I try to mount it (mount /dev/sda1 /mnt) I get this error

root@OpenWrt:/# mount /dev/sda1 /mnt
mount: mounting /dev/sda1 on /mnt failed: Invalid argument

Once you created the partition, have you formatted the newly created partition?

mkfs -t ext4 /dev/sda1
mount /dev/sda1 /mnt

Thank you, I followed this tutorial and it works fine now
https://www.youtube.com/watch?v=XVzp30nt97A

But: currently I have mounted only /dev/sda4, how can I mount sda2, sda3? I need to format it but I don't know how coz hfs+ partitions..

Disk /dev/sda: 1.8 TiB, 2000365289472 bytes, 3906963456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device    Boot     Start        End     Blocks  Id System
/dev/sda1             63    1953125     976531+ 82 Linux swap / Solaris
/dev/sda2        1953792  379441151  188743680  af HFS / HFS+
/dev/sda3      379441152  756928511  188743680  af HFS / HFS+
/dev/sda4      756928512 3906963455 1575017472  83 Linux

Thank you.

(Last edited by Renik on 4 Jul 2015, 17:11)

This is what i use http://gparted.org/  ,they got it for linux,windows and mac OS.you can make as many partitions you want and format them to anything you want.I switch from MSDOS to GPT partitioning scheme and formated to ext4 works great.

hey i found one of my old builds with all support for ext2.ext3,ext4 and a working samba you want need to opkg donwload anything.Let me know if you want to give it a try.

(Last edited by ckm on 5 Jul 2015, 03:49)

Probably your best way to format a partition to HFS to connect the drive to your Mac and use MacOS directly.  Linux support for HFS is limited.

The discussion might have continued from here.