<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Grub2 параметры cmdline]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=18692&amp;type=atom" />
	<updated>2011-12-10T02:18:45Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=18692</id>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=233495#p233495" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>newzenon пишет:</cite><blockquote><p>...например для того чтобы он показывал фоном картинку в меню надо тупо в какой-то каталог ее скопировать, забыл в какой.</p></blockquote></div><p><a href="http://linuxforum.ru/viewtopic.php?id=12148">http://linuxforum.ru/viewtopic.php?id=12148</a></p>]]></content>
			<author>
				<name><![CDATA[SamuelLinux]]></name>
				<uri>https://linuxforum.ru/profile.php?id=4309</uri>
			</author>
			<updated>2011-12-10T02:18:45Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=233495#p233495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=233020#p233020" />
			<content type="html"><![CDATA[<p>Подитожу: <strong>Grub2 может очень много, документирован отвратно,</strong> о таких вещах как эта приходится доперать самому, например для того чтобы он показывал фоном картинку в меню надо тупо в какой-то каталог ее скопировать, забыл в какой.</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-09T08:44:24Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=233020#p233020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=233014#p233014" />
			<content type="html"><![CDATA[<p>Вот смотрим:<br /></p><div class="codebox"><pre><code>$ cat /mnt/gentoo/etc/default/grub
GRUB_DEFAULT=&quot;0&quot;
GRUB_HIDDEN_TIMEOUT_QUIET=&quot;false&quot;
GRUB_TIMEOUT=&quot;10&quot;

GRUB_BACKGROUND=&quot;/boot/grub2/for-grub-1600-1200-0057-1080p.png&quot;
GRUB_CMDLINE_LINUX=&quot;splash quiet vga=795 noapic acpi=off&quot;
GRUB_CMDLINE_LINUX_DEFAULT=&quot;splash quiet vga=795 noapic acpi=off&quot;
GRUB_GFXMODE=&quot;1024x768&quot;</code></pre></div><p>Вот что сгенерировал update-grub:</p><div class="codebox"><pre><code>$ cat /mnt/gentoo/boot/grub2/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
  load_env
fi
set default=&quot;0&quot;
if [ &quot;${prev_saved_entry}&quot; ]; then
  set saved_entry=&quot;${prev_saved_entry}&quot;
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z &quot;${boot_once}&quot; ]; then
    saved_entry=&quot;${chosen}&quot;
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root=&#039;(hd0,msdos10)&#039;
search --no-floppy --fs-uuid --set=root 6f9c97fe-bea8-467f-a3be-5a124224970a
if loadfont /share/grub2/unicode.pf2 ; then
  set gfxmode=1024x768
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod reiserfs
set root=&#039;(hd1,msdos1)&#039;
search --no-floppy --fs-uuid --set=root ead6564b-03af-44a6-b645-1c948bd47cca
insmod png
background_image -m stretch /boot/grub2/for-grub-1600-1200-0057-1080p.png
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux_proxy ###
menuentry &quot;GNU/Linux, с Linux x86_64-3.1.2-zen+&quot; --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd1,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root ead6564b-03af-44a6-b645-1c948bd47cca
    echo    &#039;Загружается Linux x86_64-3.1.2-zen+ ...&#039;
    linux    /boot/kernel-genkernel-x86_64-3.1.2-zen+ root=/dev/sdb1 ro splash quiet vga=795 noapic acpi=off splash quiet vga=795 noapic acpi=off
    echo    &#039;Загружается начальный ramdisk ...&#039;
    initrd    /boot/initramfs-genkernel-x86_64-3.1.2-zen+
}
menuentry &quot;GNU/Linux, с Linux x86_64-3.1.2-zen+ (режим восстановления)&quot; --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd1,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root ead6564b-03af-44a6-b645-1c948bd47cca
    echo    &#039;Загружается Linux x86_64-3.1.2-zen+ ...&#039;
    linux    /boot/kernel-genkernel-x86_64-3.1.2-zen+ root=/dev/sdb1 ro single splash quiet vga=795 noapic acpi=off
    echo    &#039;Загружается начальный ramdisk ...&#039;
    initrd    /boot/initramfs-genkernel-x86_64-3.1.2-zen+
}
menuentry &quot;GNU/Linux, с Linux x86_64-3.1.1-gentoo&quot; --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd1,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root ead6564b-03af-44a6-b645-1c948bd47cca
    echo    &#039;Загружается Linux x86_64-3.1.1-gentoo ...&#039;
    linux    /boot/kernel-genkernel-x86_64-3.1.1-gentoo root=/dev/sdb1 ro splash quiet vga=795 noapic acpi=off splash quiet vga=795 noapic acpi=off
    echo    &#039;Загружается начальный ramdisk ...&#039;
    initrd    /boot/initramfs-genkernel-x86_64-3.1.1-gentoo
}
menuentry &quot;GNU/Linux, с Linux x86_64-3.1.1-gentoo (режим восстановления)&quot; --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd1,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root ead6564b-03af-44a6-b645-1c948bd47cca
    echo    &#039;Загружается Linux x86_64-3.1.1-gentoo ...&#039;
    linux    /boot/kernel-genkernel-x86_64-3.1.1-gentoo root=/dev/sdb1 ro single splash quiet vga=795 noapic acpi=off
    echo    &#039;Загружается начальный ramdisk ...&#039;
    initrd    /boot/initramfs-genkernel-x86_64-3.1.1-gentoo
}
### END /etc/grub.d/10_linux_proxy ###

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

