Guest User

Untitled

a guest
Oct 31st, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1.  
  2. if [ "${grub_platform}" == "efi" ]; then
  3. set _UEFI_ARCH="${grub_cpu}"
  4.  
  5. if [ "${grub_cpu}" == "x86_64" ]; then
  6. set _SPEC_UEFI_ARCH="x64"
  7. fi
  8.  
  9. if [ "${grub_cpu}" == "i386" ]; then
  10. set _SPEC_UEFI_ARCH="ia32"
  11. fi
  12. fi
  13.  
  14.  
  15. insmod part_gpt
  16. insmod part_msdos
  17.  
  18. # Include fat fs module - required for uefi systems.
  19. insmod fat
  20.  
  21. insmod ext2
  22. insmod ext2
  23. insmod ext2
  24.  
  25. insmod search_fs_file
  26. insmod search_fs_uuid
  27. insmod search_label
  28.  
  29. insmod linux
  30. insmod chain
  31.  
  32. set pager="1"
  33. # set debug="all"
  34.  
  35. set locale_dir="${prefix}/locale"
  36.  
  37.  
  38. if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
  39. insmod all_video
  40. else
  41. if [ "${grub_platform}" == "efi" ]; then
  42. insmod efi_gop
  43. insmod efi_uga
  44. fi
  45.  
  46. if [ "${grub_platform}" == "pc" ]; then
  47. insmod vbe
  48. insmod vga
  49. fi
  50.  
  51. insmod video_bochs
  52. insmod video_cirrus
  53. fi
  54.  
  55. insmod font
  56.  
  57. search --fs-uuid --no-floppy --set=usr_part --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3 3dbb419b-1690-48dd-82ad-263bbd970727
  58. search --fs-uuid --no-floppy --set=root_part --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3 3dbb419b-1690-48dd-82ad-263bbd970727
  59.  
  60. if [ -e "(${usr_part})/share/grub/unicode.pf2" ]; then
  61. set _fontfile="(${usr_part})/share/grub/unicode.pf2"
  62. else
  63. if [ -e "(${root_part})/usr/share/grub/unicode.pf2" ]; then
  64. set _fontfile="(${root_part})/usr/share/grub/unicode.pf2"
  65. else
  66. if [ -e "${prefix}/fonts/unicode.pf2" ]; then
  67. set _fontfile="${prefix}/fonts/unicode.pf2"
  68. fi
  69. fi
  70. fi
  71.  
  72. if loadfont "${_fontfile}" ; then
  73. insmod gfxterm
  74. set gfxmode="auto"
  75.  
  76. terminal_input console
  77. terminal_output gfxterm
  78. fi
  79.  
  80.  
  81. # DEVICE DETAILS: /dev/sda1 PARTUUID=834b09f6-bc7a-4c44-beb2-47dd6b4ddd84 PARTLABEL= UUID=d90a88f1-e83a-490c-8105-9bd3ce4fa09e LABEL=home
  82. # DEVICE DETAILS: /dev/sdb1 PARTUUID=962a147e-d71b-4b59-a7e9-c96483a8025f PARTLABEL= UUID=1B28-CD02 LABEL=ESP
  83. # DEVICE DETAILS: /dev/sdb2 PARTUUID=279f2783-2340-48e6-8c3f-aec17ffbe25b PARTLABEL=Linux filesystem UUID=d7ded2c3-493f-4065-b3bd-eed30284b261 LABEL=boot
  84. # DEVICE DETAILS: /dev/sdb3 PARTUUID=63b978e4-769f-4c62-b2bc-c54869e44a83 PARTLABEL=Linux filesystem UUID=3dbb419b-1690-48dd-82ad-263bbd970727 LABEL=system
  85.  
  86.  
  87. # (0) Arch Linux
  88. menuentry "Arch Linux" {
  89. set gfxpayload="keep"
  90. set root=(hostdisk//dev/sdb,gpt2)
  91. linux /vmlinuz-linux root=/dev/sdb3 rootflags=,relatime,data=ordered rootfstype=ext4 ro
  92. initrd /initramfs-linux.img
  93. }
  94.  
  95.  
  96. # (1) Arch Linux Fallback
  97. menuentry "Arch Linux Fallback" {
  98. set gfxpayload="keep"
  99. set root=(hostdisk//dev/sdb,gpt2)
  100. linux /vmlinuz-linux root=/dev/sdb3 rootflags=,relatime,data=ordered rootfstype=ext4 ro
  101. initrd /initramfs-linux-fallback.img
  102. }
  103.  
  104.  
  105. if [ "${grub_platform}" == "efi" ]; then
  106.  
  107. ## UEFI Shell 2.0
  108. ## Will work only in grub(2) uefi
  109. #menuentry "UEFI ${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" {
  110. # search --fs-uuid --no-floppy --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 4D5A-873C
  111. # chainloader /efi/tools/shell${_SPEC_UEFI_ARCH}.efi
  112. #}
  113.  
  114. ## UEFI Shell 1.0
  115. ## Will work only in grub(2) uefi
  116. #menuentry "UEFI ${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" {
  117. # search --fs-uuid --no-floppy --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 4D5A-873C
  118. # chainloader /efi/tools/shell${_SPEC_UEFI_ARCH}_old.efi
  119. #}
  120.  
  121. fi
  122.  
  123.  
  124. if [ "${grub_platform}" == "efi" ]; then
  125.  
  126. ## Windows x86_64 UEFI
  127. ## Will work only in grub(2) uefi x86_64
  128. #menuentry \"Microsoft Windows x86_64 UEFI-GPT\" {
  129. # insmod part_gpt
  130. # insmod fat
  131. # insmod search_fs_uuid
  132. # insmod chain
  133. # search --fs-uuid --no-floppy --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 4D5A-873C
  134. # chainloader /efi/Microsoft/Boot/bootmgfw.efi
  135. #}
  136.  
  137. fi
  138.  
  139.  
  140. if [ "${grub_platform}" == "pc" ]; then
  141.  
  142. ## Windows BIOS
  143. ## Will work only in grub(2) bios
  144. #menuentry \"Microsoft Windows 7 BIOS-MBR\" {
  145. # insmod part_msdos
  146. # insmod ntfs
  147. # insmod search_fs_uuid
  148. # insmod ntldr
  149. # search --fs-uuid --no-floppy --set=root 69B235F6749E84CE
  150. # ntldr /bootmgr
  151. #}
  152.  
  153. fi
Advertisement
Add Comment
Please, Sign In to add comment