Skip to content

Commit 2189eeb

Browse files
committed
installer: Fix root_dev() for correct INVENTORY mounting
root_dev() function in the installer script checks for the root device in /dev/root, considering that this file will be always a symbolic link, which is not true for some platforms, such as in some NVIDIA devices, where /dev/root it's just a regular file block device. For these cases, INVENTORY partition will not be found and /persist/installer will be used instead. This commit fixes this issue by checking if /dev/root is a symbolic link or a file block device. Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
1 parent 135cbbf commit 2189eeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/installer/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ root_dev() {
9999
local MAJOR
100100
local MINOR
101101
local DEV
102-
if [ -L /dev/root ] ; then
102+
if [ -L /dev/root ] || [ -b /dev/root ] ; then
103103
DEV=$(readlink -f /dev/root)
104104
MAJOR=$(( 0x$(stat -c '%t' "$DEV") + 0 ))
105105
MINOR=$(( 0x$(stat -c '%T' "$DEV") + 0 ))

0 commit comments

Comments
 (0)