From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Vesta <laguna-mc@mail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Mounting the squashfs/read-only Linux file system on MTD partition
Date: Tue, 7 May 2019 09:05:50 +0200 [thread overview]
Message-ID: <20190507090550.1be251a6@xps13> (raw)
In-Reply-To: <trinity-6f5a6dee-773f-4141-9b34-daaa48446eec-1556719828713@3c-app-mailcom-lxa08>
Hi Vesta,
Vesta <laguna-mc@mail.com> wrote on Wed, 1 May 2019 16:10:28 +0200:
> Hi,
>
> Device have embedded Linux version 2.6.26.5, at boot time the system creates 11 MTD partitions on NAND flash.
First, 2.6.26 is horribly old and not maintained at all. First step for
you would be to use a recent kernel, the MTD subsystem has changed quite
a lot since then.
> I'm in limited Busybox shell.
> BusyBox v1.10.2 (2017-08-02 14:07:25 CST) built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> /bin/sh: can't access tty; job control turned off
> # mount -t proc proc /proc
> # mount -t sysfs sysfs /sys
> # mount -t tmpfs tmpfs /tmp
> # mount -t tmpfs none /dev
> # mkdir /dev/pts
> # mount -t devpts devpts /dev/pts
> # mdev -s
> # cat /proc/mtd
> dev: size erasesize name
> mtd0: 00060000 00004000 "u-boot"
> mtd1: 00020000 00004000 "u-bootenv"
> mtd2: 013e0000 00004000 "ROMIMAGE"
> mtd3: 00700000 00004000 "HALFIMAGE"
> mtd4: 01260000 00004000 "LINUX_ROOTFS"
> mtd5: 00200000 00004000 "HS_FW"
> mtd6: 00100000 00004000 "FPAR"
> mtd7: 00080000 00004000 "CISCO"
> mtd8: 00020000 00004000 "EEPROM"
> mtd9: 00080000 00004000 "NVRAM"
> mtd10: 00080000 00004000 "CA_DATA"
> # mount
> rootfs on / type rootfs (rw)
> /dev/root on / type squashfs (ro)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> tmpfs on /tmp type tmpfs (rw)
> none on /dev type tmpfs (rw)
> devpts on /dev/pts type devpts (rw,mode=600)
>
> # df -h
> Filesystem Size Used Available Use% Mounted on
> rootfs 8.0M 8.0M 0 100% /
> /dev/root 8.0M 8.0M 0 100% /
> tmpfs 13.9M 0 13.9M 0% /tmp
> none 13.9M 0 13.9M 0% /dev
>
> # ls -al
> drwxr-xr-x 19 1005 1005 219 Aug 2 2017 .
> drwxr-xr-x 19 1005 1005 219 Aug 2 2017 ..
> drwxrwxr-x 6 1005 1005 86 Aug 2 2017 .svn
> drwxrwxr-x 2 1005 1005 432 Aug 2 2017 bin
> -rwxr-xr-x 1 1005 1005 715844 Aug 2 2017 cordless_nodect.coma
> drwxrwxrwt 5 0 0 2720 Jan 1 00:04 dev
> drwxr-xr-x 2 1005 1005 3 Aug 2 2017 eeprom
> drwxr-xr-x 4 1005 1005 386 Aug 2 2017 etc
> drwxr-xr-x 2 1005 1005 3 Aug 2 2017 fpar
> drwxr-xr-x 4 0 0 48 Aug 2 2017 home
> drwxr-xr-x 2 1005 1005 3 Aug 2 2017 hsfw
> drwxr-xr-x 3 1005 1005 287 Aug 2 2017 lib
> drwxrwxr-x 2 1005 1005 3 Aug 2 2017 mnt
> drwxr-xr-x 2 1005 1005 3 Aug 2 2017 nvram
> dr-xr-xr-x 27 0 0 0 Jan 1 00:00 proc
> lrwxrwxrwx 1 1005 1005 8 Aug 2 2017 root -> tmp/root
> drwxr-xr-x 2 1005 1005 642 Aug 2 2017 sbin
> drwxr-xr-x 10 0 0 0 Jan 1 00:00 sys
> drwxrwxrwt 2 0 0 40 Jan 1 00:00 tmp
> drwxr-xr-x 7 1005 1005 73 Aug 2 2017 usr
> lrwxrwxrwx 1 1005 1005 7 Aug 2 2017 var -> tmp/var
> drwxr-xr-x 6 1005 1005 4051 Aug 2 2017 www
>
> How to mount the Linux root file system on mtd4 (LINUX_ROOTFS)? It's squashfs/read-only filesystem. What is correct steps?
The Internet is full of resources. If you have a specific problem you
don't know how to solve, this is the right place to ask though.
> Does all the rest MTD partitions have JFFS2 file system?
Not necessarily. Today we discourage the use of JFFS2; use UBI/UBIFS
instead for RW partitions.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2019-05-07 7:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 14:10 Mounting the squashfs/read-only Linux file system on MTD partition Vesta
2019-05-07 7:05 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190507090550.1be251a6@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=laguna-mc@mail.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox