Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 27/05/2024, à 21:46

ceric

[Résolu] Dual boot Debian vs Ubuntu

Bonsoir,
Je désirerais réaliser un dual boot Ubuntu vs Debian, mais je ne sais pas comment m'y prendre.
Je suis sous la 24.04. Je viens d'installer Gparted en snap.
Et pour partitionner sous linux je m'y connais pas très bien.
edit : Attention de bien relever vos référence de votre partition "efi"

Dernière modification par ceric (Le 28/05/2024, à 23:49)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#2 Le 28/05/2024, à 00:27

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

Depuis l'installation du dual boot, j'ai un problème je ne peux plus démarrer sous ubuntu, je ne démarre plus que sous la debian.


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#3 Le 28/05/2024, à 06:58

xubu1957

Re : [Résolu] Dual boot Debian vs Ubuntu

Bonjour,

Avais-tu passé un :

sudo update-grub

?

> [RESOLU] BOOT : Mise à jour de GRUB sans effet


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#4 Le 28/05/2024, à 07:05

lynn

Re : [Résolu] Dual boot Debian vs Ubuntu

ceric a écrit :

Je viens d'installer Gparted en snap

J'aimerais bien savoir comment tu as fait..? wink


«C'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!»

Coluche

Hors ligne

#5 Le 28/05/2024, à 07:56

nany

Re : [Résolu] Dual boot Debian vs Ubuntu

Bonjour,



ceric a écrit :

Depuis l'installation du dual boot, j'ai un problème je ne peux plus démarrer sous ubuntu, je ne démarre plus que sous la debian.

Voir ici ou .

En ligne

#6 Le 28/05/2024, à 08:15

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

Merci pour vos post, je suis au travail.
Je reviendrais vers vous à la fin de la journée. smile


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#7 Le 28/05/2024, à 08:23

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

@nany, le fichier /etc/grub.d/40_custom est déjà prérempli.
Dois-je supprimer ce qu'il y a marqué par :

#!/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.
 
 
#Ubuntu Noble sur /dev/sda1
menuentry "Ubuntu (on /dev/sda1)" {
        set root=(hd2,1)
        linux   /vmlinuz root=/dev/sda1 ro quiet silent
        initrd  /initrd.img
}

Je ne sais pas m'y prendre à ce stade.
Oups, j'ai trouvé ceci. Je testerais en fin de journée.

Dernière modification par ceric (Le 28/05/2024, à 21:33)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#8 Le 28/05/2024, à 12:57

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

@xubu1957, oui j'ai fait un

sudo update-grub

mais rien, pas d'ubuntu.
@nany, il y a tellement de version pour remplir le fichier /etc/grub.d/40_custom que je ne sais pas quoi mettre?


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#9 Le 28/05/2024, à 13:06

nany

Re : [Résolu] Dual boot Debian vs Ubuntu

ceric a écrit :

@nany, il y a tellement de version pour remplir le fichier /etc/grub.d/40_custom que je ne sais pas quoi mettre?

Bah tu n’as qu’à faire plus simple en activant os-prober :

grep -q "DISABLE_OS_PROBER" /etc/default/grub && sudo sed -i '/GRUB_DISABLE_OS_PROBER/s/^#//' /etc/default/grub || sudo sed -i '/GRUB_CMDLINE_LINUX=/a\GRUB_DISABLE_OS_PROBER=false' /etc/default/grub

Puis en relançant :

sudo update-grub

En ligne

#10 Le 28/05/2024, à 18:00

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

J'ai rentré cette annotation :

menuentry 'Ubuntu  boot menu' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-e>
        else
          search --no-floppy --fs-uuid --set=root A8C7-C568
        fi
        chainloader /EFI/Ubuntu/shimx64.efi
}

et j'ai updaté le grub mais j'ai des erreurs

sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-21-amd64
Found initrd image: /boot/initrd.img-6.1.0-21-amd64
Found linux image: /boot/vmlinuz-6.1.0-18-amd64
Found initrd image: /boot/initrd.img-6.1.0-18-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Ubuntu 24.04 LTS (24.04) on /dev/sda1
Adding boot menu entry for UEFI Firmware Settings ...
erreur : syntax error.
erreur : Incorrect command.
erreur : syntax error.
Erreur de syntaxe à la ligne 309
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

