GNU/Linux >> LINUX-Kenntnisse >  >> Ubuntu

Wie füge ich dem Grub2-Menü einen neuen Boot-Eintrag für das Betriebssystem hinzu?

Ich bin ziemlich neu in Linux, aber in den letzten Tagen habe ich es auf mich genommen, es auszuprobieren. Ich probiere ein paar verschiedene Distributionen aus, nur um ein Gefühl für verschiedene Versionen zu bekommen, und das ist das einzige, was mich wirklich aufgelegt hat.

Ich habe mit Windows 7 angefangen, dann habe ich Ubuntu 13.10 installiert (was perfekt funktioniert) und dann habe ich Linux Mint installiert. Ich habe jedoch keine Möglichkeit, Linux Mint zu booten, und das möchte ich erreichen. Mein Ziel ist es, einen Linux Mint-Menüeintrag im Grub2-Menü zu haben, der beim Start erscheint, um mit den Menüeinträgen von Ubuntu und Windows 7 zusammenzupassen (und einigen anderen, die ich noch verwenden muss, wie dem Untermenü Erweiterte Ubuntu-Optionen und dem memtest Menüeintrag).

Falls eine dieser Informationen benötigt wird, finden Sie hier einige Informationen aus der GParted-Partitionstabelle sowie Teile des bootinfoscript Ausgabe:

Informationen und Beschreibungen der Partitionen von GParted:

  1. /dev/sda1 ist eine 101,94 MiB große primäre Partition mit einem Fat16-Dateisystem mit einem Flag „diag“
  2. /dev/sda2 ist eine primäre 11,29-GiB-Partition mit einem NTFS-Dateisystem mit einem Flag „boot“ und einem Label „RECOVERY“. Laut /boot/grub/grub.cfg , hier befindet sich der Windows 7-Loader. Ich habe keine Probleme beim Booten in Windows 7 aus dem aktuellen Grub2-Menü.
  3. /dev/sda3 ist eine primäre 275,12-GiB-Partition mit NTFS-Dateisystem mit der Bezeichnung „OS“. Diese Partition enthält alle meine Dateien, die ursprünglich unter Windows erstellt wurden, obwohl einige über die Verwendung von Ubuntu-Programmen gespeichert wurden (bei der Bearbeitung von Dateien auf verschiedenen Betriebssystemen ist bisher nichts schief gelaufen, aber lassen Sie mich wissen, ob dies aus irgendeinem Grund schlecht ist).
  4. /dev/sda4 ist eine erweiterte Partition mit 171,01 GiB. Diese Partition ist derzeit gemountet. Diese enthält neben logischen Partitionen für Ubuntu 13.10 und Linux Mint 16 die Swap-Partition:
    • /dev/sda5 ist eine 58,79 GiB große logische Partition mit ext4-Dateisystem, die die Installation von Linux Mint 16 enthält. In GParted heißt es, der Einhängepunkt für dieses Dateisystem sei / . Dies ist die einzige Partition, die einen nicht leeren Einhängepunkteintrag hat. Ich weiß nicht, was ich davon halten soll, und ich kenne derzeit auch keine Möglichkeit, Linux Mint 16 so zu booten, wie es sich derzeit befindet.
    • /dev/sda6 ist eine 19,56-GiB-Partition (ich glaube, sie wird als primär betrachtet?) mit dem Dateisystem „linux-swap“. Dies wurde automatisch erstellt, als ich Ubuntu installierte, aber ich habe seine Größe manuell um etwa 10 GB erhöht, als ich einige Probleme hatte, Linux Mint 16 zu installieren. Linux Mint 16 ist derzeit erfolgreich installiert, soweit ich das beurteilen kann, aber ich tue es Ich weiß nicht, wie ich es booten soll, wie ich schon sagte. Diese Partition ist derzeit gemountet.
    • /dev/sda7 ist eine 36,41 GiB große logische Partition mit ext4-Dateisystem, die Ubuntu 13.10 enthält. Ubuntu 13.10 funktioniert recht gut, und darin schreibe ich gerade diese Frage. Diese Partition ist derzeit gemountet.

Hier ist das bootinfoscript Ausgabe (es ist ziemlich lang und enthält die grub.cfg Datei sowie die sudo fdisk -l info bereits hier gepostet – einige mussten allerdings aus Zeichengründen weggelassen werden):

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    in partition 94 for .
 => Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  Dell Utility: FAT16
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /DELLBIO.BIN /DELLRMK.BIN /COMMAND.COM

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda3: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files:        /Windows/System32/winload.exe /ubuntu/winboot/wubildr 
                       /ubuntu/winboot/wubildr.mbr

sda4: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 13.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda6: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda7 
                       and looks at sector 648107560 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       in partition 94 for .
    Operating System:  Linux Mint 16 Petra
    Boot files:        /boot/grub/grub.cfg /etc/fstab


============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                  63       208,844       208,782  de Dell Utility
/dev/sda2    *        212,992    41,172,991    40,960,000   7 NTFS / exFAT / HPFS
/dev/sda3          41,172,992   618,134,175   576,961,184   7 NTFS / exFAT / HPFS
/dev/sda4         618,139,646   976,771,071   358,631,426   5 Extended
/dev/sda5         694,501,376   817,790,975   123,289,600  83 Linux
/dev/sda6         935,753,728   976,771,071    41,017,344  82 Linux swap / Solaris
/dev/sda7         618,139,648   694,499,022    76,359,375  83 Linux

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        3030-3030                              vfat       DellUtility
/dev/sda2        76C2AD13C2ACD89F                       ntfs       RECOVERY
/dev/sda3        B864AE8864AE4948                       ntfs       OS
/dev/sda5        5832ede3-f357-427e-ac67-b2157b5ba6e1   ext4       
/dev/sda6        24a1b8d2-d3a0-4b3f-b48e-9a3f5bab16c2   swap       
/dev/sda7        520dfeb8-758e-47c0-97de-a0a8cb8b4866   ext4

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda3        /media/matt/OS           fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda5        /                        ext4       (rw,errors=remount-ro)
/dev/sda7        /media/matt/520dfeb8-758e-47c0-97de-a0a8cb8b4866 ext4       (rw,nosuid,nodev,uhelper=udisks2)


=========================== sda5/boot/grub/grub.cfg: ===========================
Bootinfoscript
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#

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

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,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
else
  search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
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=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

///// EDITED OUT MORE THEME INFO //////

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
    else
      search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
    fi
    linux   /boot/vmlinuz-3.11.0-15-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro   acpi_backlight=vendor dell_laptop.backlight=0 quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.11.0-15-generic
}

//////// I MANUALLY OMITTED THE UBUNTU ADVANCED OPTIONS SUBMENU FROM HERE BECAUSE THERE Was >30000 CHARACTERS ///////

--class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-35-generic-advanced-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
    recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
        else
          search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
        fi
        echo    'Loading Linux 3.8.0-35-generic ...'
        linux   /boot/vmlinuz-3.8.0-35-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro   acpi_backlight=vendor dell_laptop.backlight=0 quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.8.0-35-generic
    }
    menuentry 'Ubuntu, with Linux 3.8.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-35-generic-recovery-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
    recordfail
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
        else
          search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
        fi
        echo    'Loading Linux 3.8.0-35-generic ...'
        linux   /boot/vmlinuz-3.8.0-35-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.8.0-35-generic
    }
    menuentry 'Ubuntu, with Linux 3.8.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-19-generic-advanced-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
    recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
        else
          search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
        fi
        echo    'Loading Linux 3.8.0-19-generic ...'
        linux   /boot/vmlinuz-3.8.0-19-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro   acpi_backlight=vendor dell_laptop.backlight=0 quiet splash $vt_handoff
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.8.0-19-generic
    }
    menuentry 'Ubuntu, with Linux 3.8.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-19-generic-recovery-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
    recordfail
        load_video
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
        else
          search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
        fi
        echo    'Loading Linux 3.8.0-19-generic ...'
        linux   /boot/vmlinuz-3.8.0-19-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.8.0-19-generic
    }
}

### END /etc/grub.d/10_linux ###

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
    insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
else
  search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
fi
linux16 /boot/memtest86+.bin
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
else
  search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-76C2AD13C2ACD89F' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  76C2AD13C2ACD89F
    else
      search --no-floppy --fs-uuid --set=root 76C2AD13C2ACD89F
    fi
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

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

### BEGIN /etc/grub.d/40_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/40_custom ###

### BEGIN /etc/grub.d/41_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/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb5 during installation
UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 /               ext4    errors=remount-ro 0     1
# swap was on /dev/sdb6 during installation
UUID=24a1b8d2-d3a0-4b3f-b48e-9a3f5bab16c2 none            swap    sw              0       0
--------------------------------------------------------------------------------


=========================== sda7/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# 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 ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"

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,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  520dfeb8-758e-47c0-97de-a0a8cb8b4866
else
  search --no-floppy --fs-uuid --set=root 520dfeb8-758e-47c0-97de-a0a8cb8b4866
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=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

/////// EDITED OUT SOME DEBIAN/MINT THEME INFO HERE ///////

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="$1"
    if [ "$1" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 16 Cinnamon 64-bit, 3.11.0-12-generic (/dev/sda7)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    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,msdos7 --hint-baremetal=ahci0,msdos7  520dfeb8-758e-47c0-97de-a0a8cb8b4866
    else
      search --no-floppy --fs-uuid --set=root 520dfeb8-758e-47c0-97de-a0a8cb8b4866
    fi
    linux   /boot/vmlinuz-3.11.0-12-generic root=UUID=520dfeb8-758e-47c0-97de-a0a8cb8b4866 ro   quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.11.0-12-generic
}
menuentry 'Linux Mint 16 Cinnamon 64-bit, 3.11.0-12-generic (/dev/sda7) -- recovery mode' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    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,msdos7 --hint-baremetal=ahci0,msdos7  520dfeb8-758e-47c0-97de-a0a8cb8b4866
    else
      search --no-floppy --fs-uuid --set=root 520dfeb8-758e-47c0-97de-a0a8cb8b4866
    fi
    echo    'Loading Linux 3.11.0-12-generic ...'
    linux   /boot/vmlinuz-3.11.0-12-generic root=UUID=520dfeb8-758e-47c0-97de-a0a8cb8b4866 ro recovery nomodeset 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-3.11.0-12-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
    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,msdos7 --hint-baremetal=ahci0,msdos7  520dfeb8-758e-47c0-97de-a0a8cb8b4866
    else
      search --no-floppy --fs-uuid --set=root 520dfeb8-758e-47c0-97de-a0a8cb8b4866
    fi
    linux16 /boot/memtest86+.bin
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
    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,msdos7 --hint-baremetal=ahci0,msdos7  520dfeb8-758e-47c0-97de-a0a8cb8b4866
    else
      search --no-floppy --fs-uuid --set=root 520dfeb8-758e-47c0-97de-a0a8cb8b4866
    fi
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os     $menuentry_id_option 'osprober-chain-76C2AD13C2ACD89F' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  76C2AD13C2ACD89F
    else
      search --no-floppy --fs-uuid --set=root 76C2AD13C2ACD89F
    fi
    chainloader +1
}
menuentry 'Ubuntu 13.10 (13.10)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5832ede3-f357-427e-ac67-b2157b5ba6e1' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  5832ede3-f357-427e-ac67-b2157b5ba6e1
    else
      search --no-floppy --fs-uuid --set=root 5832ede3-f357-427e-ac67-b2157b5ba6e1
    fi
    linux /boot/vmlinuz-3.11.0-15-generic root=UUID=5832ede3-f357-427e-ac67-b2157b5ba6e1 ro acpi_backlight=vendor dell_laptop.backlight=0 quiet splash $vt_handoff
    initrd /boot/initrd.img-3.11.0-15-generic
}

