What's new

How to properly mount all partitions?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

andresmorago

Senior Member
Hello
I have reinstalled a new usb stick on my ac3100 router today. I created 3 partitions on it (files, entware, swap)

Code:
andresmorago@clo01:/tmp/home/root# fdisk -l

Disk /dev/sda: 4026 MB, 4026531840 bytes
124 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1         103      395901  83 Linux
/dev/sda2             104         383     1076320  83 Linux
/dev/sda3             384        1022     2456316  83 Linux

I have been noticing that the router is only mounting 2 out of the 3 partitions. most of the time, the files partitions never shows up

Code:
andresmorago@clo01:/tmp/home/root# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                32.3M     32.3M         0 100% /
devtmpfs                251.4M         0    251.4M   0% /dev
tmpfs                   251.6M      2.6M    249.0M   1% /tmp
/dev/mtdblock4           64.0M      6.9M     57.1M  11% /jffs
/dev/sda2                 1.0G     88.9M    893.1M   9% /tmp/mnt/entware
/dev/mtdblock4           64.0M      6.9M     57.1M  11% /www/Main_LogStatus_Cont                                                                                        ent.asp
tmpfs                   251.6M      2.6M    249.0M   1% /www/start_apply.htm
/dev/sda3                 2.3G      2.1G    125.6M  94% /tmp/mnt/swap1
tmpfs                   251.6M      2.6M    249.0M   1% /www/index_style.css
tmpfs                   251.6M      2.6M    249.0M   1% /www/require/modules/men                                                                                        uTree.js


Code:
andresmorago@clo01:/tmp/home/root# more /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=257448k,nr_inodes=64362,mode=755 0 0
proc /proc proc rw,relatime 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
/dev/mtdblock4 /jffs jffs2 rw,noatime 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda2 /tmp/mnt/entware ext4 rw,nodev,relatime,barrier=1,data=ordered 0 0
/dev/mtdblock4 /www/Main_LogStatus_Content.asp jffs2 rw,noatime 0 0
tmpfs /www/start_apply.htm tmpfs rw,relatime 0 0
/dev/sda3 /tmp/mnt/swap1 ext4 rw,nodev,relatime,barrier=1,data=ordered 0 0
tmpfs /www/index_style.css tmpfs rw,relatime 0 0
tmpfs /www/require/modules/menuTree.js tmpfs rw,relatime 0 0
andresmorago@clo01:/tmp/home/root#
could you please advise on a proper way to automatically have the router mount all 3 partitions?

thanks!
 
The "proper" way to mount the partitions is to physically plug the device in (or reboot the router) and let the USB hotplug service do the mounting.

If a partition isn't being automatically mounted then there should be an error message in the router's syslog.
 
thanks Colin. Indeed, theres something going on that i hadnt noticed before.
Can this be fixed by reformatting?

Code:
Nov 20 09:27:01 clo01 wsdd2[5247]: starting.
Nov 20 09:27:01 clo01 crond[480]: time disparity of 1865361 minutes detected
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 32 not in group (block 0)!
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): group descriptors corrupted!
Nov 20 09:27:01 clo01 kernel: EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 hotplug[4268]: USB /dev/sda1(ext) failed to mount!
Nov 20 09:27:01 clo01 kernel: EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 32 not in group (block 0)!
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): group descriptors corrupted!
Nov 20 09:27:01 clo01 kernel: EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: tfat: fail_safe is enabled
Nov 20 09:27:01 clo01 kernel: tntfs info (device sda1, pid 5256): ntfs_fill_super(): fail_safe is enabled.
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 32 not in group (block 0)!
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): group descriptors corrupted!
Nov 20 09:27:01 clo01 kernel: EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 hotplug[4268]: USB /dev/sda1(ext) failed to mount!
Nov 20 09:27:01 clo01 kernel: EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): ext4_check_descriptors: Block bitmap for group 32 not in group (block 0)!
Nov 20 09:27:01 clo01 kernel: EXT4-fs (sda1): group descriptors corrupted!
Nov 20 09:27:01 clo01 kernel: EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (240)
Nov 20 09:27:01 clo01 kernel: tfat: fail_safe is enabled
Nov 20 09:27:01 clo01 kernel: tntfs info (device sda1, pid 5274): ntfs_fill_super(): fail_safe is enabled.
 
Those messages usually appear when you have formatted the partition as ext4 on a different machine (i.e. not the router) and it has used unsupported features. The solution in that case is to use the router itself to format the partition.

EDIT: Correction, the relevant error message in this case is the "group descriptors corrupted!".
 
Last edited:
strange. i used the format tool included on amtm to format the usb. i guess, ill re-format again
 
@ColinTaylor do you see anything strange on this log?

this bugs me a little /dev/sda2 is apparently in use by the system; will not make a filesystem here!

Code:
_____________________________________________

Formatting sda General UDisk (4.0 GB) now!
_____________________________________________

Stopping file serving services and swap file

Unmounting device(s)

Zeroing disk sda General UDisk (4.0 GB)

16065+0 records in
16065+0 records out

Creating partition(s) on sda General UDisk (4.0 GB)

Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-1022, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (104-1022, default 104): Using default value 104
Last cylinder or +size or +sizeM or +sizeK (104-1022, default 1022):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (384-1022, default 384): Using default value 384
Last cylinder or +size or +sizeM or +sizeK (384-1022, default 1022): Using default value 1022

Command (m for help): fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
The partition table has been altered.
Calling ioctl() to re-read partition table

Formatting Partition 1 as "ext4", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 395900 1k blocks and 99176 inodes
Filesystem UUID: f3bdfd8c-74fd-4d2d-803c-c585c55eaf37
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

Setting Partition 1 device label "files"

tune2fs 1.45.6 (20-Mar-2020)


Formatting Partition 2 as "ext4", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
/dev/sda2 is apparently in use by the system; will not make a filesystem here!
Setting Partition 2 device label "entware"

tune2fs 1.45.6 (20-Mar-2020)


Formatting Partition 3 as "ext4", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 614079 4k blocks and 153520 inodes
Filesystem UUID: 014b06d5-0e06-4b0e-9e16-0ab0ac5e9cdb
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

Setting Partition 3 device label "swap01"

tune2fs 1.45.6 (20-Mar-2020)

_____________________________________________

Done formatting device

The log file can be viewed with fdl

Your router will now reboot for the changes
to take effect.

Press Enter to continue
 
Yes that looks wrong. It's failed to create sda2 properly, perhaps because it couldn't unmount it.
 
Last edited:
Try removing the device and plugging it into a Windows PC. Then format the entire device as exFAT (which the router doesn't understand). Then plug it back into the router and try amtm again.
 
Try removing the device and plugging it into a Windows PC. Then format the entire device as exFAT (which the router doesn't understand). Then plug it back into the router and try amtm again.
im remote and dont want to bug my dad tonight :p. im trying ext3 first and it looks it formatted ok this time. if this doesnt work, ill have him do the PC procedure tomorrow

Code:
_____________________________________________

 Formatting sda General UDisk (4.0 GB) now!
_____________________________________________

 Stopping file serving services and swap file

 Unmounting device(s)

 Zeroing disk sda General UDisk (4.0 GB)

16065+0 records in
16065+0 records out

 Creating partition(s) on sda General UDisk (4.0 GB)

Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.


Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-1022, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (129-1022, default 129): Using default value 129
Last cylinder or +size or +sizeM or +sizeK (129-1022, default 1022):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (384-1022, default 384): Using default value 384
Last cylinder or +size or +sizeM or +sizeK (384-1022, default 1022): Using default value 1022

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table

 Formatting Partition 1 as "ext3", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 492000 1k blocks and 123464 inodes
Filesystem UUID: d5127346-26f7-4137-a9e8-490242907ef4
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

 Setting Partition 1 device label "files"

tune2fs 1.45.6 (20-Mar-2020)


 Formatting Partition 2 as "ext3", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 245055 4k blocks and 61312 inodes
Filesystem UUID: 2d580edb-cdc3-452d-93c4-3f052579ccb7
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

 Setting Partition 2 device label "entware"

tune2fs 1.45.6 (20-Mar-2020)


 Formatting Partition 3 as "ext3", enabling journalling

mke2fs 1.45.6 (20-Mar-2020)
Creating filesystem with 614079 4k blocks and 153520 inodes
Filesystem UUID: 1aceeacf-b7ee-4527-862f-81734b116645
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

 Setting Partition 3 device label "swap"

tune2fs 1.45.6 (20-Mar-2020)

_____________________________________________

 Done formatting device

 The log file can be viewed with fdl

 Your router will now reboot for the changes
 to take effect.

 Press Enter to continue
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top