Can not boot from logical partition

Post here if you are a new Porteus member and you're looking for some help.
aracandrade
White ninja
White ninja
Posts: 5
Joined: 29 May 2018, 14:48
Distribution: Porteus Mate v4.0

Can not boot from logical partition

Post#1 by aracandrade » 27 Dec 2021, 22:48

I have a external HD driver patitioned with 5 partitions. Three of them are phisical (sda1 20Gb for Linux Mint, sda2 5Gb for Swap, sda3 20Gb for Porteus and Puppy frugal installs). The other 2 are extended logical (sda5 200Gb for music library and sda6 200Gb for photos and videos)
I use grub2 for boot manager. For this matter the menuentries for Porteus and Puppy are:

Code: Select all

       menuentry "Porteus LXDE (hd0,3)" {
                                   set root='(hd0,3)'
                                   search -f /PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz --set=root
                                   echo "Porteus bootloader is: "$root
                                   linux /PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz from=UUID:6239b501-2c0f-48db-8b74-ad649de313fd/PorteusLinux/PorteusV5-LXDE changes=UUID:6239b501-2c0f-48db-8b74-ad649de313fd/PorteusLinux/PorteusV5-LXDE/ login=root
                                   initrd /PorteusLinux/PorteusV5-LXDE/boot/syslinux/initrd.xz
                               }

        menuentry "FossaPup64-Musica (hd0,3) " {
                                   set root='(hd0,3)'
                                   search -f /FossaPup64-Musica/PorteusV5-LXDE/boot/syslinux/vmlinuz --set=root
                                   echo "FossaPup64-Musica bootloader is: "$root
                                   linux /FossaPup64-Musica/vmlinuz pmedia=atahd psubdir=/FossaPup64-Musica/ pfix=fsck nousbwait=5
                                   initrd /FossaPup64-Musica/initrd.gz
                                }
