Pagina 1 di 1

Dual boot Porteus 5.0 con lxle configurazione Grub o Lilo

Inviato: gio 5 mag 2022, 0:43
da rudi78
Salve a tutti, come da titolo vi chiedo gentilmente aiuto per configurare un dual boot Porteus e Lxle, ho trovato qualcosa di simile in giro, ma nulla che fa al caso mio, se installo Lilo si avvia Porteus 5.0, cancellando Grub, viceversa se installo Grub si avvia Lxle ma non rileva Porteus. Porteus è installato su sda 7 Lxle su sda 5. Li vorrei tenere entrambe se possibile. Ho trovato alcune guide, ma non riesco bene a capire la sintassi da adottare nel modificare il file grub.cfg. Vi posto il mio file di configurazione di Grub, se poi volete aiutarmi a configurare Lilo per me va bene lo stesso.P.s. processore intel atom 1,8 ghz ram 2 gb hd 250 Gb Acer emachines, lo so non è il massimo, ma Porteus fa miracoli su questo pc e non me lo fa gettare in discarica, io sono dell'opinione che è un peccato gettare via i pc solo perché "vecchi" e poi ci sono affezionato... Grazie tante in anticipo... :thumbright:

Codice: Seleziona tutto

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
else
  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
else
  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
fi
insmod png
background_image -m stretch /etc/grub.d/backgrounds/grub.png
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=10
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
else
  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
fi
insmod png
if background_image /etc/grub.d/backgrounds/grub.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux_proxy ###

function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=1
	else
		set vt_handoff=
	fi
}
set linux_gfx_mode=auto
export linux_gfx_mode



menuentry "Ubuntu 18.04.6 LTS GNU/Linux" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0f430e53-453e-4e96-a923-1b4b6565b23b' {
	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,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
	else
	  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
	fi
        linux	/boot/vmlinuz-4.15.0-176-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-4.15.0-176-generic
}
### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/41_linux_proxy ###
submenu "Advanced options for Ubuntu 18.04.6 LTS GNU/Linux"{
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-176-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-176-generic-advanced-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		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,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-176-generic ...'
	        linux	/boot/vmlinuz-4.15.0-176-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-176-generic
}
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-176-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-176-generic-recovery-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-176-generic ...'
	        linux	/boot/vmlinuz-4.15.0-176-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-176-generic
}
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-175-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-175-generic-advanced-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		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,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-175-generic ...'
	        linux	/boot/vmlinuz-4.15.0-175-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-175-generic
}
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-175-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-175-generic-recovery-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-175-generic ...'
	        linux	/boot/vmlinuz-4.15.0-175-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-175-generic
}
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-60-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-60-generic-advanced-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		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,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-60-generic ...'
	        linux	/boot/vmlinuz-4.15.0-60-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-60-generic
}
menuentry "Ubuntu 18.04.6 LTS GNU/Linux, with Linux 4.15.0-60-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-60-generic-recovery-0f430e53-453e-4e96-a923-1b4b6565b23b' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
		else
		  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
		fi
		echo	'Loading Linux 4.15.0-60-generic ...'
	        linux	/boot/vmlinuz-4.15.0-60-generic root=UUID=0f430e53-453e-4e96-a923-1b4b6565b23b ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-60-generic
}
}
### END /etc/grub.d/41_linux_proxy ###

### BEGIN /etc/grub.d/42_linux_xen ###

### END /etc/grub.d/42_linux_xen ###

### BEGIN /etc/grub.d/43_memtest86+_proxy ###



### END /etc/grub.d/43_memtest86+_proxy ###

### BEGIN /etc/grub.d/44_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
 #


### END /etc/grub.d/44_custom ###

### BEGIN /etc/grub.d/45_memtest86+_proxy ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
	else
	  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
	fi
	knetbsd	/boot/memtest86+.elf
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  0f430e53-453e-4e96-a923-1b4b6565b23b
	else
	  search --no-floppy --fs-uuid --set=root 0f430e53-453e-4e96-a923-1b4b6565b23b
	fi
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/45_memtest86+_proxy ###

