Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to find partition number hd(x,y)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Wed Mar 13, 2024 5:08 pm    Post subject: How to find partition number hd(x,y) Reply with quote

Playing with grub I need to find correct partition number for /dev/sda3
My devs are:
/dev/nvme0n1
/dev/sda
/dev/sdb

Edit: I have found solution. I was confused with the new /dev/nvme0n1
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Mar 17, 2024 9:33 am    Post subject: Reply with quote

grub offers 'search' to determine device names by UUID, file, etc.

https://www.gnu.org/software/grub/manual/grub/grub.html#search

if you have many devices/partitions, search can be slow, in that case add --hint with the most likely device name

hardcoding device names can work in grub, but it can also break if your boot configuration changes, so using search is more reliable
Back to top
View user's profile Send private message
e8root
n00b
n00b


Joined: 09 Feb 2024
Posts: 69

PostPosted: Sun Mar 17, 2024 11:42 am    Post subject: Reply with quote

In my experience SCSI devices as in /dev/sdX always worked fairly reliably unless I swapped physical connection on motherboard.

For NVMe devices on the other hand numbers would change from boot to boot and UUID was the only way to not have to go in to recovery and edit /etc/fstab.

Might not be the behavior with single NVMe drive or on other motherboards.
Both UUID and PARTUUID can be determined by running blkid.
I remember at first I used PARTUUID in /etc/fstab but it was adding considerable delay at boot to figure out all the partition UUIDs which does not seem to be the case normal UUID (at least its so fast it cannot be notices on my system). Just a hint.
_________________
Unix Wars - Episode V: AT&T Strikes Back
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum