Page 1 of 2
Can not boot from logical partition
Posted: 27 Dec 2021, 22:48
by aracandrade
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.

Can anyone point me to the right direction? (Apologies for the bad english, it's not my language)
Can not boot from logical partition
Posted: 28 Dec 2021, 05:51
by Ed_P
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.
Can not boot from logical partition
Posted: 28 Dec 2021, 11:07
by burdi01
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
}

Can not boot from logical partition
Posted: 28 Dec 2021, 11:46
by raja
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
Can not boot from logical partition
Posted: 28 Dec 2021, 16:28
by aracandrade
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?
Can not boot from logical partition
Posted: 28 Dec 2021, 17:43
by Ed_P
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.
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.

Can not boot from logical partition
Posted: 28 Dec 2021, 21:05
by aracandrade
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
Can not boot from logical partition
Posted: 28 Dec 2021, 23:05
by Ed_P
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.

Can not boot from logical partition
Posted: 28 Dec 2021, 23:36
by beny
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
Can not boot from logical partition
Posted: 29 Dec 2021, 00:02
by Ed_P
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.

Can not boot from logical partition
Posted: 29 Dec 2021, 02:52
by aracandrade
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
Can not boot from logical partition
Posted: 29 Dec 2021, 05:23
by Ed_P
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.
Can not boot from logical partition
Posted: 30 Dec 2021, 14:14
by aracandrade
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.
Can not boot from logical partition
Posted: 30 Dec 2021, 15:58
by Ed_P
Interesting.

Thanks for the update
aracandrade.

Can not boot from logical partition
Posted: 26 Mar 2024, 00:02
by Ghostfromthepast
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.