### BEGIN /etc/grub.d/30_os-prober_proxy ###
menuentry &quot;Debian GNU/Linux, with Linux 3.1-1.slh.1-aptosid-amd64 (on /dev/sda1)&quot; --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd0,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root 0b72ab7e-7dc7-4afb-96f2-c5d4bc376655
    linux /boot/vmlinuz-3.1-1.slh.1-aptosid-amd64 root=UUID=0b72ab7e-7dc7-4afb-96f2-c5d4bc376655 ro quiet vga=792 nomodeset nouveau.modeset=0
    initrd /boot/initrd.img-3.1-1.slh.1-aptosid-amd64
}
menuentry &quot;Gentoo Base System release 2.1 (on /dev/sda7)&quot; --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd0,msdos7)&#039;
    search --no-floppy --fs-uuid --set=root f960b405-1099-4d92-916a-9ed39bf2e9f1
    linux /boot/kernel-genkernel-x86_64-2.6.38.5-zen-libre root=/dev/sda7
    initrd /boot/initramfs-genkernel-x86_64-2.6.38.5-zen-libre
}
menuentry &quot;Gentoo Base System release 2.1 (on /dev/sda7) ZEN-KERNEL 3.1.4&quot; --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd0,msdos7)&#039;
    search --no-floppy --fs-uuid --set=root f960b405-1099-4d92-916a-9ed39bf2e9f1
    linux /boot/kernel-genkernel-x86_64-3.1.4-zen+ root=/dev/sda7
    initrd /boot/initramfs-genkernel-x86_64-3.1.4-zen+
}
menuentry &quot;Debian GNU/Linux, with Linux 3.0-4.slh.3-aptosid-amd64 (on /dev/sda1)&quot; --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root=&#039;(hd0,msdos1)&#039;
    search --no-floppy --fs-uuid --set=root 0b72ab7e-7dc7-4afb-96f2-c5d4bc376655
    linux /boot/vmlinuz-3.0-4.slh.3-aptosid-amd64 root=UUID=0b72ab7e-7dc7-4afb-96f2-c5d4bc376655 ro quiet vga=792 nomodeset nouveau.modeset=0
    initrd /boot/initrd.img-3.0-4.slh.3-aptosid-amd64
}
### END /etc/grub.d/30_os-prober_proxy ###

### 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 &#039;exec tail&#039; line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###</code></pre></div><p>Для раздела на котром сам grub2 строчка:<br /></p><div class="codebox"><pre><code>linux    /boot/kernel-genkernel-x86_64-3.1.2-zen+ root=/dev/sdb1 ro splash quiet vga=795 noapic acpi=off splash quiet vga=795 noapic acpi=off</code></pre></div><p>Для Debian почему-то проигнорировал GRUB_DISABLE_LINUX_UUID=&quot;true&quot; и на CMDLINE тоже игнор:<br /></p><div class="codebox"><pre><code>linux /boot/vmlinuz-3.1-1.slh.1-aptosid-amd64 root=UUID=0b72ab7e-7dc7-4afb-96f2-c5d4bc376655 ro quiet vga=792 nomodeset</code></pre></div><p>Для Gentoo:</p><div class="codebox"><pre><code>linux /boot/kernel-genkernel-x86_64-3.1.4-zen+ root=/dev/sda7</code></pre></div><p>Вывод, - по ходу update-grub выполняя сценарий os_prober заползает в разделы Linux и в каждом разделе ищет /etc/default/grub? Во всех ли дистрибутивах этот файло есть?</p><p>Почему так решил, потому что на разделе Debian как раз параметры<br /></p><div class="codebox"><pre><code>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet vga=792 nomodeset nouveau.modeset=0&quot;</code></pre></div><p>На разделе /dev/sda7 с Gentoo этого файла вообще нет.<br />Такие дела.</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-09T08:36:35Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=233014#p233014</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232848#p232848" />
			<content type="html"><![CDATA[<p>Особо не вникал в вышеописанное, но если память не изменяет, то:<br /></p><div class="codebox"><pre><code>GRUB_CMDLINE_LINUX_DEFAULT=&quot;&quot;</code></pre></div><p>Для ядра&nbsp; загружаемое по умолчанию;<br /></p><div class="codebox"><pre><code>GRUB_CMDLINE_LINUX=&quot;&quot;</code></pre></div><p>Для всех остальных ядер.</p>]]></content>
			<author>
				<name><![CDATA[aliaksei1818]]></name>
				<uri>https://linuxforum.ru/profile.php?id=15716</uri>
			</author>
			<updated>2011-12-08T18:06:28Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232848#p232848</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232622#p232622" />
			<content type="html"><![CDATA[<p>Стормозил тут <a href="http://linuxforum.ru/viewtopic.php?pid=232456#p232456">http://linuxforum.ru/viewtopic.php?pid=232456#p232456</a>, не тот скрипт за это отвечает, а этот /etc/grub.d/proxifiedScripts/os-prober<br />Весь:<br /></p><div class="codebox"><pre><code>#! /bin/sh
set -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see &lt;http://www.gnu.org/licenses/&gt;.

prefix=/usr
exec_prefix=${prefix}
libdir=/lib64

. ${libdir}/grub/grub-mkconfig_lib

if [ &quot;x${GRUB_DISABLE_OS_PROBER}&quot; = &quot;xtrue&quot; ]; then
  exit 0
fi

if [ -z &quot;`which os-prober 2&gt; /dev/null`&quot; -o -z &quot;`which linux-boot-prober 2&gt; /dev/null`&quot; ] ; then
  # missing os-prober and/or linux-boot-prober
  exit 0
fi

OSPROBED=&quot;`os-prober | tr &#039; &#039; &#039;^&#039; | paste -s -d &#039; &#039;`&quot;
if [ -z &quot;${OSPROBED}&quot; ] ; then
  # empty os-prober output, nothing doing
  exit 0
fi

osx_entry() {
        cat &lt;&lt; EOF
menuentry &quot;${LONGNAME} (${2}-bit) (on ${DEVICE})&quot; --class osx --class darwin --class os {
EOF
    save_default_entry | sed -e &quot;s/^/\t/&quot;
    prepare_grub_to_access_device ${DEVICE} | sed -e &quot;s/^/\t/&quot;
    cat &lt;&lt; EOF
        load_video
        set do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             set do_resume=1
           fi
        fi
        if [ \$do_resume = 0 ]; then
           xnu_uuid ${OSXUUID} uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           $1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
           if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
              xnu_mkext /System/Library/Extensions.mkext
           else
              xnu_kextdir /System/Library/Extensions
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devprop.bin ]; then
              xnu_devprop_load /Extra/devprop.bin
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
EOF
}

for OS in ${OSPROBED} ; do
  DEVICE=&quot;`echo ${OS} | cut -d &#039;:&#039; -f 1`&quot;
  LONGNAME=&quot;`echo ${OS} | cut -d &#039;:&#039; -f 2 | tr &#039;^&#039; &#039; &#039;`&quot;
  LABEL=&quot;`echo ${OS} | cut -d &#039;:&#039; -f 3 | tr &#039;^&#039; &#039; &#039;`&quot;
  BOOT=&quot;`echo ${OS} | cut -d &#039;:&#039; -f 4`&quot;

  if [ -z &quot;${LONGNAME}&quot; ] ; then
    LONGNAME=&quot;${LABEL}&quot;
  fi

  echo &quot;Found ${LONGNAME} on ${DEVICE}&quot; &gt;&amp;2

  case ${BOOT} in
    chain)

      cat &lt;&lt; EOF
menuentry &quot;${LONGNAME} (on ${DEVICE})&quot; --class windows --class os {
EOF
      save_default_entry | sed -e &quot;s/^/\t/&quot;
      prepare_grub_to_access_device ${DEVICE} | sed -e &quot;s/^/\t/&quot;

      case ${LONGNAME} in
    Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
    ;;
    *)
      cat &lt;&lt; EOF
    drivemap -s (hd0) \${root}
EOF
    ;;
      esac

      cat &lt;&lt;EOF
    chainloader +1
}
EOF
    ;;
    linux)
      LINUXPROBED=&quot;`linux-boot-prober ${DEVICE} 2&gt; /dev/null | tr &#039; &#039; &#039;^&#039; | paste -s -d &#039; &#039;`&quot;
      prepare_boot_cache=

      for LINUX in ${LINUXPROBED} ; do
        LROOT=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 1`&quot;
        LBOOT=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 2`&quot;
        LLABEL=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 3 | tr &#039;^&#039; &#039; &#039;`&quot;
        LKERNEL=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 4`&quot;
        LINITRD=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 5`&quot;
        LPARAMS=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 6- | tr &#039;^&#039; &#039; &#039;`&quot;

        if [ -z &quot;${LLABEL}&quot; ] ; then
          LLABEL=&quot;${LONGNAME}&quot;
        fi

    if [ &quot;${LROOT}&quot; != &quot;${LBOOT}&quot; ]; then
      LKERNEL=&quot;${LKERNEL#/boot}&quot;
      LINITRD=&quot;${LINITRD#/boot}&quot;
    fi

        cat &lt;&lt; EOF
menuentry &quot;${LLABEL} (on ${DEVICE})&quot; --class gnu-linux --class gnu --class os {
EOF
    save_default_entry | sed -e &quot;s/^/\t/&quot;
    if [ -z &quot;${prepare_boot_cache}&quot; ]; then
      prepare_boot_cache=&quot;$(prepare_grub_to_access_device ${LBOOT} | sed -e &quot;s/^/\t/&quot;)&quot;
    fi
    printf &#039;%s\n&#039; &quot;${prepare_boot_cache}&quot;
    cat &lt;&lt;  EOF
    linux ${LKERNEL} ${LPARAMS}
EOF
        if [ -n &quot;${LINITRD}&quot; ] ; then
          cat &lt;&lt; EOF
    initrd ${LINITRD}
EOF
        fi
        cat &lt;&lt; EOF
}
EOF
      done
    ;;
    macosx)
      OSXUUID=&quot;`${grub_probe} --target=fs_uuid --device ${DEVICE} 2&gt; /dev/null`&quot;
      osx_entry xnu_kernel 32
      osx_entry xnu_kernel64 64
    ;;
    hurd)
      cat &lt;&lt; EOF
