alis icon indicating copy to clipboard operation
alis copied to clipboard

auto detect boot device not working - throws an error

Open fseatonuc opened this issue 3 years ago • 5 comments

We have a machine that detects the USB boot media as /dev/sda1 and the internal drive as /dev/nvme0n1 so we tried using 'DEVICE="auto"' and your new code for supporting that isn't working. Throws the following error:

alis.sh: line 97: MOUNTPOINT: command not found

I'm working remotely so I didn't get to debug the issue further.

fseatonuc avatar Mar 25 '22 22:03 fseatonuc

Can you post these lsblk commands output?

lsblk lsblk -oMOUNTPOINT,PKNAME -P -M

picodotdev avatar Mar 25 '22 22:03 picodotdev

Note - the system is up an running (i.e., these are not the output from the boot prompt on the installer disk.). Let me know if you need me to boot from that and repeat the commands.

# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    1  15.1G  0 disk 
├─sda1        8:1    1   776M  0 part 
└─sda2        8:2    1    74M  0 part 
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   511M  0 part /boot
└─nvme0n1p2 259:2    0   238G  0 part 
  └─vg-root 254:0    0   238G  0 lvm  /

# lsblk -oMOUNTPOINT,PKNAME -P -M
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="" PKNAME="sda"
MOUNTPOINT="" PKNAME="sda"
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="/boot" PKNAME="nvme0n1"
MOUNTPOINT="" PKNAME="nvme0n1"
MOUNTPOINT="/" PKNAME="nvme0n1p2"

fseatonuc avatar Mar 28 '22 14:03 fseatonuc

Yes, please, provide the commands output from the boot prompt on the installer disk.

picodotdev avatar Mar 28 '22 17:03 picodotdev

Output from booting from the installer disk:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0 701.3M  1 loop /run/archiso/airootfs
sda           8:0    1  15.1G  0 disk 
├─sda1        8:1    1   776M  0 part /run/archiso/bootmnt
└─sda2        8:2    1    74M  0 part 
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   511M  0 part 
└─nvme0n1p2 259:2    0   238G  0 part 
  └─vg-root 254:0    0   238G  0 lvm  

MOUNTPOINT="/run/archiso/airootfs" PKNAME=""
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="/run/archiso/bootmnt" PKNAME="sda"
MOUNTPOINT="" PKNAME="sda"
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="" PKNAME=""
MOUNTPOINT="" PKNAME="nvme0n1"
MOUNTPOINT="" PKNAME="nvme0n1"
MOUNTPOINT="" PKNAME="nvme0n1p2"

fseatonuc avatar Mar 30 '22 14:03 fseatonuc

Thanks for the feedback.

I tested a small script with your output and the command was working for me. But anyway I changed the command to do this task, maybe now works for you, if not comment me again please.

https://github.com/picodotdev/alis/commit/63575c4f1824c360dbf60aafaaec17401ea604bd

picodotdev avatar Mar 30 '22 17:03 picodotdev