Dernière modification par ceric (Le 29/05/2024, à 00:14)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#11 Le 28/05/2024, à 18:56

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

Merci @ tous les intervenats, problème résolu :
Je n'avais pas désactivé le secureboot dans le BIOS.
Après l'intervention sur le BIOS, j'ai pu booter à nouveau sur ma partition Ubuntu.
Et à cet instant je suis sous Debian.


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#12 Le 28/05/2024, à 20:32

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

J'ai réactivé le secureboot et j'ai encore perdu ma partition ubuntu. sad

Dernière modification par ceric (Le 28/05/2024, à 21:09)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#13 Le 28/05/2024, à 22:23

alex2423

Re : [Résolu] Dual boot Debian vs Ubuntu

Et pourquoi le réactiver dans ce cas ? Je ne suis pas certain de l'avoir fait moi non plus. Je suis comme toi, en dual, ou plutot triple boot avec une Ubuntu/Kubuntu/Debian.

Hors ligne

#14 Le 28/05/2024, à 22:49

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

@nany, crois-tu après ce que je viens d'exécuter je peux tenter ta commande ?

#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
grub_lang=`echo $LANG | cut -d . -f 1`
grubdir="`echo "/boot/grub" | sed 's,//*,/,g'`"
quick_boot="0"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "$pkgdatadir/grub-mkconfig_lib"

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi

if [ "x${GRUB_DEFAULT_BUTTON}" = "x" ] ; then GRUB_DEFAULT_BUTTON="$GRUB_DEFAULT" ; fi
if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi

cat << EOF
if [ -s \$prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
EOF
if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
   set default="${GRUB_DEFAULT_BUTTON}"
elif [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
else
    cat <<EOF
if [ "\${next_entry}" ] ; then
   set default="\${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${GRUB_DEFAULT}"
fi
EOF
fi
cat <<EOF

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
}
EOF

if [ "$quick_boot" = 1 ]; then
    cat <<EOF
function recordfail {
  set recordfail=1
EOF

  check_writable () {
    abstractions="$(grub-probe --target=abstraction "${grubdir}")"
    for abstraction in $abstractions; do
      case "$abstraction" in
        diskfilter | lvm)
          cat <<EOF
  # GRUB lacks write support for $abstraction, so recordfail support is disabled.
EOF
          return 1
          ;;
      esac
    done

    FS="$(grub-probe --target=fs "${grubdir}")"
    case "$FS" in
      btrfs | cpiofs | newc | odc | romfs | squash4 | tarfs | zfs)
	cat <<EOF
  # GRUB lacks write support for $FS, so recordfail support is disabled.
EOF
	return 1
	;;
    esac

    cat <<EOF
  if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then save_env recordfail; fi; fi
EOF
  }

  if ! check_writable; then
    recordfail_broken=1
  fi

  cat <<EOF
}
EOF
fi

cat <<EOF
function load_video {
EOF
if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
    cat <<EOF
  insmod ${GRUB_VIDEO_BACKEND}
EOF
else
# If all_video.mod isn't available load all modules available
# with versions prior to introduction of all_video.mod
cat <<EOF
  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
EOF
fi
cat <<EOF
}

EOF

serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    if [ xserial = "x$x" ]; then
	serial=1;
    fi
    if [ xgfxterm = "x$x" ]; then
	gfxterm=1;
    fi
done

if [ "x$serial" = x1 ]; then
    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
	grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
	GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
fi

if [ "x$gfxterm" = x1 ]; then
    if [ -n "$GRUB_FONT" ] ; then
       # Make the font accessible
       prepare_grub_to_access_device `${grub_probe} --target=device "${GRUB_FONT}"`
    cat << EOF
