grub2 does not discover small linux partition

I installed Windows 7 and it is encrypted by special program which is making small linux partition (normally it is booting from this small linux partition, asking for password and then unencrypts Windows).
After installation Grub didn’t discover this small Linux but I can mount is and I see it’s files:


 # mount /dev/sda2 mnttt/
 # ls mnttt
bin  boot  .CT_devices  dev  etc  .fonts.cache-1  lib  libexec  LICENSES  linuxrc  lost+found  mnt  mod  opt  proc  root  .safesign  sbin  sys  tmp  usr  var
 # ls mnttt/boot/
alpha1_mask.ppm.gz  bkgrimage.mask.ppm.gz  black.mask.ppm     black.ppm     bzImage           bzImage.2.6.34.8-acpi      bzImage-acpi      grub
bkgrimage.mask.ppm  bkgrimage.ppm.gz       black.mask.ppm.gz  black.ppm.gz  bzImage.2.6.34.8  bzImage.2.6.34.8-poweroff  bzImage-poweroff

How can I tell Grub2 to add this to menu? I tried:


grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg

but it didn’t help.

I’m sure that it can be done because I did it somehow before but I can’t remember how :\

PS. Os-proober discover this small Linux:


# os-prober 
  No volume groups found
/dev/sda2:unknown Linux distribution:Linux:linux


and this is how partitions looks now:


# fdisk -l

Dysk /dev/sda: 180.0 GB, bajtów: 180045766656, sektorów: 351651888
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Typ etykiety dysku: dos
Identyfikator dysku: 0x91bcb683

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1            2048   203282431   101640192    7  HPFS/NTFS/exFAT
/dev/sda2       203282432   203475211       96390   95  Nieznany
/dev/sda3   *   203476992   351651839    74087424    f  W95 Ext'd (LBA)
/dev/sda5       203479040   207687679     2104320   82  Linux swap / Solaris
/dev/sda6       207689728   351631359    71970816   83  Linux


Interesting is that mkconfig is discovering it but not adding to menu:


# grub2-mkconfig -o /boot/grub2/grub.cfg 
Generowanie grub.cfg...
Znaleziono motyw: /boot/grub2/themes/openSUSE/theme.txt
Znaleziono obraz Linuksa: /boot/vmlinuz-3.11.10-7-desktop
Znaleziono obraz initrd: /boot/initrd-3.11.10-7-desktop
Znaleziono obraz Linuksa: /boot/vmlinuz-3.11.10-7-default
Znaleziono obraz initrd: /boot/initrd-3.11.10-7-default
Znaleziono obraz Linuksa: /boot/vmlinuz-3.11.6-4-desktop
Znaleziono obraz initrd: /boot/initrd-3.11.6-4-desktop
  No volume groups found
Znaleziono unknown Linux distribution na /dev/sda2
gotowe


“Znaleziono obraz” means “found image” :wink:

It is easier for you (no need to translate) when you execute the commands in this way:

LANG=C fdisk -l

Then the English words will be used.

Now we do not know what the partition type

95  Nieznany

is. I tried to ask fdisk, but it is not in it’s list.

Please show “ls -l mnttt/boot/grub” and content of “mnttt/boot/grub/menu.lst”

It is ext2 partition.


# mount | grep sda2
/dev/sda2 on /home/kamil/mnttt type ext2 (rw,relatime)


