Can not boot from logical partition

Post here if you are a new Porteus member and you're looking for some help.
burdi01
Shogun
Shogun
Posts: 206
Joined: 18 Aug 2013, 12:09
Distribution: Slackware PartedMagic Xubuntu
Location: The Netherlands

Can not boot from logical partition

Post#16 by burdi01 » 26 Mar 2024, 10:13

(hd0,3) in grub means sda4 in linux
It did so with the legacy Grub.
With the current Grub2 (hdX,3) means the 3rd partition on the drive.
It should be noted that the drive Linux regards as sda (or nvme0n1) may not always be (hd0) -- I have seen cases in which it was (hd5).

Take for instance the following snip from my grub.cfg:

Code: Select all

regexp --set=hdX '^(.*),' $root
menuentry 'Slackware 15.0 Current' {
   set root=($hdX,7)
   linux /boot/vmlinuz root=/dev/nvme0n1p7 ro pci=noaer
   initrd /boot/initrd.gz
}
which boots my Slackware64 Current from the 7th partition of the drive which happens to be nvme0n1p7 here but might have been sda7, sdb7 etc elsewhere.
Actually this is an MBR/BIOS drive so nvme0n1p7 is the 3rd logical partition.
:D

Edit 28 Mar, 2024: Redacted this post for better understandability.

Post Reply