if loadfont `make_system_path_relative_to_its_root "${GRUB_FONT}"` ; then
EOF
    else
	for dir in "${pkgdatadir}" "`echo '/boot/grub' | sed "s,//*,/,g"`" /usr/share/grub ; do
	    for basename in unicode unifont ascii; do
		path="${dir}/${basename}.pf2"
		if is_path_readable_by_grub "${path}" > /dev/null ; then
		    font_path="${path}"
		else
		    continue
		fi
		break 2
	    done
	done
	if [ -n "${font_path}" ] ; then
    cat << EOF
if [ x\$feature_default_font_path = xy ] ; then
   font=unicode
else
EOF
                # Make the font accessible
		prepare_grub_to_access_device `${grub_probe} --target=device "${font_path}"`
    cat << EOF
    font="`make_system_path_relative_to_its_root "${font_path}"`"
fi

if loadfont \$font ; then
EOF
	    else
    cat << EOF
if loadfont unicode ; then
EOF
	    fi
	fi

    cat << EOF
  set gfxmode=${GRUB_GFXMODE}
  load_video
  insmod gfxterm
EOF

# Gettext variables and module
if [ "x${LANG}" != "xC" ] &&  [ "x${LANG}" != "x" ]; then
  cat << EOF
  set locale_dir=\$prefix/locale
  set lang=${grub_lang}
  insmod gettext
EOF
fi

cat <<EOF
fi
EOF
fi

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_input ${GRUB_TERMINAL_INPUT}
EOF
  ;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
terminal_output ${GRUB_TERMINAL_OUTPUT}
EOF
  ;;
esac

if [ "x$gfxterm" = x1 ]; then
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
	&& is_path_readable_by_grub "$GRUB_THEME"; then
	gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2

	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
	cat << EOF
insmod gfxmenu
EOF
	themedir="`dirname "$GRUB_THEME"`"
	for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
	    if [ -f "$x" ]; then
		cat << EOF
loadfont (\$root)`make_system_path_relative_to_its_root $x`
EOF
	    fi
	done
	if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
	    cat << EOF
insmod jpeg
EOF
	fi
	if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
	    cat << EOF
insmod png
EOF
	fi
	if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
	    cat << EOF
insmod tga
EOF
	fi
	    
	cat << EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
export theme
EOF
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
	    && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
	gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
	case "$GRUB_BACKGROUND" in 
	    *.png)         reader=png ;;
	    *.tga)         reader=tga ;;
	    *.jpg|*.jpeg)  reader=jpeg ;;
	    *)             gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
	esac
	prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
	cat << EOF
insmod $reader
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
EOF
    fi
fi

make_timeout ()
{
    cat << EOF
if [ "\${recordfail}" = 1 ] ; then
  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
else
EOF
    if [ "x${3}" != "x" ] ; then
	timeout="${2}"
	style="${3}"
    elif [ "x${1}" != "x" ] && \
	 ([ "$quick_boot" = 1 ] || [ "x${1}" != "x0" ]) ; then
	# Handle the deprecated GRUB_HIDDEN_TIMEOUT scheme.
	timeout="${1}"
	if [ "x${2}" != "x0" ] ; then
	    grub_warn "$(gettext "Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.")"
	fi
	if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
	    style="hidden"
	    verbose=
	else
	    style="countdown"
	    verbose=" --verbose"
	fi
    else
	# No hidden timeout, so treat as GRUB_TIMEOUT_STYLE=menu
	timeout="${2}"
	style="menu"
    fi
    cat << EOF
  if [ x\$feature_timeout_style = xy ] ; then
    set timeout_style=${style}
    set timeout=${timeout}
EOF
    if [ "x${style}" = "xmenu" ] ; then
	cat << EOF
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=${timeout}
EOF
    else
	cat << EOF
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep${verbose} --interruptible ${timeout} ; then
    set timeout=0
EOF
    fi
    cat << EOF
  fi
fi
EOF
if [ "$recordfail_broken" = 1 ]; then
  cat << EOF
if [ \$grub_platform = efi ]; then
  set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30}
  if [ x\$feature_timeout_style = xy ] ; then
    set timeout_style=menu
  fi
fi
EOF
fi
}

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
    cat <<EOF
