grub2 menu entry

Non release banter
benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#76 by benjibasson » 14 Oct 2022, 10:58

Hi
How can I manage 40_custom grub to add an entry to load this another page?
/home/benjamin/Porteus/boot/syslinux/porteus.cfg

cheers

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

grub2 menu entry

Post#77 by Ed_P » 14 Oct 2022, 16:16

benjibasson wrote:
14 Oct 2022, 10:58
How can I manage 40_custom grub to add an entry to load this another page?
Not necessary, Porteus should find it when booting on the root drive.
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#78 by benjibasson » 18 Oct 2022, 20:30

Hi,

I have modified 40_customto write

Code: Select all

menuentry "porteus  on sda6 xfce"{
root (hd0,5)
kernel /home/benjamin/Porteus/boot/syslinux/vmlinuz from=/home/benjamin/Porteus>
initrd /home/benjamin/Porteus/64bit_v30/boot/syslinux/initrd.xz
boot
}
it display porteus. unfortunaly it print

Code: Select all

Démarrage d'une liste de commandes
erreur : impossible de trouver la commande & root w.
erreur : impossible de trouver la commande kernel ». erreur
: le noyau doit d'abord étre chargé. erreur : le noyau doit d'abord être charge.
Appuyez sur une touche pour continuer

Code: Select all

error: cannot find command & root w.
error: cannot find kernel command". mistake
: the kernel must be loaded first. error: kernel must be loaded first.
Press any key to continue
replace

Code: Select all

root (hd0,5)
by

Code: Select all

search -f "/home/benjamin/Porteus/boot/syslinux/vmlinuz" --set=root
doesn't change anything

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

grub2 menu entry

Post#79 by Ed_P » 18 Oct 2022, 21:04

kernel needs to be linux with grub2.

This is what I use to boot my USB drive's Porteus install:

Code: Select all

menuentry " Porteus 5.0 USB - AF'" --class slackware   --class icon-porteus  {

     set porteus_parms="volume=33 reboot=cold extramod=/Modules"  #;cinnamon" # changes=EXIT:/changes/porteussave.dat"

     set bootdrv=$root
     search -f /boot/syslinux/vmlinuz --set=root
     if [ $root != $bootdrv ]; then
        linux  /boot/syslinux/vmlinuz $porteus_parms
        initrd /boot/syslinux/initrd.xz
     else
        echo "----------------------------------------"
        echo USB drive NOT found.
        echo
        sleep -v -i 10
     fi
     set root=$bootdrv
     }
 
Obviously change the /boot/syslinux/ paths to match your /home/benjamin/Porteus/boot/syslinux/ paths.

Added in 14 minutes 25 seconds:
And it might help if you post the output of this command:

Code: Select all

