Mount SD Card

Source: Internet
Author: User

1. Install the necessary packages

[Email protected]:/# opkg Install kmod-usb-core kmod-usb-ohci kmod-usb-uhci KMOD-USB2
[Email protected]:/# opkg Install kmod-usb-storage kmod-usb-storage-extras kmod-fs-ext4 kmod-fs-vfat Kmod-nls-utf8 kmod-nls-cp437
[Email protected]:/# opkg Install usbutils fdisk block-mount e2fsprogs blkid

The above KMOD-FS-EXT4 and many other installations appear inconsistent with the kernel, using--force-depends to install

Mkfs.ext4/dev/sda2 after Mount device found the following error, toss half a day software reboot also did not

OpenWrt mount:mounting/dev/sda2 on/mnt failed:invalid argument

DMESG found y many fat:unknown symbol __blockdev_direct_io (err 0)

Suspect this SD card is a lot of bad word, on the phone is sometimes recognized and sometimes do not recognize

Replace a new SD card

When a partition is saved

Re-reading the partition table failed.: Invalid argument

It's because it's written fdisk/dev/sda1 and it's FDISK/DEV/SDA.

Mkfs.ext4/dev/sda2

Mkdir/mnt/extroot

Mount/dev/sda1/mnt/extroot

Tar-c/OVERLAY-CVF-. | Tar-c/MNT/EXTROOT-XF-

umount/mnt/extroot/

[Email protected]:/# blkid
/dev/mtdblock2:type= "SQUASHFS"
/dev/sda2:uuid= "5fb06bd1-12f3-434a-a8b7-12bc89f2f868" type= "Ext4

Block detect >/etc/config/fstab # Block-mount must be installed, or not automatically mount and block detect command No

Vi/etc/config/fstab

[Email protected]:~# cat/etc/config/fstab
Config ' global '
Option Anon_swap ' 0 '
Option Anon_mount ' 0 '
Option Auto_swap ' 1 '
Option Auto_mount ' 1 '
Option Delay_root ' 5 '
Option Check_fs ' 0 '

Config ' swap '
Option Device '/DEV/SDA1 '
Option enabled ' 0 '

Config ' Mount '
Option target '/overlay '
# option UUID ' A6395b9e-1654-4cce-8d65-580b275774d6 '
Option uuid ' 786C2745-2AD0-48B1-9C1C-F436D7F0E2C9 '
Option enabled ' 1 '

/dev/sda2 on/overlay type EXT4 (rw,relatime,data=ordered) after reboot

[Email protected]:~# Mount
Rootfs on/type rootfs (rw)
/dev/root on/rom type SQUASHFS (ro,relatime)
Proc On/proc type proc (rw,noatime)
Sysfs On/sys type SYSFS (rw,noatime)
Tmpfs on/tmp type TMPFS (rw,nosuid,nodev,noatime)
/dev/sda2 on/overlay type EXT4 (rw,relatime,data=ordered)
Overlayfs:/overlay On/type Overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
Tmpfs on/dev type TMPFS (rw,relatime,size=512k,mode=755)
Devpts on/dev/pts type devpts (rw,relatime,mode=600)
Debugfs on/sys/kernel/debug type Debugfs (rw,noatime)

[Email protected]:~# DF
Filesystem 1k-blocks used Available use% mounted on
Rootfs 5443728 21992 5122168 0%/
/dev/root 3328 3328 0 100%/rom
TMPFS 30592 30536 0%/tmp
/dev/sda2 5443728 21992 5122168 0%/overlay
Overlayfs:/overlay 5443728 21992 5122168 0%/
Tmpfs 0 0%/dev

View Swap

In order to access the original boot directory, mount it to the/overlay-boot directory, must be created under Extroot Overlay-boot must be installed under Extroot block-mount, otherwise/etc/config/fstab The content in does not execute

Config ' Mount '
Option Target/overlay-boot
Option Device/dev/mtdblock3
Option Fstype JFFS2
Option Options Rw,sync
Option Enable 1
Option Enabled_fsck 0

Resources

Http://wiki.openwrt.org/doc/howto/extroot

Mount SD Card

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.