<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] grub2 integration into installer and drakx tools
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20grub2%20integration%20into%20installer%20and%20drakx%20tools&In-Reply-To=%3C5062F905.2000709%40zen.co.uk%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="018939.html">
   <LINK REL="Next"  HREF="018937.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] grub2 integration into installer and drakx tools</H1>
    <B>Barry Jackson</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20grub2%20integration%20into%20installer%20and%20drakx%20tools&In-Reply-To=%3C5062F905.2000709%40zen.co.uk%3E"
       TITLE="[Mageia-dev] grub2 integration into installer and drakx tools">zen25000 at zen.co.uk
       </A><BR>
    <I>Wed Sep 26 14:45:57 CEST 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="018939.html">[Mageia-dev] grub2 integration into installer and drakx tools
</A></li>
        <LI>Next message: <A HREF="018937.html">[Mageia-dev] RPM groups policy
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#18943">[ date ]</a>
              <a href="thread.html#18943">[ thread ]</a>
              <a href="subject.html#18943">[ subject ]</a>
              <a href="author.html#18943">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On 26/09/12 09:10, Thierry Vignaud wrote:
&gt;<i>
</I>&gt;<i> send me what a typical config file would look with the corresponding grub1 conf
</I>&gt;<i> file.
</I>&gt;<i>
</I>I think I can see where you are heading.
Grub2 generates it own grub.cfg using os-prober, so maybe some work not 
needed.

Additional entries to the grub2 menu (anything not found by os-prober) 
need adding to /etc/grub.d/40_custom and are incuded when the menu is 
re-built. If thay are added to grub.cfg they will be overwritten at 
kernel update etc.

I have attached grub.cfg and menu.lst from a vbox installation of mga3 
running grub2. It is a lot less noisy than those on my desktop.

For basic grub2 commands see my README.Mageia in the package.

Barry
-------------- next part --------------
#
# 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
set default=&quot;0&quot;

if [ x&quot;${feature_menuentry_id}&quot; = xy ]; then
  menuentry_id_option=&quot;--id&quot;
else
  menuentry_id_option=&quot;&quot;
fi

export menuentry_id_option

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 {
  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 loadfont unicode ; then
  set gfxmode=1024x768x32
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
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  6e6a4414-2fff-413b-b224-4675025cb4cf
else
  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
fi
insmod gfxmenu
insmod png
set theme=($root)/boot/grub2/themes/maggy/theme.txt
export theme
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Mageia GNU/Linux' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6e6a4414-2fff-413b-b224-4675025cb4cf' {
	set gfxpayload=text
	insmod gzio
	insmod part_msdos
	insmod ext2
	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  6e6a4414-2fff-413b-b224-4675025cb4cf
	else
	  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
	fi
	echo	'Loading Linux desktop ...'
	linux	/boot/vmlinuz-desktop root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd-desktop.img
}
submenu 'Advanced options for Mageia GNU/Linux' $menuentry_id_option 'gnulinux-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
	menuentry 'Mageia GNU/Linux, with Linux desktop' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-desktop-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux desktop ...'
		linux	/boot/vmlinuz-desktop root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-desktop.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.5.4-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.4-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.5.4-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.5.4-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.5.4-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.5.3-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.3-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.5.3-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.5.3-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.5.3-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.5.2-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.2-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.5.2-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.5.2-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.5.2-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.5.0-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.5.0-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.5.0-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.5.0-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.4.6-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.6-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.4.6-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.4.6-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.4.6-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.4.5-desktop-1.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.5-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.4.5-desktop-1.mga3 ...'
		linux	/boot/vmlinuz-3.4.5-desktop-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.4.5-desktop-1.mga3.img
	}
	menuentry 'Mageia GNU/Linux, with Linux 3.4.4-desktop-2.mga3' --class mageia --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.4-desktop-2.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
		set gfxpayload=text
		insmod gzio
		insmod part_msdos
		insmod ext2
		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  6e6a4414-2fff-413b-b224-4675025cb4cf
		else
		  search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
		fi
		echo	'Loading Linux 3.4.4-desktop-2.mga3 ...'
		linux	/boot/vmlinuz-3.4.4-desktop-2.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro  splash
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd-3.4.4-desktop-2.mga3.img
	}
}

### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/30_os-prober ###
### 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.
### 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 &quot;${config_directory}&quot; -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 ###
-------------- next part --------------
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf failsafe
initrd (hd0,0)/boot/initrd.img

title desktop 3.4.4-2.mga3
kernel (hd0,0)/boot/vmlinuz-3.4.4-desktop-2.mga3 BOOT_IMAGE=desktop_3.4.4-2.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.4.4-desktop-2.mga3.img

title desktop 3.4.5-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.4.5-desktop-1.mga3 BOOT_IMAGE=desktop_3.4.5-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.4.5-desktop-1.mga3.img

title desktop 3.4.6-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.4.6-desktop-1.mga3 BOOT_IMAGE=desktop_3.4.6-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.4.6-desktop-1.mga3.img

title desktop 3.5.0-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.5.0-desktop-1.mga3 BOOT_IMAGE=desktop_3.5.0-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.5.0-desktop-1.mga3.img

title desktop 3.5.2-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.5.2-desktop-1.mga3 BOOT_IMAGE=desktop_3.5.2-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.5.2-desktop-1.mga3.img

title desktop 3.5.3-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.5.3-desktop-1.mga3 BOOT_IMAGE=desktop_3.5.3-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.5.3-desktop-1.mga3.img

title desktop 3.5.4-1.mga3
kernel (hd0,0)/boot/vmlinuz-3.5.4-desktop-1.mga3 BOOT_IMAGE=desktop_3.5.4-1.mga3 root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf splash quiet resume=UUID=3084b22c-e1c0-40af-8d1b-ebd7506cb16a vga=788
initrd (hd0,0)/boot/initrd-3.5.4-desktop-1.mga3.img
</PRE>

























<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="018939.html">[Mageia-dev] grub2 integration into installer and drakx tools
</A></li>
	<LI>Next message: <A HREF="018937.html">[Mageia-dev] RPM groups policy
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#18943">[ date ]</a>
              <a href="thread.html#18943">[ thread ]</a>
              <a href="subject.html#18943">[ subject ]</a>
              <a href="author.html#18943">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>