ls -ohr /home/benjamin/Porteus/*
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#80 by benjibasson » 19 Oct 2022, 07:17

Hi

I have change Kernel to Linux on my previous quoted 40_custom. unfortunaly I get the kernel panic

Code: Select all

2.331577] Kernel panic - not syncing: UFS: Unable to mount root is on unkno
n-block (0,0)
I 2.3319211 Kernel Offset: disabled
[ 2.3319751---[ end Kernel panic not syncing: UFS: Unable to mount root is on unknown-block (8,8) ]---
FUJITSU
When I try your menu entry by changing /boot/syslinux/vmlinuz to match with /home/benjamin/Porteus/boot/syslinux/vmlinuz I get

Code: Select all

erreur : no such device: /home/benjamin/Porteus/boot/syslinux/.
USB
drive
NOT found.

here is my ls -ohr /home/benjamin/Porteus/*

Code: Select all

ls -ohr /home/benjamin/Porteus/*
-rw-rw-r-- 1 benjamin 1,5K nov.  17  2019 /home/benjamin/Porteus/USB_INSTALLATION.txt

/home/benjamin/Porteus/porteus:
total 24K
drwxrwxr-x 2 benjamin 4,0K nov.  17  2019 rootcopy
-rw-rw-r-- 1 benjamin  681 nov.  17  2019 porteus-v5.0-x86_64.cfg
drwxrwxr-x 2 benjamin 4,0K nov.  17  2019 optional
drwxrwxr-x 2 benjamin 4,0K juil. 14  2020 modules
-rw-rw-r-- 1 benjamin 1015 nov.  17  2019 make_iso.sh
drwxrwxr-x 2 benjamin 4,0K juil.  3 02:55 base

/home/benjamin/Porteus/EFI:
total 4,0K
drwxrwxr-x 2 benjamin 4,0K juin  17 06:32 boot

/home/benjamin/Porteus/change:
total 0

/home/benjamin/Porteus/boot:
total 576K
drwxrwxr-x 2 benjamin 4,0K juil.  2 14:41 syslinux
-rw-rw-r-- 1 benjamin 189K mai    8 07:49 Porteus-installer-for-Windows.exe
-rw-rw-r-- 1 benjamin 376K mai    9 10:52 Porteus-installer-for-Linux.com
drwxrwxr-x 2 benjamin 4,0K juin  14  2021 docs
cheers

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

grub2 menu entry

Post#81 by Ed_P » 19 Oct 2022, 17:41

benjibasson wrote:
19 Oct 2022, 07:17
When I try your menu entry by changing /boot/syslinux/vmlinuz to match with /home/benjamin/Porteus/boot/syslinux/vmlinuz I get

Code: Select all

erreur : no such device: /home/benjamin/Porteus/boot/syslinux/.
USB
drive
NOT found.
Interesting that the error says:

Code: Select all

erreur : no such device: /home/benjamin/Porteus/boot/syslinux/.
and not:

Code: Select all

erreur : no such device: /home/benjamin/Porteus/boot/syslinux/vmlinuz
.

Added in 5 minutes 23 seconds:
What does

Code: Select all

 ls -oh /mnt/sda6
show?

Added in 15 minutes 45 seconds:
benjibasson wrote:
13 Oct 2022, 20:13
How can I be launch Porteus on my internal drive with grub?
I'm a little confused. While the title of this thread refers to grub2 your question refers to grub and the kernel operand is definitely grub code and I believe so to is 40_custom. So are you booting grub legacy or grub2? :%)
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#82 by benjibasson » 19 Oct 2022, 20:18

Hi,

when I start my PC, it boot on grub 2.04.

ls -oh /mnt/sda6

Code: Select all

ls: impossible d'accéder à '/mnt/sda6': Aucun fichier ou dossier de ce type
in Fact the folder /mnt is empty because Ubuntu 22.04 doesn't use /mnt anymore for root device neither for /home
neither for external device's mount point

Here is my Gparted. Ubuntu and /home/benjamin/Porteus/boot/syslinux are on /dev/sda6's partitions.
Image

Cheers

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

grub2 menu entry

Post#83 by Ed_P » 19 Oct 2022, 23:19

Ok, how about the output of:

ls -oh /dev/sda6


Interesting to note that /dev/sda6 is ext4 format. Can you post your grub2 menu for Ubuntu?
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#84 by benjibasson » 20 Oct 2022, 06:12

Hi

ls -oh /dev/sda6 give

Code: Select all

brw-rw---- 1 root 8, 6 oct.  19 22:36 /dev/sda6
The grub2 entry for Ubuntu is

Code: Select all

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-86e04ac1-6ec3-4d07-b542-9742ef263395' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos6'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  86e04ac1-6ec3-4d07-b542-9742ef263395
	else
	  search --no-floppy --fs-uuid --set=root 86e04ac1-6ec3-4d07-b542-9742ef263395
	fi
	linux	/boot/vmlinuz-5.15.0-48-generic root=UUID=86e04ac1-6ec3-4d07-b542-9742ef263395 ro resume=UUID=f9217a70-5b5e-4be3-9988-9e39f4bec058 
	initrd	/boot/initrd.img-5.15.0-48-generic
}
cheers

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

grub2 menu entry

Post#85 by Ed_P » 20 Oct 2022, 06:40

Oops, I meant to say:

ls -oh /dev/sda6/*

In that /dev/sda6 on your GParted image shows as ext4 I'm surprised to see:

insmod part_msdos
insmod ext2

in your Ubuntu menu.
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#86 by benjibasson » 20 Oct 2022, 20:08

ls -oh /dev/sda6/* say that /dev/sda6* is not a folder

Code: Select all

ls: impossible d'accéder à '/dev/sda6/*': N'est pas un dossier
I don't know about insmod part_msdos insmod ext2: it was set up like that as soon as I installed Ubuntu on new ext 4 partition /dev/sda6

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

grub2 menu entry

Post#87 by Ed_P » 20 Oct 2022, 21:23

benjibasson wrote:
20 Oct 2022, 20:08
ls -oh /dev/sda6/* say that /dev/sda6* is not a folder
Good grief! :shock:

This is what I see for my sda1 drive and was hoping to see with your sda6 drive.

Code: Select all

guest@porteus:~$ ls -oh /mnt/sda1
total 208K
-rwxrwxrwx  1 guest 4.5K Sep  9 23:59 BOOTEX.LOG*
drwxrwxrwx  4 guest  16K Sep 10 15:02 EFI/
drwxrwxrwx 13 guest  16K Sep  5 17:09 Guest/
-rwxrwxrwx  1 guest   61 Aug 13 15:09 If_Found.txt*
drwxrwxrwx  2 guest  16K Oct 20 12:51 Modules/
drwxrwxrwx  4 guest  16K Aug 13 19:41 My_Files/
drwxrwxrwx  2 guest  16K Aug 26 13:17 Optional/
drwxrwxrwx  2 guest  16K Aug  6 17:09 System\ Volume\ Information/
-rwxrwxrwx  1 guest 1.5K Aug  6 02:21 USB_INSTALLATION.txt*
drwxrwxrwx  6 guest  16K Oct 20 15:42 boot/
drwxrwxrwx  2 guest  16K Aug 14 00:14 changes/
drwxrwxrwx  6 guest  16K Aug 20 10:09 porteus/
-rwxrwxrwx  1 guest 6.0K Oct 20 16:31 porteus-usb.sh*
guest@porteus:~$ 
Ed

benjibasson
Samurai
Samurai
Posts: 160
Joined: 06 Mar 2019, 15:14
Distribution: Arch linux

grub2 menu entry

Post#88 by benjibasson » 21 Oct 2022, 06:04

OK

This morning I have boot on any live CD of porteus

ls -oh /mnt/sda6 give me

Code: Select all

guest@porteus:~$ ls -oh /mnt/sda6
total 92K
lrwxrwxrwx   1 root     7 Mar 11  2022 bin -> usr/bin/
drwxr-xr-x   4 root  4.0K Oct 13 20:38 boot/
drwxrwxr-x   2 root  4.0K Mar 11  2022 cdrom/
drwxr-xr-x   4 root  4.0K Oct 12  2021 dev/
drwxr-xr-x 145 root   12K Sep 30 19:34 etc/
drwxr-xr-x   3 root  4.0K Mar 11  2022 home/
lrwxrwxrwx   1 root     7 Mar 11  2022 lib -> usr/lib/
lrwxrwxrwx   1 root     9 Mar 11  2022 lib32 -> usr/lib32/
lrwxrwxrwx   1 root     9 Mar 11  2022 lib64 -> usr/lib64/
lrwxrwxrwx   1 root    10 Mar 11  2022 libx32 -> usr/libx32/
drwx------   2 root   16K Mar 11  2022 lost+found/
drwxr-xr-x   3 root  4.0K Apr 13  2022 media/
drwxr-xr-x   2 root  4.0K Oct 12  2021 mnt/
drwxrwxr-x   5 guest 4.0K Jun  9 21:22 opt/
drwxr-xr-x   2 root  4.0K Oct 11  2021 proc/
drwx------   8 root  4.0K Apr 26 20:15 root/
drwxr-xr-x  12 root  4.0K Mar 11  2022 run/
lrwxrwxrwx   1 root     8 Mar 11  2022 sbin -> usr/sbin/
drwxr-xr-x   9 root  4.0K Apr 26 20:15 snap/
drwxr-xr-x   2 root  4.0K Oct 12  2021 srv/
drwxr-xr-x   2 root  4.0K Oct 11  2021 sys/
drwxrwxrwt  28 root  4.0K Oct 20 20:32 tmp/
drwxr-xr-x  14 root  4.0K Jun  3 19:25 usr/
drwxr-xr-x  14 root  4.0K Oct 12  2021 var/


Cheers

Post Reply