/////// THERE WAS ANOTHER SUBMENU THING FOR UBUNTU ADVANCED OPTIONS HERE, ALSO OMITTED ////////

### END /etc/grub.d/30_os-prober ###

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

### BEGIN /etc/grub.d/40_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/40_custom ###

### BEGIN /etc/grub.d/41_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/41_custom ###
--------------------------------------------------------------------------------

=============================== sda7/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda7 during installation
UUID=520dfeb8-758e-47c0-97de-a0a8cb8b4866 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=24a1b8d2-d3a0-4b3f-b48e-9a3f5bab16c2 none            swap    sw              0       0
--------------------------------------------------------------------------------

Ich bin mir nicht sicher, ob dieses Partitions-Setup gut ist oder nicht, da ich keine zusätzliche primäre Partition (maximal 4) erstellen konnte, aber ich dachte, da Ubuntu von innerhalb der erweiterten Partition booten könnte, sollte Linux Mint dies auch können , also habe ich Linux Mint zu einer Partition in derselben erweiterten Partition wie Ubuntu hinzugefügt (die sich in /dev/sda5 befindet ), aber in einer eigenen logischen Partition /dev/sda7 .

In der /boot/grub/grub.cfg Datei gibt es mehrere menuentry Einheiten. Wenn der richtige Weg zum Booten von Linux Mint aus dem Grub2-Menü darin besteht, einfach einen Menüeintragsblock für Linux Mint hinzuzufügen, dann würde ich gerne wissen, wie das geht. Wenn es einen besseren Weg gibt, jedes dieser Betriebssysteme mit einer Option zum Booten beim Start zu versehen, lassen Sie es mich auch wissen!

Verwandt:Zugriff auf nur IE-Websites?

Ich habe hier eine etwas ähnliche Frage gesehen, aber es schien ein bisschen anders zu sein, da dieser Benutzer nicht zwei Betriebssystempartitionen hatte, die in derselben erweiterten Partition enthalten waren, und ich wollte nicht einfach im Dunkeln schießen und möglicherweise etwas Wichtiges beschädigen aus Versehen.

Wenn weitere Informationen benötigt werden, die ich hier nicht angegeben habe, werde ich dies genau im Auge behalten, also lass es mich sofort wissen und ich werde mein Bestes tun, um dir alle Informationen zu geben, die du benötigst.

Verwandte:Boot-Reparatur erkennt Windows nicht und daher kein Grub-Menüelement zum Booten von Windows?

Vielen Dank für jede Hilfe!

Beste Antwort

Sie könnten update-grub versuchen um zu sehen, ob Linux Mint erkannt wird. Dies sollte prüfen, welche Betriebssysteme installiert sind.

Alternativ können Sie versuchen, vom Live-USB (oder LiveCD) zu booten und grub-install /dev/sda auszuführen mit eingebauter Festplatte. Dadurch wird GRUB neu installiert und es sollte erneut nach anderen Betriebssystemen gesucht werden.


Ubuntu
  1. Freebsd – Freebsd zum Grub2-Startmenü hinzufügen?

  2. Wie überspringe ich das Grub-Menü auf einem Dual-Boot-System?

  3. Wie wird die Windows-Partition beim Booten automatisch bereitgestellt?

  4. Wie überprüfe ich das Betriebssystem in Python?

  5. Größe der Bootpartition ändern

So fügen Sie die Option „Neues Dokument“ im Rechtsklick-Kontextmenü in Ubuntu 18.04 hinzu

So fügen Sie Ubuntu einen Drucker hinzu

So fügen Sie unter Linux ein neues Gerät zum BTRFS-Dateisystem hinzu

Wie entferne ich alte Kernel-Versionen, um das Boot-Menü zu bereinigen?

Wie verschiebt man die Ext4-Partition vor die Boot-Partition?

CentOS / RHEL:So fügen Sie eine neue Swap-Partition hinzu