# ls -l mnttt/boot/grub
razem 1460
-rw-r--r-- 1 root root  10528 2013-03-26  acpi.mod
-rw-r--r-- 1 root root   1036 2013-03-26  aout.mod
-rw-r--r-- 1 root root   8320 2013-03-26  ata.mod
-rw-r--r-- 1 root root   2256 2013-03-26  ata_pthru.mod
-rw-r--r-- 1 root root   4568 2013-03-26  at_keyboard.mod
-rw-r--r-- 1 root root   4556 2013-03-26  biosdisk.mod
-rw-r--r-- 1 root root   2444 2013-03-26  bitmap.mod
-rw-r--r-- 1 root root   2992 2013-03-26  bitmap_scale.mod
-rw-r--r-- 1 root root   2080 2013-03-26  blocklist.mod
-rw-r--r-- 1 root root    512 2013-03-26  boot.img
-rw-r--r-- 1 root root   2556 2013-03-26  boot.mod
-rw-r--r-- 1 root root   2116 2013-03-26  btrfs.mod
-rw-r--r-- 1 root root   2024 2013-03-26  bufio.mod
-rw-r--r-- 1 root root   2352 2013-03-26  cat.mod
-rw-r--r-- 1 root root    512 2013-03-26  cdboot.img
-rw-r--r-- 1 root root   2544 2013-03-26  chain.mod
-rw-r--r-- 1 root root   2068 2013-03-26  cmp.mod
-rw-r--r-- 1 root root   2783 2013-03-26  command.lst
-rw-r--r-- 1 root root   2264 2013-03-26  configfile.mod
-rw-r--r-- 1 root root  25618 2013-03-26  core.img
-rw-r--r-- 1 root root   3076 2013-03-26  cpio.mod
-rw-r--r-- 1 root root   1608 2013-03-26  cpuid.mod
-rw-r--r-- 1 root root    825 2013-03-26  crypto.lst
-rw-r--r-- 1 root root   4368 2013-03-26  crypto.mod
-rw-r--r-- 1 root root   4176 2013-03-26  cs5536.mod
-rw-r--r-- 1 root root   1864 2013-03-26  datehook.mod
-rw-r--r-- 1 root root   2272 2013-03-26  date.mod
-rw-r--r-- 1 root root   1177 2013-03-26  datetime.mod
-rw-r--r-- 1 root root    512 2013-03-26  diskboot.img
-rw-r--r-- 1 root root   3580 2013-03-26  dmi.mod
-rw-r--r-- 1 root root   1860 2013-03-26  dm_nv.mod
-rw-r--r-- 1 root root   5504 2013-03-26  drivemap.mod
-rw-r--r-- 1 root root   2036 2013-03-26  echo.mod
-rw-r--r-- 1 root root  25032 2013-03-26  efiemu.mod
-rw-r--r-- 1 root root   4600 2013-03-26  elf.mod
-rw-r--r-- 1 root root   6136 2013-03-26  ext2.mod
-rw-r--r-- 1 root root   4556 2013-03-26  extcmd.mod
-rw-r--r-- 1 root root   6060 2013-03-26  fat.mod
-rw-r--r-- 1 root root   9688 2013-03-26  font.mod
-rw-r--r-- 1 root root   2784 2013-03-26  fshelp.mod
-rw-r--r-- 1 root root    141 2013-03-26  fs.lst
-rw-r--r-- 1 root root   2632 2013-03-26  functional_test.mod
-rw-r--r-- 1 root root   4112 2013-03-26  gettext.mod
-rw-r--r-- 1 root root  39092 2013-03-26  gfxmenu.mod
-rw-r--r-- 1 root root  11396 2013-03-26  gfxterm.mod
-rw-r--r-- 1 root root   3808 2013-03-26  gptsync.mod
-rw-r--r-- 1 root root     31 2013-03-26  grub.cfg
-rw-r--r-- 1 root root 192016 2013-03-26  grub.exe
-rw-r--r-- 1 root root   8412 2013-03-26  gzio.mod
-rw-r--r-- 1 root root   4084 2013-03-26  halt.mod
-rw-r--r-- 1 root root   5236 2013-03-26  hashsum.mod
-rw-r--r-- 1 root root   7408 2013-03-26  hdparm.mod
-rw-r--r-- 1 root root   1204 2013-03-26  hello.mod
-rw-r--r-- 1 root root   2484 2013-03-26  help.mod
-rw-r--r-- 1 root root   3184 2013-03-26  hexdump.mod
-rw-r--r-- 1 root root   7348 2013-03-26  hfs.mod
-rw-r--r-- 1 root root   7684 2013-03-26  hfsplus.mod
-rw-r--r-- 1 root root   2880 2013-03-26  iorw.mod
-rw-r--r-- 1 root root   6488 2013-03-26  iso9660.mod
-rw-r--r-- 1 root root   6096 2013-03-26  jpeg.mod
-rw-r--r-- 1 root root  33684 2013-03-26  kernel.img
-rw-r--r-- 1 root root   4628 2013-03-26  keylayouts.mod
-rw-r--r-- 1 root root   2092 2013-03-26  keystatus.mod
-rw-r--r-- 1 root root  28124 2013-03-26  legacycfg.mod
-rw-r--r-- 1 root root   5620 2013-03-26  linux16.mod
-rw-r--r-- 1 root root  10124 2013-03-26  linux.mod
-rw-r--r-- 1 root root   1024 2013-03-26  lnxboot.img
-rw-r--r-- 1 root root   5776 2013-03-26  loadenv.mod
-rw-r--r-- 1 root root   2952 2013-03-26  loopback.mod
-rw-r--r-- 1 root root   3656 2013-03-26  lsacpi.mod
-rw-r--r-- 1 root root   2228 2013-03-26  lsapm.mod
-rw-r--r-- 1 root root   1744 2013-03-26  lsmmap.mod
-rw-r--r-- 1 root root   4340 2013-03-26  ls.mod
-rw-r--r-- 1 root root   5040 2013-03-26  lspci.mod
-rw-r--r-- 1 root root   6168 2013-03-26  lvm.mod
-rw-r--r-- 1 root root   2064 2013-03-26  memdisk.mod
-rw-r--r-- 1 root root   2868 2013-03-26  memrw.mod
-rw-r--r-- 1 root root   3420 2013-03-26  minicmd.mod
-rw-r--r-- 1 root root   9388 2013-03-26  mmap.mod
-rw-r--r-- 1 root root   3213 2013-03-26  moddep.lst
-rw-r--r-- 1 root root   2412 2013-03-26  msdospart.mod
-rw-r--r-- 1 root root  13104 2013-03-26  multiboot2.mod
-rw-r--r-- 1 root root  12444 2013-03-26  multiboot.mod
-rw-r--r-- 1 root root   6936 2013-03-26  nilfs2.mod
-rw-r--r-- 1 root root 100992 2013-03-26  normal.mod
-rw-r--r-- 1 root root   3696 2013-03-26  ntfscomp.mod
-rw-r--r-- 1 root root   9784 2013-03-26  ntfs.mod
-rw-r--r-- 1 root root   2576 2013-03-26  ntldr.mod
-rw-r--r-- 1 root root  10552 2013-03-26  ohci.mod
-rw-r--r-- 1 root root   2404 2013-03-26  part_apple.mod
-rw-r--r-- 1 root root   2892 2013-03-26  part_bsd.mod
-rw-r--r-- 1 root root   2452 2013-03-26  part_gpt.mod
-rw-r--r-- 1 root root     82 2013-03-26  partmap.lst
-rw-r--r-- 1 root root   2436 2013-03-26  part_msdos.mod
-rw-r--r-- 1 root root     17 2013-03-26  parttool.lst
-rw-r--r-- 1 root root   4508 2013-03-26  parttool.mod
-rw-r--r-- 1 root root   1964 2013-03-26  password.mod
-rw-r--r-- 1 root root   2836 2013-03-26  password_pbkdf2.mod
-rw-r--r-- 1 root root   1328 2013-03-26  pbkdf2.mod
-rw-r--r-- 1 root root   1304 2013-03-26  pci.mod
-rw-r--r-- 1 root root   2488 2013-03-26  play.mod
-rw-r--r-- 1 root root   6460 2013-03-26  png.mod
-rw-r--r-- 1 root root   2680 2013-03-26  probe.mod
-rw-r--r-- 1 root root   1024 2013-03-26  pxeboot.img
-rw-r--r-- 1 root root   1320 2013-03-26  pxecmd.mod
-rw-r--r-- 1 root root   6316 2013-03-26  pxe.mod
-rw-r--r-- 1 root root   1552 2013-03-26  read.mod
-rw-r--r-- 1 root root   1112 2013-03-26  reboot.mod
-rw-r--r-- 1 root root  41684 2013-03-26  regexp.mod
-rw-r--r-- 1 root root  15604 2013-03-26  relocator.mod
-rw-r--r-- 1 root root   4280 2013-03-26  scsi.mod
-rw-r--r-- 1 root root  29524 2013-03-26  sdp.mod
-rw-r--r-- 1 root root   2904 2013-03-26  search_fs_file.mod
-rw-r--r-- 1 root root   2940 2013-03-26  search_fs_uuid.mod
-rw-r--r-- 1 root root   2876 2013-03-26  search_label.mod
-rw-r--r-- 1 root root   2560 2013-03-26  search.mod
-rw-r--r-- 1 root root   7232 2013-03-26  sendkey.mod
-rw-r--r-- 1 root root   7520 2013-03-26  serial.mod
-rw-r--r-- 1 root root    618 2013-03-26  setjmp.mod
-rw-r--r-- 1 root root   5508 2013-03-26  setpci.mod
-rw-r--r-- 1 root root   4624 2013-03-26  sfs.mod
-rw-r--r-- 1 root root   2144 2013-03-26  sleep.mod
-rw-r--r-- 1 root root   3072 2013-03-26  tar.mod
-rw-r--r-- 1 root root    153 2013-03-26  terminal.lst
-rw-r--r-- 1 root root   3932 2013-03-26  terminal.mod
-rw-r--r-- 1 root root  10252 2013-03-26  terminfo.mod
-rw-r--r-- 1 root root   1416 2013-03-26  test_blockarg.mod
-rw-r--r-- 1 root root   2696 2013-03-26  testload.mod
-rw-r--r-- 1 root root   5448 2013-03-26  test.mod
-rw-r--r-- 1 root root   2852 2013-03-26  tga.mod
-rw-r--r-- 1 root root   1687 2013-03-26  trig.mod
-rw-r--r-- 1 root root   1276 2013-03-26  true.mod
-rw-r--r-- 1 root root   6648 2013-03-26  udf.mod
-rw-r--r-- 1 root root   5980 2013-03-26  uhci.mod
-rw-r--r-- 1 root root  30909 2013-03-26  unifont.pf2
-rw-r--r-- 1 root root   4212 2013-03-26  usb_keyboard.mod
-rw-r--r-- 1 root root   9812 2013-03-26  usb.mod
-rw-r--r-- 1 root root   5480 2013-03-26  usbms.mod
-rw-r--r-- 1 root root   2000 2013-03-26  usbserial_common.mod
-rw-r--r-- 1 root root   2412 2013-03-26  usbserial_ftdi.mod
-rw-r--r-- 1 root root   2752 2013-03-26  usbserial_pl2303.mod
-rw-r--r-- 1 root root   3748 2013-03-26  usbtest.mod
-rw-r--r-- 1 root root   8260 2013-03-26  vbe.mod
-rw-r--r-- 1 root root   4784 2013-03-26  vga.mod
-rw-r--r-- 1 root root   2380 2013-03-26  vga_text.mod
-rw-r--r-- 1 root root   5648 2013-03-26  video_bochs.mod
-rw-r--r-- 1 root root   6000 2013-03-26  video_cirrus.mod
-rw-r--r-- 1 root root  18648 2013-03-26  video_fb.mod
-rw-r--r-- 1 root root   3220 2013-03-26  videoinfo.mod
-rw-r--r-- 1 root root     33 2013-03-26  video.lst
-rw-r--r-- 1 root root   5368 2013-03-26  video.mod
-rw-r--r-- 1 root root   4260 2013-03-26  videotest.mod
-rw-r--r-- 1 root root  14044 2013-03-26  xzio.mod


I found how grub was configured before:


#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if  -s $prefix/grubenv ]; then
  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="${saved_entry}"
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 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,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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
else
  search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
fi
    font="/usr/share/grub2/unicode.pf2"
fi
if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=POSIX
  insmod gettext
fi
terminal_output gfxterm
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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
else
  search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
fi
insmod gfxmenu
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
insmod png
set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
export theme
if  x${boot_once} = xtrue ]; then
  set timeout=0
elif sleep --interruptible 0 ; then
  set timeout=2
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE 12.3' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-cdf94d64-d94d-4897-a104-ff17512ef505' {
 load_video
 set gfxpayload=keep
 insmod gzio
 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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
 else
   search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
 fi
 echo 'Loading Linux 3.11.10-7-desktop ...'
 linux /boot/vmlinuz-3.11.10-7-desktop root=UUID=cdf94d64-d94d-4897-a104-ff17512ef505   resume=/dev/disk/by-id/ata-WDC_WD3200BPVT-16JJ5T0_WD-WX91A82N9330-part5 splash=silent quiet showopts
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd-3.11.10-7-desktop
}
submenu 'Advanced options for openSUSE 12.3' $menuentry_id_option 'gnulinux-advanced-cdf94d64-d94d-4897-a104-ff17512ef505' {
 menuentry 'openSUSE 12.3, with Linux 3.11.10-7-desktop' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.10-7-desktop-advanced-cdf94d64-d94d-4897-a104-ff17512ef505' {
  load_video
  set gfxpayload=keep
  insmod gzio
  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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
  else
    search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
  fi
  echo 'Loading Linux 3.11.10-7-desktop ...'
  linux /boot/vmlinuz-3.11.10-7-desktop root=UUID=cdf94d64-d94d-4897-a104-ff17512ef505   resume=/dev/disk/by-id/ata-WDC_WD3200BPVT-16JJ5T0_WD-WX91A82N9330-part5 splash=silent quiet showopts
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd-3.11.10-7-desktop
 }
 menuentry 'openSUSE 12.3, with Linux 3.11.10-7-desktop (recovery mode)' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.10-7-desktop-recovery-cdf94d64-d94d-4897-a104-ff17512ef505' {
  load_video
  set gfxpayload=keep
  insmod gzio
  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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
  else
    search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
  fi
  echo 'Loading Linux 3.11.10-7-desktop ...'
  linux /boot/vmlinuz-3.11.10-7-desktop root=UUID=cdf94d64-d94d-4897-a104-ff17512ef505  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd-3.11.10-7-desktop
 }
 menuentry 'openSUSE 12.3, with Linux 3.11.6-4-desktop' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.6-4-desktop-advanced-cdf94d64-d94d-4897-a104-ff17512ef505' {
  load_video
  set gfxpayload=keep
  insmod gzio
  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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
  else
    search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
  fi
  echo 'Loading Linux 3.11.6-4-desktop ...'
  linux /boot/vmlinuz-3.11.6-4-desktop root=UUID=cdf94d64-d94d-4897-a104-ff17512ef505   resume=/dev/disk/by-id/ata-WDC_WD3200BPVT-16JJ5T0_WD-WX91A82N9330-part5 splash=silent quiet showopts
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd-3.11.6-4-desktop
 }
 menuentry 'openSUSE 12.3, with Linux 3.11.6-4-desktop (recovery mode)' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.6-4-desktop-recovery-cdf94d64-d94d-4897-a104-ff17512ef505' {
  load_video
  set gfxpayload=keep
  insmod gzio
  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 --hint='hd0,msdos6'  cdf94d64-d94d-4897-a104-ff17512ef505
  else
    search --no-floppy --fs-uuid --set=root cdf94d64-d94d-4897-a104-ff17512ef505
  fi
  echo 'Loading Linux 3.11.6-4-desktop ...'
  linux /boot/vmlinuz-3.11.6-4-desktop root=UUID=cdf94d64-d94d-4897-a104-ff17512ef505  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe
  echo 'Loading initial ramdisk ...'
  initrd /boot/initrd-3.11.6-4-desktop
 }
}
### 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+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-48ACD7AFACD795B2' {
 insmod part_msdos
 insmod ntfs
 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 --hint='hd0,msdos1'  48ACD7AFACD795B2
 else
   search --no-floppy --fs-uuid --set=root 48ACD7AFACD795B2
 fi
 chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### 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.
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.CEEFA5E46FE7FAE9AC2CCEF4A5D5EB588D190916FB193DAE0D40A1681683048732D7D24264E670A4CFBC686DE8282A7F4315EAEB533D253009A31FE7D571FBEF.1106A72F254B3EBC61239333D4676FB1AA58B08D5401B427BBA8A0B0BBDE7223822D2A78F0A3E56C5697CD15C49CADA6F3CE17697E4B034171566F97BFF61E91
menuentry "Sec" --unrestricted { 
insmod ext2
set root=(hd0,2) 
chainloader +1 
}
### 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 ###
### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###


But now sytuation is a little different. Before Windows partition was unencrypted and Grub2 discovered Windws automaticaly.

I found how it was configured!!! :slight_smile:


set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.CEEFA5E46FE7FAE9AC2CCEF4A5D5EB588D190916FB193DAE0D40A1681683048732D7D24264E670A4CFBC686DE8282A7F4315EAEB533D253009A31FE7D571FBEF.1106A72F254B3EBC61239333D4676FB1AA58B08D5401B427BBA8A0B0BBDE7223822D2A78F0A3E56C5697CD15C49CADA6F3CE17697E4B034171566F97BFF61E91
menuentry "Sec" --unrestricted { 
insmod ext2
set root=(hd0,2) 
chainloader +1 
}


Thanks for help!

@hcvv, nice hint with this language, thanks!

That is not what my remark was about. I talked about the type of the partition (shown in hex in the Id column and as text in the System column by fdisk -l).

You talk about the file system type you have on the partition (ext2). There is only a remote connection between the two. Most often the partition type for any Linux file system types is 83.

You can see that partition type as a sign of intention on what the partition is (to be) used for. It depends totaly on the software that works with it if it is tested and if there are any consuquenses connected with such a test. Thus I was wondering if such a strange partition type like 95 could be a sign to GRUB to skip it as a partition to look further into.

OK, so it means that I can mark it as 83 and it have to discover it automatically?

You are jumping to conclusions. I did not say that. I said that I wondered why it is strange. And I stated that it could be that GRUB finds it also strange.

First thing to know is of course why it is as it is. Who or what did it, or when was it done, why was it done, etc.
What does it mean (maybe when we know the answer to the first question, we understand this one or vv.).

And then we might come to the conclusion that changing it, is also making it better.

We also might come to the conslusion that it has nothing to do with your problem (but still might better be changed).

I realy do not know. You offer us a problem, and I point to things I find strange and that IMHO need further investigation.

I have no idea why it is like that. This partition is created by program which prvides Windows partition encryption and special boot interface.

I tried to change partition type and it didn’t help grub to discover it. Also with other tryes I totally destroyed Grub :wink:
I think that I’ll leave it like it is with 40_custom configuration. Thanks for your help!

When os-prober discovers Linux it also expects to find bootloader stanzas to load Linux; in this case as it is grub2 it expects to find “linux …” command in menu entry. Because this command does not exist in your case, it outputs nothing.

Every heuristic has its limits …

Only one more question. I have this custom menu entry but I can’t find in any documentation how I can make it default? Any ideas? :wink:

YaST->System->Boot Loader->Boot Loader Options, or the “GRUB_DEFAULT” setting in /etc/default/grub.

But I never tried it with custom menu entries because I have none.