* Re: ENV
[not found] ` <CAC3g_BGjw58QYiEbTEqrZtm-qZ78ireKAk_2yWArYWkd4VoDJQ@mail.gmail.com>
@ 2026-05-18 10:58 ` Ahmad Fatoum
0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-05-18 10:58 UTC (permalink / raw)
To: Mark Diener; +Cc: barebox
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 |
^ permalink raw reply [flat|nested] 3+ messages in thread