Error loading root filesystem

  • Dear F&S,


    we purchased the armstone A5 Starter Kit. I've created a rootfs image using buildroot and tried to load it following the guide Vibrid Linux First Steps starting at section 4.4 Load and Save Root File System. Unfortunately
    command ubi create rootfs fails. What did I miss? Here is my log:


  • Hi JohnnyE, moved your contribution to Linux forum.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • If you call "ubi part TargetFS" for the very first time with a blank MTD partition, the UBI is initialized. Then the command "ubi create rootfs" will succeed. But if you call "ubi part TargetFS" again later, then the exisiting UBI is of course re-used and the rootfs volume already exists. Then the "ubi create rootfs" will fail because there is no free space to create an additional volume. This seems to be the case here. If you look at the lines:


    Code
    1. UBI: number of internal volumes: 1
    2. UBI: number of user volumes: 1


    then you'll see that the UBI already contains a user volume. You can show the existing volumes with command


    Code
    1. ubi info layout


    This command will show the volumes created by the user (e.g. rootfs) and also the internal volume called "layout volume". This is a kind of partition table that holds the list of existing volumes. This volume is always present and can't be removed.


    If you want to create more than one volume in the UBI, you'll have to give each of them a size. Only the last volume can be created without a size and then it will use up the whole remaining space.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    I just want to replace the existing root filesystem with the one I've created from buildroot. As you pointed that
    a user volume already exists, I tried to download and write immediately, but without success.


    Code
    1. armStoneA5 # ubi write $loadaddr rootfs $filesize
    2. Error, no UBI device/partition selected!


    So I tried to find out how the existing partition is named and
    unsuccessfully used the ubi info layout command you mentioned.

    Code
    1. armStoneA5 # ubi info layout
    2. Error, no UBI device/partition selected!


    I was looking for some help and found the following documentation:
    http://www.linux-mtd.infradead.org/doc/ubi.html#L_usptools
    They use a slightly other syntax, commands are without spaces, and the mentioned -h option does not work
    when I'm operating on armStoneA5.
    Can you provide a documentation for the ubi tools you use on armStoneA5 or
    give me the sequence of commands I have to use for replacing the root filesystem?
    What did I do wrong with the ubi info layout command?

  • Well, the first step you have to do of course. You have to tell U-Boot which MTD partition to use for UBI. So the command


    Code
    1. ubi part TargetFS


    is still required. Then you can issue the other commands that you mentioned.


    The link that you are referring to is for the UBI user space tools in Linux itself, not for any U-Boot commands. For a list of available commands in U-Boot simply type "help". If you want to have more detailed info about a specific command, type "help <command>". If you still need more info, you can extract the U-Boot source code and look into the documentation subdirectory.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.