### BEGIN /etc/grub.d/46_os-prober ###
### END /etc/grub.d/46_os-prober ###

### BEGIN /etc/grub.d/47_uefi-firmware ###
### END /etc/grub.d/47_uefi-firmware ###

### BEGIN /etc/grub.d/48_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/48_custom ###

Re: Dual boot Porteus 5.0 con lxle configurazione Grub o Lilo

Inviato: ven 6 mag 2022, 13:41
da rik70
Ma hai Ubuntu su quel sistema?

Re: Dual boot Porteus 5.0 con lxle configurazione Grub o Lilo

Inviato: lun 16 mag 2022, 10:23
da rudi78
Si, grazie per la risposta e scusa il ritardo. Ho ubuntu, ma non lubuntu, lxle è una distro a se...

Re: Dual boot Porteus 5.0 con lxle configurazione Grub o Lilo

Inviato: mer 18 mag 2022, 7:38
da rik70
Ok.

La soluzione più "semplice" è creare una "entry" da dare in pasto al nuovo grub.cfg che andrai a generare da Ubuntu, utilizzando lo script che hai in '/etc/grub.d/40_custom'.

Per far questo ti servono una serie di informazioni.

Prima di tutto devi localizzare in quale partizione si trovano le immagini del kernel e l'initrd della distribuzione che vuoi aggiungere, ad esempio 'Porteus'.
Mettiamo che siano in '/dev/sda7' nella directory '/boot' e che si chiamino 'vmlinuz-porteus' 'e initrd-porteus.img'.

Poi devi individuare l'uuid del filesystem 'root' di Porteus: ipotizziamo che sia lo stesso di prima, "/dev/sda7".

Bene, ora da terminale lanci questo comando:

Codice: Seleziona tutto

for i in bios_hints efi_hints fs_uuid baremetal_hints fs; do echo -n $i": " && sudo grub-probe -d /dev/sda7 -t $i; done
e ottieni:

Codice: Seleziona tutto

bios_hints: hd0,msdos7 
efi_hints: hd0,msdos7 
fs_uuid: 1fb1d465-afbb-42f8-90d4-98c8817899ec 
baremetal_hints: ahci0,msdos7 
fs: ext2
Esamina un attimo quelle voci - che ovviamente nel tuo caso potranno differire - perché ti serviranno per creare la entry di cui dicevamo, basandoti sul contenuto dell'attuale grub.cfg.

Quindi quello che dovrai avere in '/etc/grub.d/40_custom' sarà una cosa del genere:

Codice: Seleziona tutto

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Porteus GNU/Linux" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-porteus-1fb1d465-afbb-42f8-90d4-98c8817899ec' {
	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,msdos7'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos7  1fb1d465-afbb-42f8-90d4-98c8817899ec
	else
	  search --no-floppy --fs-uuid --set=root 1fb1d465-afbb-42f8-90d4-98c8817899ec
	fi
        linux	/boot/vmlinuz-porteus root=UUID=1fb1d465-afbb-42f8-90d4-98c8817899ec ro  quiet splash $vt_handoff
	initrd	/boot/initrd-porteus.img
	
	}
A questo punto dai da terminale:

Codice: Seleziona tutto

sudo chmod +x -v /etc/grub.d/40_custom

Codice: Seleziona tutto

sudo grub-mkconfig -o /boot/grub/grub.cfg
e avrai generato il nuovo '/boot/grub/grub.cfg' dove dovresti vedere la nuova voce di boot "Porteus GNU/Linux".

Controlla sempre bene ciò che scrivi prima di procedere e fai il backup di qualsiasi cosa andrai a modificare, in primis il file /boot/grub/grub.cfg.

Poi ripeti l'operazione anche per l'altra distribuzione che vorrai aggiungere.