if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
EOF
make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_STYLE_BUTTON}"
echo else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
echo fi
else
make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}" "${GRUB_TIMEOUT_STYLE}"
fi

if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ] && [ "x$GRUB_BUTTON_CMOS_CLEAN" = "xyes" ]; then
    cat <<EOF
cmosclean $GRUB_BUTTON_CMOS_ADDRESS
EOF
fi

# Play an initial tune
if [ "x${GRUB_INIT_TUNE}" != "x" ] ; then
  echo "play ${GRUB_INIT_TUNE}"
fi

if [ "x${GRUB_BADRAM}" != "x" ] ; then
  echo "badram ${GRUB_BADRAM}"
fi

Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#15 Le 28/05/2024, à 23:13

nany

Re : [Résolu] Dual boot Debian vs Ubuntu

ceric a écrit :

@nany, crois-tu après ce que je viens d'exécuter je peux tenter ta commande ?

Au vu du retour en #10,

ceric a écrit :
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Ubuntu 24.04 LTS (24.04) on /dev/sda1

ce n’est pas la peine.

Pour s’en assurer, donne le retour de :

cat /etc/default/grub

Donne aussi le retour de :

cat /etc/grub.d/40_custom

 

Et je ne comprends pas pourquoi tu nous montre le contenu d’un script de /etc/grub.d/ (00_header a priori).

En ligne

#16 Le 28/05/2024, à 23:39

jplemoine

Re : [Résolu] Dual boot Debian vs Ubuntu

alex2423 a écrit :

Et pourquoi le réactiver dans ce cas ? Je ne suis pas certain de l'avoir fait moi non plus.

Perso, je suis en Ubuntu avec le secure boot activé : ça existe autant l'utiliser.
Il faut juste dire au secure boot qu'Ubuntu est gentil.
il y a une histoire d'enrôlement à faire une et une seule fois.


Membre de l'ALDIL (Association Lyonnaise pour le Développement de l'Informatique Libre)
- En pro, après 20 ans de développement, administrateur Linux / Unix depuis Avril 2019.
- En privé, sous Ubuntu-Xubuntu depuis 2009.

Hors ligne

#17 Le 28/05/2024, à 23:44

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

@nany,

cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
cat /etc/grub.d/40_custom
#!/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 'Ubuntu boot menu' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  88A3-5090
        else
          search --no-floppy --fs-uuid --set=root 88A3-5090
        fi
        chainloader /EFI/ubuntu/shimx64.efi
}
lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│    ext4   1.0         13b37e14-3b20-46e0-a755-2dbda8c67e67                
├─sda2
│    vfat   FAT32       88A3-5090                                 1G     1% /boot/efi
├─sda3
│    swap   1           684277be-58ab-47bb-9bdd-190ba26aebd9                [SWAP]
├─sda4
│    ext4   1.0         2128b2b4-3df9-4b75-b12c-22852b6a4ee5                
├─sda5
│    ext4   1.0         29b9c2c0-fb43-4442-932d-f201311b0707   23,6G    30% /
├─sda6
│    swap   1           c48bb603-a20a-492f-a095-fb89b095dc32                [SWAP]
└─sda7
     ext4   1.0         e36923db-455f-439d-889f-f7a03ca54c27  127,7G     1% /home

Dernière modification par ceric (Le 29/05/2024, à 00:13)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#18 Le 28/05/2024, à 23:48

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

Mise à jour du statut c'est [résolu].
En effet je laissais (non volontairement) car j'avais repris un menuentry sur le forum debian-facile.
A8C7-C568 et le mien est 88A3-5090
J'ai réactivé le secureboot. wink


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#19 Le 29/05/2024, à 00:05

nany

Re : [Résolu] Dual boot Debian vs Ubuntu

Tiens, étonnant qu’os-prober ait été exécuté.
On est bien d’accord que tout ce que tu nous as montré jusqu’à présent c’était depuis Debian ?


Tiens, tant qu’on y est, donne le retour de :

cat -n /boot/grub/grub.cfg

En ligne

#20 Le 29/05/2024, à 00:15

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