The above entries works perfectly.
As 20Gb turned small for all Porteus and Puppies installs I tried to change those installs to sda5 without success. The same error occurs in both Porteus and Puppy. Even Nemesis couldn't start.
Image
Can anyone point me to the right direction? (Apologies for the bad english, it's not my language)

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#2 by Ed_P » 28 Dec 2021, 05:51

Hello aracandrade. Welcome to Porteus.

Your Porteus grub2 menu is confusing. First you set root to (hd0,3), then you set root to the drive PorteusV5's vmlinuz file is on, then you tell PorteusV5's vmlinuz the UUID of the drive to boot Porteus from.

There is no need to set the root to a drive if you're going to use grub2's search to find the drive.

And the UUID of the drive must match the drive found in the search. Unless you updated the menu's UUID when you changed to the sda5 drive I suspect that is your PorteusV5 problem.

I have no idea about the Puppy problem.
Ed

burdi01
Shogun
Shogun
Posts: 201
Joined: 18 Aug 2013, 12:09
Distribution: Slackware PartedMagic Xubuntu
Location: The Netherlands

Can not boot from logical partition

Post#3 by burdi01 » 28 Dec 2021, 11:07

My grub.cfg:

Code: Select all

set default=0
#set timeout=10
set menu_color_normal=light-gray/blue
set menu_color_highlight=blue/light-gray

menuentry 'Porteus' {
  set iso=/Porteus-XFCE-v4.0-x86_64.iso
  set boot-parms="volume=33 reboot=cold $extramods "
  search -f $iso --set=root
  loopback loop $iso
  linux (loop)/boot/syslinux/vmlinuz from=$iso $boot_parms \
    changes=/porteussave.dat  # xfs
  initrd (loop)/boot/syslinux/initrd.xz
}

menuentry 'Linux "Z"' {
  set root=(hd1,7)
  linux /boot/vmlinuz root=/dev/sda7 ro
  initrd /boot/initrd.gz
}

menuentry 'Chainloader' {
  set root=(hd1)
  chainloader +1
}
:D

raja
Shogun
Shogun
Posts: 434
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

Can not boot from logical partition

Post#4 by raja » 28 Dec 2021, 11:46

ara*,

copy initrd and vmlinuz to boot folder in(grub)hd0,msdos1

Since folder name is specified as porteus ,in 'initrd',rename it.(base,modules,optional,rootcopy,*.cfg,shall be within this 'porteus' folder.)

modify menuentry,

menuentry "Porteus-5.0" {
set gfxpayload=keep
search --set=root --fs-uuid <disk id>
linux (hd0,msdos1)/boot/vmlinuz
initrd (hd0,msdos1)/boot/initrd.xz
}

*note:to confirm whether grub identifies disk partition as 0,or msdos, press 'e' and then 'ls'.correct menu entry if it is '0'.

same for puppy
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit

aracandrade
White ninja
White ninja
Posts: 5
Joined: 29 May 2018, 14:48
Distribution: Porteus Mate v4.0

Can not boot from logical partition

Post#5 by aracandrade » 28 Dec 2021, 16:28

Thanks very much for fast answers.
Ed_P, I use Porteus since 2016, never could boot up without the cheatcodes from: and changes:
Following your guideline, I changed the menuentries to

Code: Select all

       menuentry "Porteus forum question in sda3" {
                                   set gfxpayload=keep
                                   search --set=root --fs-uuid 6239b501-2c0f-48db-8b74-ad649de313fd
                                   echo "Porteus bootloader is: "$root
                                   linux (hd0,3)/PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz from=UUID:6239b501-2c0f-48db-8b74-ad649de313fd/PorteusLinux/PorteusV5-LXDE changes=UUID:6239b501-2c0f-48db-8b74-ad649de313fd/PorteusLinux/PorteusV5-LXDE/ login=root
                                   initrd (hd0,3)/PorteusLinux/PorteusV5-LXDE/boot/syslinux/initrd.xz
                                 }

       menuentry "Porteus forum question in sda5" {
                                   set gfxpayload=keep
                                   search --set=root --fs-uuid 06dd31be-8281-4ae6-8e4c-d3282d37a44b
                                   echo "Porteus bootloader is: "$root
                                   linux (hd0,5)/PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz from=UUID:06dd31be-8281-4ae6-8e4c-d3282d37a44b/PorteusLinux/PorteusV5-LXDE changes=UUID:06dd31be-8281-4ae6-8e4c-d3282d37a44b/PorteusLinux/PorteusV5-LXDE/ login=root
                                   initrd (hd0,5)/PorteusLinux/PorteusV5-LXDE/boot/syslinux/initrd.xz
                                 }
The entry with sda3 worked, with sda5 didn't. Same answer: "vmlinuz not found."
burdi01 I do not use boot from iso image, but your menuentry looks very clean.

raja Porteus (and Puppy) boots in any primary partition, but not in extened partition. Maybe some BIOS limitation?

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#6 by Ed_P » 28 Dec 2021, 17:43

Try this aracandrade.

Code: Select all

menuentry "Porteus drive" {
                            search -f /PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz --set=root
                            if [ $? = 0 ]; then
                                echo "root drive: "$root
                                probe -u $root --set=rootuuid
                                echo "UUID: "$rootuuid
                                echo " "
                                echo " "
                                sleep -i -v 30 ; echo
                            else
                                echo "----------------------------------------"
                                echo " "
                                echo "No vmlinuz drive found."
                                echo " "
                                ls ; echo
                                sleep -i -v 10 ; echo
                            fi
                 }
Especially after you move the vmlinuz file to sda5.

Adjust spacing to fit your cfg file. :D

Added in 11 minutes 53 seconds:
aracandrade wrote:
28 Dec 2021, 16:28
burdi01 I do not use boot from iso image, but your menuentry looks very clean.
Yes, nice coding burdi01. :)
Ed

aracandrade
White ninja
White ninja
Posts: 5
Joined: 29 May 2018, 14:48
Distribution: Porteus Mate v4.0

Can not boot from logical partition

Post#7 by aracandrade » 28 Dec 2021, 21:05

