cilynx / Candyhouse-Linux

Linux kernel for Cisco/Linksys Candyhouse routers
Apache License 2.0
16 stars 10 forks source link

How to pass the location of rootfs to U-boot via a volume-label #14

Open osunax opened 8 years ago

osunax commented 8 years ago

Hi there,

I believe the location of rootfs is being passed to U-boot using the device name (/dev/sda1). Right? Is it possible to pass this location using a volume-label instead?

Background: with more than one USB device plugged in, the device naming could change, so /dev/sda1 could eventually get assigned to a different (non-rootfs) partition on another plugged device, and the router won't boot... if U-boot is instead told to look for rootfs under a partition with a specific volume-label, then the device naming becomes irrelevant, and the rootfs partition will still be found... e.g. it could be /dev/sdc1, instead of /dev/sda1.

Note: The volume-label of a partition can be easily set by means of tune2fs -L.

Any thoughts?

Thanks!