Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVME issues - wrong partition names if nvme is used (missing p) #4

Open
jTd7bPLFb opened this issue Sep 16, 2024 · 7 comments
Open
Labels
bug Something isn't working

Comments

@jTd7bPLFb
Copy link

I tried to install using your script (thank you btw.) on an nvme device.

the exports for partitions are not usable for nvme

ls -la /dev/nvme*
nvme0n1 nvme0n1p1 nvme0n1p2 nvme0n1p3 nvme0n1p4

invocation "sh install /dev/nvme0n1"

the exports in your script
export INSTALL_DISK=$DISK
export INSTALL_EFI_DEV=$DISK""2
export INSTALL_SWAP_DEV=$DISK""3
export INSTALL_ZPOOL_DEV=$DISK""4
export INSTALL_ZPOOL=${INSTALL_ZPOOL:-rpool}

so basically, they become in this case
/dev/nvme0p1
/dev/nvme0p12
/dev/nvme0p13
/dev/nvme0p14

which is wrong, as it misses the p

I noticed this on mkswap command failing.
mkswap: can't open '/dev/nvme0n13': No such file or directory

maybe put a if/then in the install.sh script, and also a small echo for each of the variables?

@psy0rz
Copy link
Owner

psy0rz commented Sep 17, 2024

Yes this is indeed a problem.
I think there is a better way to determine device names from partition numbers, (sfdisk?)

Is there a reason why you dont use the image-method of installing?

@jTd7bPLFb
Copy link
Author

I tried once again with the image-install method.
Did not work for me.

  1. boot alpine iso
  2. setup-network, setup-dns, setup-ssh

using the simple install image method

localhost:~# sh image /dev/nvme0n1
ALPINEBOX: Getting latest stable version...
ALPINEBOX: Writing https://github.com/psy0rz/alpinebox/releases/latest/download/alpine.img.gz to disk /dev/nvme0n1 ...
Connecting to github.com (140.82.121.3:443)
Connecting to github.com (140.82.121.3:443)
Connecting to objects.githubusercontent.com (185.199.110.133:443)
writing to stdout

  •                100% |********************************|  467M  0:00:00 ETA
    

written to stdout
ALPINEBOX: All done, will reboot in 5 seconds..

after reboot, the machine hangs on
'Tearing down USB controller'

  1. so, I to using the other method, ,with the separate script, when using official alpine installer
  2. just added the p to the disk/device names, as mentioned, and installer working without issues.

So, to sum up, I used the Alpine iso, that is why I use the non image install method.
:)

@psy0rz
Copy link
Owner

psy0rz commented Sep 21, 2024

Thanks,

Are you sure it didn't just hang during the shutdown sequence? Did you try hard-resetting it to see if it would boot?

@jTd7bPLFb
Copy link
Author

Yes.

@psy0rz
Copy link
Owner

psy0rz commented Sep 21, 2024

Its hard to reproduce here. Could you make a screenshot/photo of it? I assume not since its already installed now :)

@jTd7bPLFb
Copy link
Author

which one? the issue is as stated at the beginning

if disk is sda
partitions sda1, sda2, sda3... and so on

export INSTALL_EFI_DEV=$DISK""2
export INSTALL_SWAP_DEV=$DISK""3
export INSTALL_ZPOOL_DEV=$DISK""4

but when nvme is used
partions are prepended with p
nvme0p1, nvme0p2 ... and so on

so basically I would just put something like
grep nvme $DISK
if true then just add p

export INSTALL_EFI_DEV=$DISK"p"2
export INSTALL_SWAP_DEV=$DISK"p"3
export INSTALL_ZPOOL_DEV=$DISK"p"4

@psy0rz
Copy link
Owner

psy0rz commented Sep 22, 2024

No i meant when you use the imaging method. Could you screenshot that at the point it fails?

@psy0rz psy0rz added the bug Something isn't working label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants