尝试从 USB (openwrt) 安装 ext(2,3,4) fs 时出现分段错误

尝试从 USB (openwrt) 安装 ext(2,3,4) fs 时出现分段错误

所以我有一个 TL-MR3220v2 路由器,它安装了 Openwrt,该设备只有 4mb 闪存,所以我尝试在 USB 上进行 extroot 设置,以增加磁盘空间。

我的第一次尝试是使用 FAT32 FS,我能够挂载它并传输文件,但我很快意识到,由于权限、符号链接等原因,该 FS 不能作为 Linux 根目录使用。

所以这次我用 ext4 格式的 USB 再次尝试。因此,我尝试将此分区安装到我的设备上,但每次都会导致“分段错误”,并在我的 dmesg 日志中显示以下内容:

[ 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

自由的:

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

如果不确定这里发生了什么,我不认为 RAM 是一个问题,因为 free 命令显示我的一半 RAM 仍未使用,我确实尝试使用 ext2 和 3,但我只是得到相同的输出。

因此,如果有人有任何想法,我将不胜感激!谢谢!

编辑:所以我找到了这个页面http://blog.csdn.net/u011839461/article/details/12001437上面说如果 BadVA == epc 那么很可能是内存损坏,但我不确定我能做些什么。

答案1

我想我可能会用我的解决方案更新它,我刚刚从源代码构建了 Openwrt,并在构建中包含了所需的包,现在它工作正常。

相关内容