menuentry &quot;${LONGNAME} (on ${DEVICE})&quot; --class hurd --class gnu --class os {
EOF
      save_default_entry | sed -e &quot;s/^/\t/&quot;
      prepare_grub_to_access_device ${DEVICE} | sed -e &quot;s/^/\t/&quot;
      grub_device=&quot;`${grub_probe} --device ${DEVICE} --target=drive`&quot;
      mach_device=&quot;`echo &quot;${grub_device}&quot; | sed -e &#039;s/(\(hd.*\),msdos\(.*\))/\1s\2/&#039;`&quot;
      grub_fs=&quot;`${grub_probe} --device ${DEVICE} --target=fs`&quot;
      case &quot;${grub_fs}&quot; in
    *fs)    hurd_fs=&quot;${grub_fs}&quot; ;;
    *)    hurd_fs=&quot;${grub_fs}fs&quot; ;;
      esac
      cat &lt;&lt; EOF
    multiboot /boot/gnumach.gz root=device:${mach_device}
    module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
            --multiboot-command-line=&#039;\${kernel-command-line}&#039; \\
            --host-priv-port=&#039;\${host-port}&#039; \\
            --device-master-port=&#039;\${device-port}&#039; \\
            --exec-server-task=&#039;\${exec-task}&#039; -T typed &#039;\${root}&#039; \\
            &#039;\$(task-create)&#039; &#039;\$(task-resume)&#039;
    module /lib/ld.so.1 exec /hurd/exec &#039;\$(exec-task=task-create)&#039;
}
EOF
    ;;
    *)
      echo &quot;  ${LONGNAME} is not yet supported by grub-mkconfig.&quot; &gt;&amp;2
    ;;
  esac
