help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pass env set in grub2 to fstab or systemd


From: Andrei Borzenkov
Subject: Re: pass env set in grub2 to fstab or systemd
Date: Sun, 12 Feb 2017 10:21:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

12.02.2017 03:53, Peter Holm пишет:
> At commandline I can do this to mount a volume (in this case a 
> btrfs-subvolume).
> 
> curSystem=lubuntu
> mount -t btrfs -o subvol=sysroot/${curSystem}-mountpoints/users/root
> -L multisys /xyz
> 
> which mounts sysroot/lubuntu-mountpoints/users/root at /xyz
> 
>     Is it possible to perform some similar with set the env from grub2
> to be used within fstab.?
> 
>     If not, Is it possible to set env in grub2 and get a custom
> systemd-script to read that.?

You can pass data from grub to booted system using either kernel command
line or grub environment block. In both cases you have access to this
information when system is booted and can do whatever you want with it.

>     Other suggestions is welcome as well.
> 
> If any custom-mounts.sh is the only alternative, could that be called
> as early as systemd.mount is executed.?
>

This is question for systemd list, but yes, you can create generator
that reads this information and adds drop-ins for your mount points that
set environment variable with value obtained from grub.

> 
> This mail is an exact copy of my question at
> http://unix.stackexchange.com/questions/344132/pass-env-set-in-grub2-to-fstab-or-systemd
> 
> I assume I should been asking here in the first place.
> 
> /Peter Holm
> 
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]