cat -n /boot/grub/grub.cfg
     1	#
     2	# DO NOT EDIT THIS FILE
     3	#
     4	# It is automatically generated by grub-mkconfig using templates
     5	# from /etc/grub.d and settings from /etc/default/grub
     6	#
     7	
     8	### BEGIN /etc/grub.d/00_header ###
     9	if [ -s $prefix/grubenv ]; then
    10	  set have_grubenv=true
    11	  load_env
    12	fi
    13	if [ "${next_entry}" ] ; then
    14	   set default="${next_entry}"
    15	   set next_entry=
    16	   save_env next_entry
    17	   set boot_once=true
    18	else
    19	   set default="0"
    20	fi
    21	
    22	if [ x"${feature_menuentry_id}" = xy ]; then
    23	  menuentry_id_option="--id"
    24	else
    25	  menuentry_id_option=""
    26	fi
    27	
    28	export menuentry_id_option
    29	
    30	if [ "${prev_saved_entry}" ]; then
    31	  set saved_entry="${prev_saved_entry}"
    32	  save_env saved_entry
    33	  set prev_saved_entry=
    34	  save_env prev_saved_entry
    35	  set boot_once=true
    36	fi
    37	
    38	function savedefault {
    39	  if [ -z "${boot_once}" ]; then
    40	    saved_entry="${chosen}"
    41	    save_env saved_entry
    42	  fi
    43	}
    44	function load_video {
    45	  if [ x$feature_all_video_module = xy ]; then
    46	    insmod all_video
    47	  else
    48	    insmod efi_gop
    49	    insmod efi_uga
    50	    insmod ieee1275_fb
    51	    insmod vbe
    52	    insmod vga
    53	    insmod video_bochs
    54	    insmod video_cirrus
    55	  fi
    56	}
    57	
    58	if [ x$feature_default_font_path = xy ] ; then
    59	   font=unicode
    60	else
    61	insmod part_gpt
    62	insmod ext2
    63	set root='hd0,gpt5'
    64	if [ x$feature_platform_search_hint = xy ]; then
    65	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
    66	else
    67	  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
    68	fi
    69	    font="/usr/share/grub/unicode.pf2"
    70	fi
    71	
    72	if loadfont $font ; then
    73	  set gfxmode=auto
    74	  load_video
    75	  insmod gfxterm
    76	  set locale_dir=$prefix/locale
    77	  set lang=fr_FR
    78	  insmod gettext
    79	fi
    80	terminal_output gfxterm
    81	if [ "${recordfail}" = 1 ] ; then
    82	  set timeout=30
    83	else
    84	  if [ x$feature_timeout_style = xy ] ; then
    85	    set timeout_style=menu
    86	    set timeout=5
    87	  # Fallback normal timeout code in case the timeout_style feature is
    88	  # unavailable.
    89	  else
    90	    set timeout=5
    91	  fi
    92	fi
    93	### END /etc/grub.d/00_header ###
    94	
    95	### BEGIN /etc/grub.d/05_debian_theme ###
    96	insmod part_gpt
    97	insmod ext2
    98	set root='hd0,gpt5'
    99	if [ x$feature_platform_search_hint = xy ]; then
   100	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   101	else
   102	  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   103	fi
   104	insmod png
   105	if background_image /usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
   106	  set color_normal=white/black
   107	  set color_highlight=black/white
   108	else
   109	  set menu_color_normal=cyan/blue
   110	  set menu_color_highlight=white/blue
   111	fi
   112	### END /etc/grub.d/05_debian_theme ###
   113	
   114	### BEGIN /etc/grub.d/10_linux ###
   115	function gfxmode {
   116		set gfxpayload="${1}"
   117	}
   118	set linux_gfx_mode=
   119	export linux_gfx_mode
   120	menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-29b9c2c0-fb43-4442-932d-f201311b0707' {
   121		load_video
   122		insmod gzio
   123		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   124		insmod part_gpt
   125		insmod ext2
   126		set root='hd0,gpt5'
   127		if [ x$feature_platform_search_hint = xy ]; then
   128		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   129		else
   130		  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   131		fi
   132		echo	'Loading Linux 6.1.0-21-amd64 ...'
   133		linux	/boot/vmlinuz-6.1.0-21-amd64 root=UUID=29b9c2c0-fb43-4442-932d-f201311b0707 ro  quiet
   134		echo	'Loading initial ramdisk ...'
   135		initrd	/boot/initrd.img-6.1.0-21-amd64
   136	}
   137	submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-29b9c2c0-fb43-4442-932d-f201311b0707' {
   138		menuentry 'Debian GNU/Linux, with Linux 6.1.0-21-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-21-amd64-advanced-29b9c2c0-fb43-4442-932d-f201311b0707' {
   139			load_video
   140			insmod gzio
   141			if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   142			insmod part_gpt
   143			insmod ext2
   144			set root='hd0,gpt5'
   145			if [ x$feature_platform_search_hint = xy ]; then
   146			  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   147			else
   148			  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   149			fi
   150			echo	'Loading Linux 6.1.0-21-amd64 ...'
   151			linux	/boot/vmlinuz-6.1.0-21-amd64 root=UUID=29b9c2c0-fb43-4442-932d-f201311b0707 ro  quiet
   152			echo	'Loading initial ramdisk ...'
   153			initrd	/boot/initrd.img-6.1.0-21-amd64
   154		}
   155		menuentry 'Debian GNU/Linux, with Linux 6.1.0-21-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-21-amd64-recovery-29b9c2c0-fb43-4442-932d-f201311b0707' {
   156			load_video
   157			insmod gzio
   158			if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   159			insmod part_gpt
   160			insmod ext2
   161			set root='hd0,gpt5'
   162			if [ x$feature_platform_search_hint = xy ]; then
   163			  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   164			else
   165			  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   166			fi
   167			echo	'Loading Linux 6.1.0-21-amd64 ...'
   168			linux	/boot/vmlinuz-6.1.0-21-amd64 root=UUID=29b9c2c0-fb43-4442-932d-f201311b0707 ro single 
   169			echo	'Loading initial ramdisk ...'
   170			initrd	/boot/initrd.img-6.1.0-21-amd64
   171		}
   172		menuentry 'Debian GNU/Linux, with Linux 6.1.0-18-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-18-amd64-advanced-29b9c2c0-fb43-4442-932d-f201311b0707' {
   173			load_video
   174			insmod gzio
   175			if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   176			insmod part_gpt
   177			insmod ext2
   178			set root='hd0,gpt5'
   179			if [ x$feature_platform_search_hint = xy ]; then
   180			  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   181			else
   182			  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   183			fi
   184			echo	'Loading Linux 6.1.0-18-amd64 ...'
   185			linux	/boot/vmlinuz-6.1.0-18-amd64 root=UUID=29b9c2c0-fb43-4442-932d-f201311b0707 ro  quiet
   186			echo	'Loading initial ramdisk ...'
   187			initrd	/boot/initrd.img-6.1.0-18-amd64
   188		}
   189		menuentry 'Debian GNU/Linux, with Linux 6.1.0-18-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-18-amd64-recovery-29b9c2c0-fb43-4442-932d-f201311b0707' {
   190			load_video
   191			insmod gzio
   192			if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   193			insmod part_gpt
   194			insmod ext2
   195			set root='hd0,gpt5'
   196			if [ x$feature_platform_search_hint = xy ]; then
   197			  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  29b9c2c0-fb43-4442-932d-f201311b0707
   198			else
   199			  search --no-floppy --fs-uuid --set=root 29b9c2c0-fb43-4442-932d-f201311b0707
   200			fi
   201			echo	'Loading Linux 6.1.0-18-amd64 ...'
   202			linux	/boot/vmlinuz-6.1.0-18-amd64 root=UUID=29b9c2c0-fb43-4442-932d-f201311b0707 ro single 
   203			echo	'Loading initial ramdisk ...'
   204			initrd	/boot/initrd.img-6.1.0-18-amd64
   205		}
   206	}
   207	
   208	### END /etc/grub.d/10_linux ###
   209	
   210	### BEGIN /etc/grub.d/20_linux_xen ###
   211	
   212	### END /etc/grub.d/20_linux_xen ###
   213	
   214	### BEGIN /etc/grub.d/30_os-prober ###
   215	### END /etc/grub.d/30_os-prober ###
   216	
   217	### BEGIN /etc/grub.d/30_uefi-firmware ###
   218	menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
   219		fwsetup
   220	}
   221	### END /etc/grub.d/30_uefi-firmware ###
   222	
   223	### BEGIN /etc/grub.d/35_fwupd ###
   224	### END /etc/grub.d/35_fwupd ###
   225	
   226	### BEGIN /etc/grub.d/40_custom ###
   227	# This file provides an easy way to add custom menu entries.  Simply type the
   228	# menu entries you want to add after this comment.  Be careful not to change
   229	# the 'exec tail' line above.
   230	
   231	menuentry 'Ubuntu boot menu' {
   232	        insmod part_gpt
   233	        insmod fat
   234	        set root='hd0,gpt2'
   235	        if [ x$feature_platform_search_hint = xy ]; then
   236	          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  88A3-5090
   237	        else
   238	          search --no-floppy --fs-uuid --set=root 88A3-5090
   239	        fi
   240	        chainloader /EFI/ubuntu/shimx64.efi
   241	}
   242	### END /etc/grub.d/40_custom ###
   243	
   244	### BEGIN /etc/grub.d/41_custom ###
   245	if [ -f  ${config_directory}/custom.cfg ]; then
   246	  source ${config_directory}/custom.cfg
   247	elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
   248	  source $prefix/custom.cfg
   249	fi
   250	### END /etc/grub.d/41_custom ###

