From: JH <jupiter.hce@gmail.com>
To: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: Where to define multiple volumes sizes in one MTD rootfs partition?
Date: Mon, 14 Oct 2019 15:57:26 +1100 [thread overview]
Message-ID: <CAA=hcWTx7Zpd-PNCp+oFp3+CXzOR=Py6H_0vonbBSUU4ArLU7Q@mail.gmail.com> (raw)
In-Reply-To: <CAA=hcWRj_dhRPqRez97hHDVQ55tXbRV9VGs-okF-eKSg=6x=4g@mail.gmail.com>
Hi,
Sorry, if it is not right the mailing list to ask helps for multiple
volumes in a single ubi0 instance, any advice please?
Thank you.
Kind regards,
- jh
On 10/11/19, JH <jupiter.hce@gmail.com> wrote:
> On 10/5/19, Richard Weinberger <richard.weinberger@gmail.com> wrote:
>> On Sat, Oct 5, 2019 at 2:51 AM JH <jupiter.hce@gmail.com> wrote:
>>> Recently, one of my device is broken failed to boot up, I still don't
>>> know what was the cause by hardware problem or software, to be
>>> precaution in the future meltdown, I am going to separate all writing
>>> data from ubi0 to to another ubi volume ubi1, to keep the rootfs in
>>> ubi0 read only. How can I define the ubi0 volume size to 160 MB and
>>> the ubi1 volume size to 30 MB?
>>
>> Don't setup multiple UBI instances on the same chip.
>> The wear leveling domain should be as large as possible.
>>
>> If you want to have multiple UBIFS filesystems, just create more UBI
>> volumes.
>
> Hmm, wandering for several days how to do it, reading lots of
> documents, still not clear how could I make that work, let's say I
> have following a volume configure file:
>
> $ cat volume.conf
>
> [kernel-volume]
> mode=ubi
> image=zImage
> vol_id=1
> vol_size=10MiB
> vol_type=static
> vol_name=kernel
>
> [rootfs-volume]
> mode=ubi
> image=rootfs_data
> vol_id=2
> vol_size=110MiB
> vol_type=static
> vol_name=rootfs
>
> [data-volume]
> mode=ubi
> image=rootfs_data
> vol_id=3
> vol_size=10MiB
> vol_type=dynamic
> vol_name=data
> vol_flags=autoresize
>
> $ ubinize -o rootfs.img -p 130MiB -m 512 -s 256 volume.conf
>
> $ ubidetach -p /dev/mtd5
> $ ubiformat /dev/mtd5 -y
> $ ubiattach -m 5
> $ ubimkvol /dev/ubi0 -s 130MiB -N rootfs_data
>
> $ mount -t ubifs ubi0:rootfs_data /mnt
>
> If I have a single ubi0 rootfs in /dev/mtd5, I can set
> "root=ubi0:rootfs_data rw ubi.mtd=5,2048 noinitrd rootfstype=ubifs
> mem=256M rootwait=1"
>
> $ tar zxvf yocto-image-rootfs.tar.gz -C /mnt
>
> It can boot from the a single rootfs volume.
>
> But for multiple volumes in ubi0, I lost completely, how can it boot
> from volume configure file with multiple volumes? Where the
> volume.conf should be placed in Linux rootfs, in "/"? If it is correct
> to copy volume.conf to /mnt (the "/"), how will it boot from NAND with
> multiple volumes? That is most confusing parts, I could not see any
> clear examples and statements in documents, appreciate kindly advice.
>
> Thank you very much Richard.
>
> Kind regards,
>
> - jh
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-10-14 4:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-05 0:50 Where to define multiple volumes sizes in one MTD rootfs partition? JH
2019-10-05 8:43 ` Richard Weinberger
2019-10-11 9:38 ` JH
2019-10-14 4:57 ` JH [this message]
2019-10-15 19:17 ` Richard Weinberger
2019-10-29 6:00 ` JH
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='CAA=hcWTx7Zpd-PNCp+oFp3+CXzOR=Py6H_0vonbBSUU4ArLU7Q@mail.gmail.com' \
--to=jupiter.hce@gmail.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;
as well as URLs for NNTP newsgroup(s).