mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Mark Diener <markdiener10@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: ENV
Date: Mon, 18 May 2026 12:58:50 +0200	[thread overview]
Message-ID: <341bb5e6-2977-491b-9076-8d5bedf85c03@pengutronix.de> (raw)
In-Reply-To: <CAC3g_BGjw58QYiEbTEqrZtm-qZ78ireKAk_2yWArYWkd4VoDJQ@mail.gmail.com>

Hello,

On 5/18/26 12:50 PM, Mark Diener wrote:
> Hello Ahmad & Sascha:
> 
> I am able to boot bzImage, but I cannot get it past the root= error
> 
> My disk (USB, ssd, etc) is partitions with vfat32 (EFI/ESP) and ext4
> (rootfs)
> 
> My bootscript has:
> 
> global.autoboot_timeout=5
> global.bootm.verbose=1
> global.bootm.earlycon=1
> global.bootm.image="/mnt/disk0.1/boot/bzImage"
> global.bootm.boot_dev=PARTUUID=12345678-1234-1234-1234-123456789ABC

global linux.bootargs.yourroot="root=PARTUUID=12345678-1234-1234-1234-123456789ABC"

provided that's indeed a correct PARTUUID.

If you want to use global.bootm.boot_dev, set it to a barebox device path
(e.g. /dev/usbdisk0.1) and additionally enable global.bootm.appendroot=1,
so barebox dynamically determines the correct PARTUUID.

> global.linux.bootargs.myroot="console=tty0 earlyprintk rootfstype=ext4

Drop the first . as to use the global command which creates new variables.

global.x=y -> sets existing variable x to y
global x=y -> creates new variable x and sets it to y


Cheers,
Ahma

> rw rootwait"
> 
> Cannot seem to get past /dev/root: Can't open devblock error
> 
> PXL_20260518_100418240.jpg
> 
> Any guidance appreciated,
> 
> Mark
> 
> 
> Mark Diener
> LinkedIn <https://www.linkedin.com/in/markdiener/>
> 
> 
> On Mon, May 18, 2026 at 4:53 AM Ahmad Fatoum <a.fatoum@pengutronix.de
> <mailto:a.fatoum@pengutronix.de>> wrote:
> 
>     Hello Mark,
> 
>     On 5/14/26 11:53 PM, Mark Diener wrote:
>     > Is there better resources to detail how to properly understand the
>     > details behind /env/  (its creation and components)?
> 
>     What are you missing in the official documentation?
> 
>     > I cannot get the barebox.efi to actually execute the /env/bin/init
>     script.
> 
>     Scripts in /env/bin are added to PATH, so you can execute them by just
>     their name (instead of their full path), but they are not automatically
>     executed.
> 
>     If you want a script to be executed automatically at init time, add it
>     into /env/init/.
> 
>     > bareboxenv seems like a utility that would be involved.
> 
>     If you want to modify the script from Linux, yes. bareboxenv is also
>     used by barebox itself during the build process and can be used to bake
>     a built-in environment into barebox.
> 
>     That's the preferred way of shipping the default environment.
> 
>     What do you want to do in your init script?
> 
>     > Also, when I bootm my bzImage, it hangs up and seems to lose track of
>     > mounting the storage so it just stops processing.
> 
>     Hanging as in seeing a
> 
>       Kernel panic - not syncing: Attempted to kill init
> 
>     ?
> 
>     If so, you must have barebox add a root= option to inform the kernel
>     where it can find its rootfs.
> 
>     You can try it out manually using:
> 
>     global linux.bootargs.myroot="root=<insert your root device or PARTUUID,
>     ..etc. here>"
> 
>     > My barebox.efi is launching, but tripping on properly have the
>     > /env/bin/init directory established
> 
>     /env/bin/init is an optional init script you can provide. I just Cc'd
>     you on changes to the docs that make this clearer.
> 
>     Putting your init scripts in /env/init/ is what you are likely after.
> 
>     Cheers,
>     Ahmad
> 
>     >
>     > Any comments appreciated,
>     >
>     > Marco
>     >
>     >
> 
>     -- 
>     Pengutronix e.K.                  |                             |
>     Steuerwalder Str. 21              | http://www.pengutronix.de/
>     <http://www.pengutronix.de/>  |
>     31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
>     Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




      parent reply	other threads:[~2026-05-18 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14 21:53 ENV Mark Diener
2026-05-18  8:53 ` ENV Ahmad Fatoum
     [not found]   ` <CAC3g_BGjw58QYiEbTEqrZtm-qZ78ireKAk_2yWArYWkd4VoDJQ@mail.gmail.com>
2026-05-18 10:58     ` Ahmad Fatoum [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=341bb5e6-2977-491b-9076-8d5bedf85c03@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=markdiener10@gmail.com \
    /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