@nany, yes je suis sous debian et ça boote sous ubuntu également.


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#21 Le 29/05/2024, à 00:24

nany

Re : [Résolu] Dual boot Debian vs Ubuntu

Bon, eh bien tout a l’air maintenant correct (mais on ne saura pas pourquoi os-prober s’était exécuté).

Bonne continuation avec ton dual-boot.

En ligne

#22 Le 29/05/2024, à 12:12

ylag

Re : [Résolu] Dual boot Debian vs Ubuntu

Bonjour,

Discussion en doublon sur debian-facile.org :  https://debian-facile.org/viewtopic.php?id=34894

A+

Hors ligne

#23 Le 29/05/2024, à 21:31

ceric

Re : [Résolu] Dual boot Debian vs Ubuntu

jplemoine a écrit :
alex2423 a écrit :

Et pourquoi le réactiver dans ce cas ? Je ne suis pas certain de l'avoir fait moi non plus.

Perso, je suis en Ubuntu avec le secure boot activé : ça existe autant l'utiliser.
Il faut juste dire au secure boot qu'Ubuntu est gentil.
il y a une histoire d'enrôlement à faire une et une seule fois.

Je pense qu'il est déjà fait, je n'ai pas d'erreur au boot de grub.

Dernière modification par ceric (Le 29/05/2024, à 22:55)


Mac mini 7.1 en dual boot Ubuntu Gnome 22.04.1 [LTS] & macOS (Monterey)
HP elitedesk 800 G2 SFF en dual boot Ubuntu Gnome 24.04.0 [LTS] & Debian 12 (Bookworm)

Hors ligne

#24 Le 30/05/2024, à 17:02

O_20_100_O

Re : [Résolu] Dual boot Debian vs Ubuntu

Bonjour,
Juste pour info, hier soir j'ai installé Debian 12 sur un vieux PC portable qui avait déjà son Windows depuis l'origine, laborieusement mis à jour avec des trésors de patience.
Comme j'avais lu qu'OS-Prober n'est pas activé sur Ubuntu, j'ai eu la bonne surprise de découvrir, dès le premier redémarrage après l'installation, un Grub bien paramétré et qui me propose de lancer Debian ou Windows. Et en plus ça marche.

Pour rester un peu dans le sujet, il faut préciser que c'est une installation en mode legacy, ce BIOS ne gère pas l'UEFI tongue

Dernière modification par O_20_100_O (Le 30/05/2024, à 17:05)

Hors ligne