two linux grub menu

Post here if you are a new Porteus member and you're looking for some help.
Farid
Black ninja
Black ninja
Posts: 32
Joined: 21 Apr 2022, 20:11
Distribution: Porteus 5.0

two linux grub menu

Post#1 by Farid » 11 Jan 2023, 15:35

i install a debian base linux in sda1 and bootloader
and now i install porteus 5.0 in sda7 but i dont install bootloader because i want debian bootloader
and now porteus isnt in boot menu
how i can add porteus in boot menu

i test grub customizer:
set root='(hd0,7)'
search --no-floppy --fs-uuid --set=root 153c0a05-0d38-4197-8a8f-000d40667feb
linux file:///media/farid/Porteus/boot/syslinux/vmlinuz root=UUID=153c0a05-0d38-4197-8a8f-000d40667feb
initrd file:///media/rahimi/Porteus/boot/syslinux/initrd.xz

but when start i give this error: invalid file name: file:///media/farid/Porteus/boot/syslinux/vmlinuz
you must load kernal first

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

two linux grub menu

Post#2 by Rava » 12 Jan 2023, 02:03

I do not know how "grub customizer" works.
Where do you get the paths "/media/farid/" from?
Is it how sda7 is mounted in your debian base linux when that's started from sda1?

I have two suggestions.
Try

Code: Select all

linux file:///media/sda7/Porteus/boot/syslinux/vmlinuz root=UUID=153c0a05-0d38-4197-8a8f-000d40667feb
when what you wrote was meant as one line
or try

Code: Select all

linux file:///mnt/sda7/Porteus/boot/syslinux/vmlinuz root=UUID=153c0a05-0d38-4197-8a8f-000d40667feb
Same with the initrd.

When that is not working, copy and rename the initrd and vmlinuz into something unique e.g. copy initrd.xz as initrd_porteus.xz and vmlinuz as vmlinuz_porteus

Copy both files into the same place on sda1 where your vmlinuz and initrd from debian base are sitting, where ever that might be.
Then use

Code: Select all

root='(hd0,1)'
but also use the cheatcodes from Porteus - specifically the UUID= one.
Look how the kernel parameter are given to the debian base kernel and copy the approach for your Porteus kernel.

How does your path to porteus/base looks like on sda7?
Is it just /mnt/sda7/porteus/base and /mnt/sda7/porteus/modules ?
Does /mnt/sda7/porteus/porteus-v5.0-x86_64.cfg exist?

If not, e.g. when your base folder looks like so
/mnt/sda7/Porteu5.0/
then you have to add some info into your grub menu.

And use the cheatcode for the UUID of

Code: Select all

APPEND initrd=initrd_porteus.xz from=UUID:153c0a05-0d38-4197-8a8f-000d40667feb
Cave! The "APPEND=" syntax is the one used in porteus.cfg to give additional instructions to the kernel.

Most likely your grub menu file will need another way of giving

Code: Select all

initrd=initrd_porteus.xz from=UUID:153c0a05-0d38-4197-8a8f-000d40667feb
to the kernel.

And Cave² - my above "APPEND=" line presumes you copied initrd.xz as initrd_porteus.xz to where the initrd from debian base are.
when debian base initrd and vmlinuz are not on the same place, 1st try to copy the Porteus initrd as "initrd_porteus.xz" into the same location where the debian base vmlinuz sits, and also copy the Porteus kernel into that place as vmlinuz_porteus

Make sure your setup via grub addresses the Porteus files the same way you renamed them (e.g. like I suggested: as initrd_porteus.xz and as vmlinuz_porteus)
Cheers!
Yours Rava

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

two linux grub menu

Post#3 by Ed_P » 12 Jan 2023, 06:23

Farid wrote:
11 Jan 2023, 15:35
set root='(hd0,7)'
search --no-floppy --fs-uuid --set=root 153c0a05-0d38-4197-8a8f-000d40667feb
linux file:///media/farid/Porteus/boot/syslinux/vmlinuz root=UUID=153c0a05-0d38-4197-8a8f-000d40667feb
initrd file:///media/rahimi/Porteus/boot/syslinux/initrd.xz
I would try:

Code: Select all

# set root='(hd0,7)'
search  --no-floppy   --fs-uuid   --set=root    153c0a05-0d38-4197-8a8f-000d40667feb
linux  /Porteus/boot/syslinux/vmlinuz root=UUID=153c0a05-0d38-4197-8a8f-000d40667feb
initrd /Porteus/boot/syslinux/initrd.xz
and make sure the UUID code is correct and the same on both lines.

-update-

Actually I would leave the vmlinuz root= parm off altogether. root is already set to that drive via the search command.

Code: Select all

# set root='(hd0,7)'
search  --no-floppy   --fs-uuid   --set=root    153c0a05-0d38-4197-8a8f-000d40667feb
linux  /Porteus/boot/syslinux/vmlinuz
initrd /Porteus/boot/syslinux/initrd.xz
Ed

Farid
Black ninja
Black ninja
Posts: 32
Joined: 21 Apr 2022, 20:11
Distribution: Porteus 5.0

two linux grub menu

Post#4 by Farid » 13 Jan 2023, 17:02

solved with this command in grub customizer: name:Porteus type:other

insmod part_msdos
insmod ext2
set root='hd0,7'
linux /boot/syslinux/vmlinuz login=guest changes=/porteus
initrd /boot/syslinux/initrd.xz

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

two linux grub menu

Post#5 by Ed_P » 13 Jan 2023, 21:54

:good: Good for you Farid. :)

I would still go witha search command rather than the set root one. That way the menu automatically works if you move Porteus to a different drive.

BTW The c:/grub2/grub.cfg file can be manually edited with a text editor, which allows you to make changes to it while in linux or Windows.
Ed

Post Reply