0

So I have a TL-MR3220v2 router, which has Openwrt installed, this device only has a 4mb flash so I'm trying to get extroot setup on a USB, to increase disk space.

My first attempt I tried using a FAT32 FS, which I was able to get mounted and transfer files, but I quickly realized that this FS would not work as a linux root because of permissions, symlinks, and such.

So I tried again this time with a ext4 formatted usb. So I then try to mount this partition onto my device, but every time it results in a 'segmentation fault' with the following in my dmesg log:

[ 1146.920000] usb 1-1: new high-speed USB device number 3 using ehci-platform
[ 1147.070000] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1147.090000] scsi host1: usb-storage 1-1:1.0
[ 1148.390000] scsi 1:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 4
[ 1148.400000] sd 1:0:0:0: [sda] 31258624 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 1148.410000] sd 1:0:0:0: [sda] Write Protect is off
[ 1148.420000] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 1148.420000] sd 1:0:0:0: [sda] No Caching mode page found
[ 1148.430000] sd 1:0:0:0: [sda] Assuming drive cache: write through
[ 1148.440000]  sda: sda1
[ 1148.450000] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 1168.550000] CPU 0 Unable to handle kernel paging request at virtual address c0676c40, epc == c0676c40, ra == c0694dd0
[ 1168.560000] Oops[#4]:
[ 1168.560000] CPU: 0 PID: 1596 Comm: mount Tainted: G      D        3.18.18 #1
[ 1168.560000] task: 8182a220 ti: 8155a000 task.ti: 8155a000
[ 1168.560000] $ 0   : 00000000 00000000 c0698e60 00000000
[ 1168.560000] $ 4   : c06c6b30 00008000 81578700 00000000
[ 1168.560000] $ 8   : 00003100 8157868a 00000010 00000013
[ 1168.560000] $12   : 7fb3d928 00000000 00000000 770b4000
[ 1168.560000] $16   : 80f6c780 81578700 c06c6b30 c06c6b30
[ 1168.560000] $20   : 00000000 00000000 81578c00 770b4000
[ 1168.560000] $24   : 00000010 8016c38c                  
[ 1168.560000] $28   : 8155a000 8155be38 00000000 c0694dd0
[ 1168.560000] Hi    : 00000019
[ 1168.560000] Lo    : 00000000
[ 1168.560000] epc   : c0676c40 0xc0676c40
[ 1168.560000]     Tainted: G      D       
[ 1168.560000] ra    : c0694dd0 ext4_orphan_del+0x108c/0x1f30 [ext4]
[ 1168.560000] Status: 1000fc03    KERNEL EXL IE 
[ 1168.560000] Cause : 10800008
[ 1168.560000] BadVA : c0676c40
[ 1168.560000] PrId  : 00019374 (MIPS 24Kc)
[ 1168.560000] Modules linked in: ext4 jbd2 mbcache crc16 crypto_hash usb_storage sd_mod scsi_mod ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat_ftp nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_ftp nf_conntrack iptable_raw iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables ipv6 arc4 crypto_blkcipher ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
[ 1168.560000] Process mount (pid: 1596, threadinfo=8155a000, task=8182a220, tls=770c1644)
[ 1168.560000] Stack : 80400000 80f6c780 81578700 804073f0 c0698e60 80116f30 81733300 800ffc68
[ 1168.560000]       00000000 81578c00 c06c6b30 81578700 00008000 c06c6b30 80f6c780 81578700
[ 1168.560000]       00008000 80116fdc 00008000 8010a4a0 00000001 7fb3df74 c06c6b30 00000020
[ 1168.560000]       80391f70 00008000 81578700 80119de8 8182ebc0 7fb3df74 0000000a 800ddc68
[ 1168.560000]       81b1f010 8088e4c8 7fb3dc34 770b4000 00000000 0000000a 00000000 81578c00
[ 1168.560000]       ...
[ 1168.560000] Call Trace:
[ 1168.560000] [<c0698e60>] ext4_calculate_overhead+0x4b8/0x3238 [ext4]
[ 1168.560000] [<80116f30>] alloc_vfsmnt+0x124/0x16c
[ 1168.560000] [<800ffc68>] mount_fs+0x20/0xd8
[ 1168.560000] [<80116fdc>] vfs_kern_mount+0x64/0x114
[ 1168.560000] [<8010a4a0>] user_path_at+0x14/0x20
[ 1168.560000] [<80119de8>] do_mount+0x868/0x974
[ 1168.560000] [<800ddc68>] memdup_user+0x28/0x90
[ 1168.560000] [<8011a178>] SyS_mount+0x90/0xd4
[ 1168.560000] [<80062b5c>] handle_sys+0x11c/0x140
[ 1168.560000] [<80064f40>] __bzero+0xc4/0x164
[ 1168.560000] 
[ 1168.560000] 
[ 1168.560000] Code: (Bad address in epc)
[ 1168.560000] 
[ 1168.820000] ---[ end trace 9f7c3beeded42796 ]---

df:

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  640.0K    572.0K     68.0K  89% /
/dev/root                 2.0M      2.0M         0 100% /rom
tmpfs                    13.9M    656.0K     13.3M   5% /tmp
/dev/mtdblock3          640.0K    572.0K     68.0K  89% /overlay
overlayfs:/overlay      640.0K    572.0K     68.0K  89% /
tmpfs                   512.0K         0    512.0K   0% /dev

free:

root@OpenWrt:/# free
             total         used         free       shared      buffers
Mem:         28508        17516        10992          656          568
-/+ buffers:              16948        11560
Swap:            0            0            0

If not sure what going on here, I dont think RAM is a problem as the free command show that half my ram is still unused, and i did try with ext2 and 3 but i just get the same output.

So if anyone has any idea i would greatly appreciate it! Thanks!

EDIT: So I found this page http://blog.csdn.net/u011839461/article/details/12001437 which say if BadVA == epc then it is most likely memory corruption, but Im not sure what i can do about it.

  • Welcome to U&L! Adding the free output wouldn't hurt. – Jeff Schaller Jul 16 '15 at 1:45
  • Thanks! I just added my 'free' output, also added my 'df' output – Kr0nZ Jul 16 '15 at 2:11
0

Figured i might update this with my solution, I just ended up building Openwrt from source, and included the required packages in the build, and now it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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