Ed_P, copied all Porteus stuf to sda5 with other name
https://imgur.com/a/AAvXZJl
Your script resulted
https://imgur.com/a/zpwab1V
with search for sda5 resulted
https://imgur.com/a/EdTfRhl

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#8 by Ed_P » 28 Dec 2021, 23:05

Interesting. (hd0,msdos5) does show. Was there a (hd0,msdos4) too?

So, if you have checked, and rechecked, the spelling of the file's path on the sda5 drive with the menu's search name it appears you have confirmed that grub2 doesn't work with logical drives on your machine. :(
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

Can not boot from logical partition

Post#9 by beny » 28 Dec 2021, 23:36

hi Ed_P you remember this one:
from=/dev/device
from=/path/folder
from=/path/porteus.iso
a lot of time ago i have used a lot of directory with slax and slax remix inside one hard disk i think we can boot from a directory inside a logical partition,or am i wrong, the full porteus or nemesis is inside the directory that you have to link to grub or syslinux

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#10 by Ed_P » 29 Dec 2021, 00:02

All I know at this point beny is aracandrade's grub2 isn't finding the boot file on the logical partition. Whether it's a grub2 problem or a typo I don't know for sure.

aracandrade can you post the screen when you execute this command from Porteus?

ls /mnt/sda5/PorteusLinux/PorteusV5-LXDE-new/boot/syslinux/vm*

(or whatever the name of the file's directory is on sda5)

Added in 2 hours 19 minutes 52 seconds:
A response from my grub2 expert:
grub2Win's Drummer wrote:Grub2 can certainly search logical partitions and load kernels from them for boot.
I doubt you can actually boot a logical drive. No MBR as far as I know.
:good:
Ed

aracandrade
White ninja
White ninja
Posts: 5
Joined: 29 May 2018, 14:48
Distribution: Porteus Mate v4.0

Can not boot from logical partition

Post#11 by aracandrade » 29 Dec 2021, 02:52

Ed, my HD is a external drive that I use in others computers. I don't use sdX in menuentries because the X letter can vary. I use (hd0,n) refering to nth partition of the disk being booted
.
In my case, the ls command looks like this:
ls /mnt/sdc5/PorteusLinux/PorteusV5-LXDE-new/boot/syslinux/vm*
an results in:
/mnt/sdc5/PorteusLinux/PorteusV5-LXDE-new/boot/syslinux/vmlinuz

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#12 by Ed_P » 29 Dec 2021, 05:23

Try the ls command in grub2. And tweak the sdc5 to sda5 and if that fails try other drive numbers. Since the grub2 search can't find the file it would be nice to see if it can be found manually.

What's the drive's format?
aracandrade wrote:
29 Dec 2021, 02:52
I don't use sdX in menuentries because the X letter can vary.
Understood. It's why I always use searches or UUIDs.
Ed

aracandrade
White ninja
White ninja
Posts: 5
Joined: 29 May 2018, 14:48
Distribution: Porteus Mate v4.0

Can not boot from logical partition

Post#13 by aracandrade » 30 Dec 2021, 14:14

Ed, tried all combinations with same results. I finally gave up. I formatted the hd with 4 physical partitions and everything works perfectly. Thank you very much for the kind help.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Can not boot from logical partition

Post#14 by Ed_P » 30 Dec 2021, 15:58

Interesting. :hmmm: Thanks for the update aracandrade. :beer:
Ed

Ghostfromthepast
Ronin
Ronin
Posts: 1
Joined: 25 Mar 2024, 23:34
Distribution: Porteus 5

Can not boot from logical partition

Post#15 by Ghostfromthepast » 26 Mar 2024, 00:02

Just for knowledge, (hd0,3) in grub means sda4 in linux (no.0 in windows aka diskpart utility), aka the conteiner of extended partitions in mbr disk/partition scheme, first logical partition = sda5 in linux or (hd0,4) in grub. Checked with similar porteus install on extended partition sda5 by trial and error - grub didn't boot from "root(hd0,3)", but did from "root(hd0,4)".
So, "linux (hd0,3)/PorteusLinux/PorteusV5-LXDE/boot/syslinux/vmlinuz" won't boot never on mbr disk as such.
Regards.

Post Reply