View previous topic :: View next topic |
Author |
Message |
apiaio Guru
Joined: 04 Dec 2008 Posts: 426
|
Posted: Wed Mar 13, 2024 5:08 pm Post subject: How to find partition number hd(x,y) |
|
|
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 |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Sun Mar 17, 2024 9:33 am Post subject: |
|
|
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 |
|
|
e8root Tux's lil' helper
Joined: 09 Feb 2024 Posts: 94
|
Posted: Sun Mar 17, 2024 11:42 am Post subject: |
|
|
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 |
|
|
|