insmod search insmod echo insmod terminal insmod test insmod font insmod loadenv insmod serial insmod usb_keyboard insmod linux insmod gzio insmod fat insmod ext2 set default="boot" set timeout="5" set timeout_style="menu" set vesa_mode=1 if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ]; then set default="${next_entry}" unset next_entry save_env next_entry fi if [ "${vesa_mode}" ]; then set vesa_mode=${vesa_mode} 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 } load_video if loadfont unicode; then set gfxmode=auto insmod gfxterm terminal_output gfxterm fi set menu_color_normal=light-cyan/dark-gray set menu_color_highlight=black/cyan if serial --unit=0 --speed=115200; then terminal_input --append serial_com0 terminal_output --append serial_com0 fi function set_gfxpayload { if [ ${vesa_mode} -eq 1 ]; then set gfxpayload=keep else set gfxpayload=text fi } set RR_CMDLINE="console=tty2 root=/dev/ram net.ifnames=0" search --set=root --label "RR3" if [ -s /zImage-dsm -a -s /initrd-dsm ]; then if [ "${default}" = "direct" ]; then set timeout="1" menuentry 'Boot DSM kernel directly' --id direct { set_gfxpayload echo "cmdline:" echo "${dsm_cmdline}" echo "Loading DSM kernel..." linux /zImage-dsm ${dsm_cmdline} echo "Loading DSM initramfs..." initrd /initrd-dsm echo "Booting..." echo "Access http://find.synology.com/ to connect the DSM via web." } fi menuentry 'Boot DSM' --id boot { set_gfxpayload echo "Loading kernel..." linux /bzImage-rr ${RR_CMDLINE} echo "Loading initramfs..." initrd /initrd-rr echo "Booting..." } menuentry 'Boot Recovery' --id recovery { set_gfxpayload echo "Loading kernel..." linux /bzImage-rr ${RR_CMDLINE} recovery echo "Loading initramfs..." initrd /initrd-rr echo "Booting..." } menuentry 'Force re-install DSM' --id junior { set_gfxpayload echo "Loading kernel..." linux /bzImage-rr ${RR_CMDLINE} force_junior echo "Loading initramfs..." initrd /initrd-rr echo "Booting..." } fi menuentry 'Configure loader' --id config { set_gfxpayload echo "Loading kernel..." linux /bzImage-rr ${RR_CMDLINE} IWANTTOCHANGETHECONFIG echo "Loading initramfs..." initrd /initrd-rr echo "Booting..." } if [ ${vesa_mode} = 1 ]; then menuentry 'Change vesa to text video mode' --id videomode { set vesa_mode=0 save_env vesa_mode configfile ${prefix}/grub.cfg } else menuentry 'Change text to vesa video mode' --id videomode { set vesa_mode=1 save_env vesa_mode reboot configfile ${prefix}/grub.cfg } fi