r1766 - in profiles/LFS/trunk: config skeleton skeleton/boot skeleton/boot/grub

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Sat Feb 12 09:41:07 PST 2005


Author: kpfleming
Date: 2005-02-12 10:41:07 -0700 (Sat, 12 Feb 2005)
New Revision: 1766

Added:
   profiles/LFS/trunk/skeleton/boot/
   profiles/LFS/trunk/skeleton/boot/grub/
   profiles/LFS/trunk/skeleton/boot/grub/menu.lst
Modified:
   profiles/LFS/trunk/config/general.ent
   profiles/LFS/trunk/config/grub.xml
Log:
move boot/grub/menu.lst to skeleton
convert grub install command to actual profile command and enable



Modified: profiles/LFS/trunk/config/general.ent
===================================================================
--- profiles/LFS/trunk/config/general.ent	2005-02-12 17:24:56 UTC (rev 1765)
+++ profiles/LFS/trunk/config/general.ent	2005-02-12 17:41:07 UTC (rev 1766)
@@ -106,10 +106,7 @@
     -->
 <!ENTITY kernel-config "linux-config">
 
-<!-- grub settings (these need to be in grub's notation) 
-	NOTE:  The grub configuration profile is completely commented out.  You should edit
-	chapter08/grub.xml for your individual system if you want to automate this.
-	-->
+<!-- grub settings (these need to be in grub's notation) -->
 <!ENTITY grub-root "hd0,0">
 <!ENTITY grub-install-location "hd0">
 

Modified: profiles/LFS/trunk/config/grub.xml
===================================================================
--- profiles/LFS/trunk/config/grub.xml	2005-02-12 17:24:56 UTC (rev 1765)
+++ profiles/LFS/trunk/config/grub.xml	2005-02-12 17:41:07 UTC (rev 1766)
@@ -9,45 +9,29 @@
 ]>
 <alfs>
   <stage name="Making the LFS System Bootable">
-    <!--
-        The following shell command sets up grub.  The batch param on the first line
-        has to have the space between the dashes removed for this to work.      
-
-        /sbin/grub - -batch <<EOF 1>/dev/null 2>/dev/null
-        root (&grub-root;)
-        setup (&grub-install-location;)
-        quit EOF
-        -->
-    <!-- Sample grub configuration-->
-    <textdump>
+    <execute command="/sbin/grub --batch">
+      <prefix>echo -e "root (&grub-root;)\nsetup (&grub-install-location;)\nquit" | </prefix>
+      <param>1>/dev/null</param>
+      <param>2>/dev/null</param>
+    </execute>
+    <copy>
+      <source>&skeleton_dir;/boot/grub/menu.lst</source>
+      <destination>/boot/grub</destination>
+    </copy>
+    <search_replace>
       <file>/boot/grub/menu.lst</file>
-      <content>
-	=# Default to first menu entry 
-	=default 0
-	=
-	=# Allow 30 seconds before booting default 
-	=timeout=30 
-	= 
-	=# Use prettier colors 
-	=color green/black light-green/black 
-	= 
-	=# Default Entry for LFS 
-	=title LFS (&LFS-version; kernel &linux-version;) 
-	=root (&grub-root;) 
-	=kernel /boot/lfskernel-&linux-version; root=&lfs_partition; 
-	= 
-	=# Redhat Linux 
-	=#title Redhat 
-	=#root (hd0,2) 
-	=#kernel /boot/kernel-2.4.20 root=/dev/hda3 
-	=#initrd /boot/initrd-2.4.20 
-	=# 
-	=# Windows 
-	=#title Windows 
-	=#rootnoverify (hd0,0) 
-	=#chainloader +1 
-	=#
-      </content>
-    </textdump>
+      <find>[LFS-version]</find>
+      <replace>&LFS-version;</replace>
+    </search_replace>
+    <search_replace>
+      <file>/boot/grub/menu.lst</file>
+      <find>[linux-version]</find>
+      <replace>&linux-version;</replace>
+    </search_replace>
+    <search_replace>
+      <file>/boot/grub/menu.lst</file>
+      <find>[grub-root]</find>
+      <replace>&grub-root;</replace>
+    </search_replace>
   </stage>
 </alfs>

Added: profiles/LFS/trunk/skeleton/boot/grub/menu.lst
===================================================================
--- profiles/LFS/trunk/skeleton/boot/grub/menu.lst	2005-02-12 17:24:56 UTC (rev 1765)
+++ profiles/LFS/trunk/skeleton/boot/grub/menu.lst	2005-02-12 17:41:07 UTC (rev 1766)
@@ -0,0 +1,25 @@
+# Default to first menu entry 
+default 0
+
+# Allow 30 seconds before booting default 
+timeout=30 
+ 
+# Use prettier colors 
+color green/black light-green/black 
+ 
+# Default Entry for LFS 
+title LFS ([LFS-version] kernel [linux-version]) 
+root ([grub-root]) 
+kernel /boot/lfskernel-[linux-version] root=/dev/hda2
+ 
+# Redhat Linux 
+#title Redhat 
+#root (hd0,2) 
+#kernel /boot/kernel-2.4.20 root=/dev/hda3 
+#initrd /boot/initrd-2.4.20 
+# 
+# Windows 
+#title Windows 
+#rootnoverify (hd0,0) 
+#chainloader +1 
+#




More information about the alfs-log mailing list