done
&gt;       </code></pre></div><p>За линуксовые ядра отвечает сие:<br /></p><div class="codebox"><pre><code>    linux)
      LINUXPROBED=&quot;`linux-boot-prober ${DEVICE} 2&gt; /dev/null | tr &#039; &#039; &#039;^&#039; | paste -s -d &#039; &#039;`&quot;
      prepare_boot_cache=

      for LINUX in ${LINUXPROBED} ; do
        LROOT=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 1`&quot;
        LBOOT=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 2`&quot;
        LLABEL=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 3 | tr &#039;^&#039; &#039; &#039;`&quot;
        LKERNEL=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 4`&quot;
        LINITRD=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 5`&quot;
        LPARAMS=&quot;`echo ${LINUX} | cut -d &#039;:&#039; -f 6- | tr &#039;^&#039; &#039; &#039;`&quot;

        if [ -z &quot;${LLABEL}&quot; ] ; then
          LLABEL=&quot;${LONGNAME}&quot;
        fi

    if [ &quot;${LROOT}&quot; != &quot;${LBOOT}&quot; ]; then
      LKERNEL=&quot;${LKERNEL#/boot}&quot;
      LINITRD=&quot;${LINITRD#/boot}&quot;
    fi

        cat &lt;&lt; EOF</code></pre></div><p>Наверное только скрипт изменять придеться, а конкректно<br />это<br /></p><div class="codebox"><pre><code>LKERNEL=&quot;${LKERNEL#/boot}&quot;</code></pre></div><p>на</p><div class="codebox"><pre><code>LKERNEL=&quot;${LKERNEL#/boot} ${GRUB_CMDLINE_LINUX_DEFAULT}&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T12:42:56Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232622#p232622</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232514#p232514" />
			<content type="html"><![CDATA[<p><strong>newzenon</strong>, я тебе уже ссылки дал почитать, что где прописать и как. А ты все упираешься.</p>]]></content>
			<author>
				<name><![CDATA[i2ks]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16</uri>
			</author>
			<updated>2011-12-08T10:06:56Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232514#p232514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232512#p232512" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>redux пишет:</cite><blockquote><p>Если ядра на других разделах,то может тогда и загрузчики туда поставить свои, чтоб основной загрузчик им управление передавал? (Хотя извращение- не спорю).</p></blockquote></div><p>Да, это уже каша будет.<br />Кстати недосмотрел, <s>ядра-то получают параметр</s>, вот какой конфиг генерирует update-grub для других ядер у меня (это кусок grub.cfg и результат работы грубовского 30_os-prober_proxy)</p><div class="codebox"><pre><code>### BEGIN /etc/grub.d/30_os-prober_proxy ###
menuentry &quot;Debian GNU/Linux, with Linux 3.1-1.slh.1-aptosid-amd64 (on /dev/sda1)&quot; --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod reiserfs
        set root=&#039;(hd0,msdos1)&#039;
        search --no-floppy --fs-uuid --set=root 0b72ab7e-7dc7-4afb-96f2-c5d4bc376655
        linux /boot/vmlinuz-3.1-1.slh.1-aptosid-amd64 root=UUID=0b72ab7e-7dc7-4afb-96f2-c5d4bc376655 ro quiet vga=792 nomodeset nouveau.modeset=0
        initrd /boot/initrd.img-3.1-1.slh.1-aptosid-amd64
}
menuentry &quot;Gentoo Base System release 2.1 (on /dev/sda7)&quot; --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod reiserfs
        set root=&#039;(hd0,msdos7)&#039;
        search --no-floppy --fs-uuid --set=root f960b405-1099-4d92-916a-9ed39bf2e9f1
        linux /boot/kernel-genkernel-x86_64-2.6.38.5-zen-libre root=/dev/sda7
        initrd /boot/initramfs-genkernel-x86_64-2.6.38.5-zen-libre
}
menuentry &quot;Gentoo Base System release 2.1 (on /dev/sda7)&quot; --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod reiserfs
        set root=&#039;(hd0,msdos7)&#039;
        search --no-floppy --fs-uuid --set=root f960b405-1099-4d92-916a-9ed39bf2e9f1
        linux /boot/kernel-genkernel-x86_64-3.1.4-zen+ root=/dev/sda7
        initrd /boot/initramfs-genkernel-x86_64-3.1.4-zen+
}
menuentry &quot;Debian GNU/Linux, with Linux 3.0-4.slh.3-aptosid-amd64 (on /dev/sda1)&quot; --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod reiserfs
        set root=&#039;(hd0,msdos1)&#039;
        search --no-floppy --fs-uuid --set=root 0b72ab7e-7dc7-4afb-96f2-c5d4bc376655
        linux /boot/vmlinuz-3.0-4.slh.3-aptosid-amd64 root=UUID=0b72ab7e-7dc7-4afb-96f2-c5d4bc376655 ro quiet vga=792 nomodeset nouveau.modeset=0
        initrd /boot/initrd.img-3.0-4.slh.3-aptosid-amd64
}
### END /etc/grub.d/30_os-prober_proxy ###</code></pre></div><p>Значит тут ещё что-то не так.</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T10:05:41Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232512#p232512</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232507#p232507" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>newzenon пишет:</cite><blockquote><p>Ядра на других разделах не получают этот параметр.</p></blockquote></div><p>Если ядра на других разделах,то может тогда и загрузчики туда поставить свои, чтоб основной загрузчик им управление передавал? (Хотя извращение- не спорю).<br />UPD: фигню сказал, оказывается я так не умею.</p>]]></content>
			<author>
				<name><![CDATA[redux]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11302</uri>
			</author>
			<updated>2011-12-08T09:59:10Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232507#p232507</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232503#p232503" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>redux пишет:</cite><blockquote><div class="quotebox"><cite>Wolfenberg пишет:</cite><blockquote><p>vga=</p></blockquote></div><div class="quotebox"><cite>newzenon пишет:</cite><blockquote><p>vga=792</p></blockquote></div><p>А разьвее второй Grub не ругнется на такой параеметр (как для первого Grub&#039;a) что-то типа &quot;устаревший параметр&quot; и не откажется так переключать. Я имею в виду если это писать именно в строке передачи параметров ядру? Работает так, да?</p></blockquote></div><p>Ну я ж говорю это работает также как и 0x318 - только для ядра на котором grub2 стоит. Ядра на других разделах не получают этот параметр.</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T09:55:05Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232503#p232503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232501#p232501" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Wolfenberg пишет:</cite><blockquote><p><a href="http://www.tldp.org/HOWTO/Framebuffer-HOWTO/">http://www.tldp.org/HOWTO/Framebuffer-HOWTO/</a> <br />Читал?</p></blockquote></div><p>Да, основное, но это-то тут причем?<br />Режим vga=792 это 1024×768, 24 bit, и он у меня нормально работает.</p><div class="codebox"><pre><code>$ hwinfo --framebuffer
02: None 00.0: 11001 VESA Framebuffer                           
  [Created at bios.459]
  Unique ID: rdCR.zn7pM8BU3A5
  Hardware Class: framebuffer
  Model: &quot;NVIDIA BIOS-P/N@N7129&quot;
  Vendor: &quot;NVIDIA Corporation&quot;
  Device: &quot;BIOS-P/N@N7129&quot;
  SubVendor: &quot;NVIDIA&quot;
  SubDevice: 
  Revision: &quot;Chip Rev&quot;
  Memory Size: 14 MB
  Memory Range: 0xcf000000-0xcfdfffff (rw)
  Mode 0x0300: 640x400 (+640), 8 bits
  Mode 0x0301: 640x480 (+640), 8 bits
  Mode 0x0303: 800x600 (+800), 8 bits
  Mode 0x030e: 320x200 (+640), 16 bits
  Mode 0x030f: 320x200 (+1280), 24 bits
  Mode 0x0311: 640x480 (+1280), 16 bits
  Mode 0x0312: 640x480 (+2560), 24 bits
  Mode 0x0314: 800x600 (+1600), 16 bits
  Mode 0x0315: 800x600 (+3200), 24 bits
  Mode 0x0330: 320x200 (+320), 8 bits
  Mode 0x0331: 320x400 (+320), 8 bits
  Mode 0x0332: 320x400 (+640), 16 bits
  Mode 0x0333: 320x400 (+1280), 24 bits
  Mode 0x0334: 320x240 (+320), 8 bits
  Mode 0x0335: 320x240 (+640), 16 bits
  Mode 0x0336: 320x240 (+1280), 24 bits
  Mode 0x033d: 640x400 (+1280), 16 bits
  Mode 0x033e: 640x400 (+2560), 24 bits</code></pre></div>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T09:52:50Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232501#p232501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232495#p232495" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Wolfenberg пишет:</cite><blockquote><p>vga=</p></blockquote></div><div class="quotebox"><cite>newzenon пишет:</cite><blockquote><p>vga=792</p></blockquote></div><p>А разьвее второй Grub не ругнется на такой параеметр (как для первого Grub&#039;a) что-то типа &quot;устаревший параметр&quot; и не откажется так переключать. Я имею в виду если это писать именно в строке передачи параметров ядру? Работает так, да?</p>]]></content>
			<author>
				<name><![CDATA[redux]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11302</uri>
			</author>
			<updated>2011-12-08T09:46:14Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232495#p232495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232491#p232491" />
			<content type="html"><![CDATA[<p><a href="http://www.tldp.org/HOWTO/Framebuffer-HOWTO/">http://www.tldp.org/HOWTO/Framebuffer-HOWTO/</a> <br />Читал?</p>]]></content>
			<author>
				<name><![CDATA[Wolfenberg]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9425</uri>
			</author>
			<updated>2011-12-08T09:41:20Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232491#p232491</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232490#p232490" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Wolfenberg пишет:</cite><blockquote><p><strong>newzenon</strong>, grub тот же. Загрузочник другой. Очень просто представляю:<br />Пишешь список, как у тебя в grub.cfg, только в каждом пункте свои параметры выставляешь.</p></blockquote></div><p>и первый же update-grub все это перепишит, или предлагаешь скрипты самого grub&#039;a переписывать? Вот хватит ерунду-то предлагать.&nbsp; oO</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T09:41:11Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232490#p232490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232488#p232488" />
			<content type="html"><![CDATA[<p>Попробуй указать&nbsp; set gfxmode=ABCxEFG, где abc разрешение экрана</p><p>здесь <a href="http://members.iinet.net/~herman546/p20/GRUB2%20Configuration%20File%20Commands.html">подробней</a> описано все и здесь <a href="http://members.iinet.net/~herman546/p20/GRUB2%20CLI%20Mode%20Commands.html">cli mode</a></p>]]></content>
			<author>
				<name><![CDATA[i2ks]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16</uri>
			</author>
			<updated>2011-12-08T09:39:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232488#p232488</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Grub2 параметры cmdline]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=232487#p232487" />
			<content type="html"><![CDATA[<p>Ну исходя из документации можно например создать файл:<br /></p><div class="codebox"><pre><code>/etc/grub.d/40_custom</code></pre></div><div class="codebox"><pre><code>menuentry &quot;Debian, Linux 2.6.39&quot; {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext4
    set root=(hd0,5)
    search --no-floppy --fs-uuid --set 0e717c2a-24bd-4abe-acfe-ecf98fc814f8
    linux    /boot/vmlinuz-2.6.39c root=UUID=0e717c2a-24bd-4abe-acfe-ecf98fc814f8 rw quiet vga=792 nomodeset
    initrd    /boot/initrd.img-2.6.39
}</code></pre></div><p>+++<br />Но основной вопрос так и не понятен, почему передача параметров идет только тому ядру, на разделе которого установлен сам grub2.</p>]]></content>
			<author>
				<name><![CDATA[zenon]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6867</uri>
			</author>
			<updated>2011-12-08T09:39:32Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=232487#p232487</id>
		</entry>
</feed>
