[PATCH fstools v2] partname: Ignore root=PARTUUID...

Christian Marangi ansuelsmth at gmail.com
Mon Jan 9 13:53:46 PST 2023


On Fri, Jan 06, 2023 at 06:04:22PM -0800, Brian Norris wrote:
> We're assuming all root= arguments are /dev/ paths, but many targets
> utilize root=PARTUUID=<xxx> strategies. At least allow them to fall back
> to scanning all block devices.
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

Can you elaborate this a bit more? This is dependent of the google based
devices with ipq806x but why?

In theory we should have other device with sd card/eMMC that use uuid to
select the partition... Also can't we just ignore the device bootargs
and provide a custom one?

> ---
> 
> Changes in v2:
>  * fstools, not fsutils (sorry for the noise)
> 
>  libfstools/partname.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libfstools/partname.c b/libfstools/partname.c
> index f59c52eb8f3c..9c27015643ad 100644
> --- a/libfstools/partname.c
> +++ b/libfstools/partname.c
> @@ -128,12 +128,12 @@ static struct volume *partname_volume_find(char *name)
>  			return NULL;
>  	}
>  
> -	if (get_var_from_file("/proc/cmdline", "root", rootparam, sizeof(rootparam))) {
> +	if (get_var_from_file("/proc/cmdline", "root", rootparam, sizeof(rootparam)) && rootparam[0] == '/') {
>  		rootdev = rootdevname(rootparam);
>  		/* find partition on same device as rootfs */
>  		snprintf(ueventgstr, sizeof(ueventgstr), "%s/%s/*/uevent", block_dir_name, rootdev);
>  	} else {
> -		/* no 'root=' kernel cmdline parameter, find on any block device */
> +		/* no useful 'root=' kernel cmdline parameter, find on any block device */
>  		snprintf(ueventgstr, sizeof(ueventgstr), "%s/*/uevent", block_dir_name);
>  	}
>  
> -- 
> 2.39.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

-- 
	Ansuel



More information about the openwrt-devel mailing list