Advertisement
pebriana

grub with MAC OSX

Dec 21st, 2011
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.46 KB | None | 0 0
  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. set default="0"
  14. if [ "${prev_saved_entry}" ]; then
  15.   set saved_entry="${prev_saved_entry}"
  16.   save_env saved_entry
  17.   set prev_saved_entry=
  18.   save_env prev_saved_entry
  19.   set boot_once=true
  20. fi
  21.  
  22. function savedefault {
  23.   if [ -z "${boot_once}" ]; then
  24.     saved_entry="${chosen}"
  25.     save_env saved_entry
  26.   fi
  27. }
  28.  
  29. function recordfail {
  30.   set recordfail=1
  31.   if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
  32. }
  33.  
  34. function load_video {
  35.   insmod vbe
  36.   insmod vga
  37.   insmod video_bochs
  38.   insmod video_cirrus
  39. }
  40.  
  41. insmod part_msdos
  42. insmod ext2
  43. set root='(hd0,msdos1)'
  44. search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  45. if loadfont /usr/share/grub/unicode.pf2 ; then
  46.   set gfxmode=auto
  47.   load_video
  48.   insmod gfxterm
  49.   insmod part_msdos
  50.   insmod ext2
  51.   set root='(hd0,msdos1)'
  52.   search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  53.   set locale_dir=($root)/boot/grub/locale
  54.   set lang=en_US
  55.   insmod gettext
  56. fi
  57. terminal_output gfxterm
  58. if [ "${recordfail}" = 1 ]; then
  59.   set timeout=-1
  60. else
  61.   set timeout=10
  62. fi
  63. ### END /etc/grub.d/00_header ###
  64.  
  65. ### BEGIN /etc/grub.d/05_debian_theme ###
  66. set menu_color_normal=white/black
  67. set menu_color_highlight=black/light-gray
  68. if background_color 44,0,30; then
  69.   clear
  70. fi
  71. ### END /etc/grub.d/05_debian_theme ###
  72.  
  73. ### BEGIN /etc/grub.d/10_linux ###
  74. if [ ${recordfail} != 1 ]; then
  75.   if [ -e ${prefix}/gfxblacklist.txt ]; then
  76.     if hwmatch ${prefix}/gfxblacklist.txt 3; then
  77.       if [ ${match} = 0 ]; then
  78.         set linux_gfx_mode=keep
  79.       else
  80.         set linux_gfx_mode=text
  81.       fi
  82.     else
  83.       set linux_gfx_mode=text
  84.     fi
  85.   else
  86.     set linux_gfx_mode=keep
  87.   fi
  88. else
  89.   set linux_gfx_mode=text
  90. fi
  91. export linux_gfx_mode
  92. if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
  93. menuentry 'Ubuntu, with Linux 3.0.0-15-generic' --class ubuntu --class gnu-linux --class gnu --class os {
  94.     recordfail
  95.     set gfxpayload=$linux_gfx_mode
  96.     insmod gzio
  97.     insmod part_msdos
  98.     insmod ext2
  99.     set root='(hd0,msdos1)'
  100.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  101.     linux   /boot/vmlinuz-3.0.0-15-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro   quiet splash vt.handoff=7
  102.     initrd  /boot/initrd.img-3.0.0-15-generic
  103. }
  104. menuentry 'Ubuntu, with Linux 3.0.0-15-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
  105.     recordfail
  106.     insmod gzio
  107.     insmod part_msdos
  108.     insmod ext2
  109.     set root='(hd0,msdos1)'
  110.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  111.     echo    'Loading Linux 3.0.0-15-generic ...'
  112.     linux   /boot/vmlinuz-3.0.0-15-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro recovery nomodeset
  113.     echo    'Loading initial ramdisk ...'
  114.     initrd  /boot/initrd.img-3.0.0-15-generic
  115. }
  116. submenu "Previous Linux versions" {
  117. menuentry 'Ubuntu, with Linux 3.0.0-14-generic' --class ubuntu --class gnu-linux --class gnu --class os {
  118.     recordfail
  119.     set gfxpayload=$linux_gfx_mode
  120.     insmod gzio
  121.     insmod part_msdos
  122.     insmod ext2
  123.     set root='(hd0,msdos1)'
  124.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  125.     linux   /boot/vmlinuz-3.0.0-14-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro   quiet splash vt.handoff=7
  126.     initrd  /boot/initrd.img-3.0.0-14-generic
  127. }
  128. menuentry 'Ubuntu, with Linux 3.0.0-14-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
  129.     recordfail
  130.     insmod gzio
  131.     insmod part_msdos
  132.     insmod ext2
  133.     set root='(hd0,msdos1)'
  134.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  135.     echo    'Loading Linux 3.0.0-14-generic ...'
  136.     linux   /boot/vmlinuz-3.0.0-14-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro recovery nomodeset
  137.     echo    'Loading initial ramdisk ...'
  138.     initrd  /boot/initrd.img-3.0.0-14-generic
  139. }
  140. menuentry 'Ubuntu, with Linux 3.0.0-13-generic' --class ubuntu --class gnu-linux --class gnu --class os {
  141.     recordfail
  142.     set gfxpayload=$linux_gfx_mode
  143.     insmod gzio
  144.     insmod part_msdos
  145.     insmod ext2
  146.     set root='(hd0,msdos1)'
  147.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  148.     linux   /boot/vmlinuz-3.0.0-13-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro   quiet splash vt.handoff=7
  149.     initrd  /boot/initrd.img-3.0.0-13-generic
  150. }
  151. menuentry 'Ubuntu, with Linux 3.0.0-13-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
  152.     recordfail
  153.     insmod gzio
  154.     insmod part_msdos
  155.     insmod ext2
  156.     set root='(hd0,msdos1)'
  157.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  158.     echo    'Loading Linux 3.0.0-13-generic ...'
  159.     linux   /boot/vmlinuz-3.0.0-13-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro recovery nomodeset
  160.     echo    'Loading initial ramdisk ...'
  161.     initrd  /boot/initrd.img-3.0.0-13-generic
  162. }
  163. menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
  164.     recordfail
  165.     set gfxpayload=$linux_gfx_mode
  166.     insmod gzio
  167.     insmod part_msdos
  168.     insmod ext2
  169.     set root='(hd0,msdos1)'
  170.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  171.     linux   /boot/vmlinuz-3.0.0-12-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro   quiet splash vt.handoff=7
  172.     initrd  /boot/initrd.img-3.0.0-12-generic
  173. }
  174. menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
  175.     recordfail
  176.     insmod gzio
  177.     insmod part_msdos
  178.     insmod ext2
  179.     set root='(hd0,msdos1)'
  180.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  181.     echo    'Loading Linux 3.0.0-12-generic ...'
  182.     linux   /boot/vmlinuz-3.0.0-12-generic root=UUID=1b0a41c1-e491-4cad-b538-97530e5319a1 ro recovery nomodeset
  183.     echo    'Loading initial ramdisk ...'
  184.     initrd  /boot/initrd.img-3.0.0-12-generic
  185. }
  186. }
  187. ### END /etc/grub.d/10_linux ###
  188.  
  189. ### BEGIN /etc/grub.d/20_linux_xen ###
  190. ### END /etc/grub.d/20_linux_xen ###
  191.  
  192. ### BEGIN /etc/grub.d/20_memtest86+ ###
  193. menuentry "Memory test (memtest86+)" {
  194.     insmod part_msdos
  195.     insmod ext2
  196.     set root='(hd0,msdos1)'
  197.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  198.     linux16 /boot/memtest86+.bin
  199. }
  200. menuentry "Memory test (memtest86+, serial console 115200)" {
  201.     insmod part_msdos
  202.     insmod ext2
  203.     set root='(hd0,msdos1)'
  204.     search --no-floppy --fs-uuid --set=root 1b0a41c1-e491-4cad-b538-97530e5319a1
  205.     linux16 /boot/memtest86+.bin console=ttyS0,115200n8
  206. }
  207. ### END /etc/grub.d/20_memtest86+ ###
  208.  
  209. ### BEGIN /etc/grub.d/30_os-prober ###
  210. menuentry "Mac OS X (32-bit) (on /dev/sda8)" --class osx --class darwin --class os {
  211.     insmod part_msdos
  212.     insmod hfsplus
  213.     set root='(hd0,msdos8)'
  214.     search --no-floppy --fs-uuid --set=root 0c7b87cdd58a0d26
  215.         load_video
  216.         set do_resume=0
  217.         if [ /var/vm/sleepimage -nt10 / ]; then
  218.            if xnu_resume /var/vm/sleepimage; then
  219.              set do_resume=1
  220.            fi
  221.         fi
  222.         if [ $do_resume = 0 ]; then
  223.            xnu_uuid 0c7b87cdd58a0d26 uuid
  224.            if [ -f /Extra/DSDT.aml ]; then
  225.               acpi -e /Extra/DSDT.aml
  226.            fi
  227.            xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
  228.            if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
  229.               xnu_mkext /System/Library/Extensions.mkext
  230.            else
  231.               xnu_kextdir /System/Library/Extensions
  232.            fi
  233.            if [ -f /Extra/Extensions.mkext ]; then
  234.               xnu_mkext /Extra/Extensions.mkext
  235.            fi
  236.            if [ -d /Extra/Extensions ]; then
  237.               xnu_kextdir /Extra/Extensions
  238.            fi
  239.            if [ -f /Extra/devprop.bin ]; then
  240.               xnu_devprop_load /Extra/devprop.bin
  241.            fi
  242.            if [ -f /Extra/splash.jpg ]; then
  243.               insmod jpeg
  244.               xnu_splash /Extra/splash.jpg
  245.            fi
  246.            if [ -f /Extra/splash.png ]; then
  247.               insmod png
  248.               xnu_splash /Extra/splash.png
  249.            fi
  250.            if [ -f /Extra/splash.tga ]; then
  251.               insmod tga
  252.               xnu_splash /Extra/splash.tga
  253.            fi
  254.         fi
  255. }
  256. menuentry "Mac OS X (64-bit) (on /dev/sda8)" --class osx --class darwin --class os {
  257.     insmod part_msdos
  258.     insmod hfsplus
  259.     set root='(hd0,msdos8)'
  260.     search --no-floppy --fs-uuid --set=root 0c7b87cdd58a0d26
  261.         load_video
  262.         set do_resume=0
  263.         if [ /var/vm/sleepimage -nt10 / ]; then
  264.            if xnu_resume /var/vm/sleepimage; then
  265.              set do_resume=1
  266.            fi
  267.         fi
  268.         if [ $do_resume = 0 ]; then
  269.            xnu_uuid 0c7b87cdd58a0d26 uuid
  270.            if [ -f /Extra/DSDT.aml ]; then
  271.               acpi -e /Extra/DSDT.aml
  272.            fi
  273.            xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
  274.            if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
  275.               xnu_mkext /System/Library/Extensions.mkext
  276.            else
  277.               xnu_kextdir /System/Library/Extensions
  278.            fi
  279.            if [ -f /Extra/Extensions.mkext ]; then
  280.               xnu_mkext /Extra/Extensions.mkext
  281.            fi
  282.            if [ -d /Extra/Extensions ]; then
  283.               xnu_kextdir /Extra/Extensions
  284.            fi
  285.            if [ -f /Extra/devprop.bin ]; then
  286.               xnu_devprop_load /Extra/devprop.bin
  287.            fi
  288.            if [ -f /Extra/splash.jpg ]; then
  289.               insmod jpeg
  290.               xnu_splash /Extra/splash.jpg
  291.            fi
  292.            if [ -f /Extra/splash.png ]; then
  293.               insmod png
  294.               xnu_splash /Extra/splash.png
  295.            fi
  296.            if [ -f /Extra/splash.tga ]; then
  297.               insmod tga
  298.               xnu_splash /Extra/splash.tga
  299.            fi
  300.         fi
  301. }
  302.  
  303. menuentry "MacOsX 10.7.0" --class osx --class darwin --class os {
  304.     insmod hfsplus
  305.     set root='(hd0,7)'
  306.     multiboot /boot
  307. }
  308.  
  309. ### END /etc/grub.d/30_os-prober ###
  310.  
  311. ### BEGIN /etc/grub.d/40_custom ###
  312. # This file provides an easy way to add custom menu entries.  Simply type the
  313. # menu entries you want to add after this comment.  Be careful not to change
  314. # the 'exec tail' line above.
  315. ### END /etc/grub.d/40_custom ###
  316.  
  317. ### BEGIN /etc/grub.d/41_custom ###
  318. if [ -f  $prefix/custom.cfg ]; then
  319.   source $prefix/custom.cfg;
  320. fi
  321. ### END /etc/grub.d/41_custom ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement