Install ext3fs with FAI

Phil biondi at cartel-securite.fr
Fri Jan 25 19:27:51 CET 2002


On Thu, 24 Jan 2002, Phil wrote:

> Hi,
>
> Here is a patch to setup_harddisk that enable the use of ext3 easily :
> If you don't specify the type of partition, you'll have auto in the fstab.
>
> In the disk_config, just add the -j option after the semi-colon to format
> with ext3. Add ext3 if you want the keyword ext3 be in fstab in place of
> auto.
>
> If you don't put the -j flag, you'll have ext2 partitions, but you'll need
> to give the ext2 option to have the ext2 keyword in fstab in place of
> auto.

Well, it seems that I did not diff with the right file so that the patch I
posted had a little error.

This new patch will fix that, and will add some comments in the headers.
Moreover, I've patched the readme file, for you, Thomas, because
you`re worth it ;)


-- 
Philippe Biondi <biondi@ cartel-securite.fr> Cartel Sécurité
Security Consultant/R&D                      http://www.cartel-securite.fr
Phone: +33 1 44 06 97 94                     Fax: +33 1 44 06 97 99
PGP KeyID:3D9A43E2  FingerPrint:C40A772533730E39330DC0985EE8FF5F3D9A43E2

-------------- next part --------------
--- README.disk_config.old	Fri Jan 25 18:50:42 2002
+++ README.disk_config	Fri Jan 25 19:00:01 2002
@@ -17,12 +17,12 @@
 
 disk_config sdb
 
-primary   /tmp        300-500      rw                          ;
+primary   /tmp        300-500      rw                          ;ext2
 primary   /backup     preserve2    rw
 logical   swap        50-100
 logical   /scratch2   100-300      rw                          ;-m 30
 logical   -           preserve7
-logical   /var        100                                      ;
+logical   /var        100                                      ;-j
 logical   /var/tmp    preserve9                                ;format
 primary   /tmp/mytmp  -300
 
@@ -82,16 +82,29 @@
 options are known:
 
      -i <bytes>   : Bytes per inode
-                    (only ext2 filesystem)
+                    (only ext2/3 filesystem)
      -m <blocks>  : Reserved blocks percentage for superuser
-                    (only ext2 filesystem)
+                    (only ext2/3 filesystem)
+     -j		  : Create the filesystem with an ext3 journal
      -c		  : Check for bad blocks
+     ext2	  : flag the partition as ext2 instead of auto in /etc/fstab
+     ext3	  : flag the partition as ext3 instead of auto in /etc/fstab 
      format       : Always format this partition even if preserve
      reiser	  : create a reiser file system, not an ext2
 
 The order of the extra options is not relevant. For more information
 see mke2fs(8).
 
+Thus, we have the following interactions between -j, ext2 and ext3 :
+<no option> : an ext2 fs flagged as auto in the fstab
+-j          : an ext3 fs flagged as auto in the fstab
+ext2        : an ext2 fs flagged as ext2 in the fstab
+-j ext2     : an ext3 fs flagged as ext2 in the fstab
+-j ext3     : an ext3 fs flagged as ext3 in the fstab
+ext3	    : an ext2 fs flagged as ext3 in the fstab !!BAD!!
+
+The use of auto in the fstab for ext3fs enable a non-ext3 enabled kernel or 
+tool to cope with these partitions.
 
 Preserving partitions:
 
-------------- next part --------------
109c109
< #                    (only ext2 filesystem)
---
> #                    (only ext2/3 filesystem)
111c111,112
< #                    (only ext2 filesystem)
---
> #                    (only ext2/3 filesystem)
> #     -j	   : format in ext3
439c440
< 	            ($options !~ /\b(ext2|swap|dosfat16|winfat32|reiser)\b/i ) && ($options .= " ext2");
---
> 	            ($options !~ /\b(ext2|ext3|auto|swap|dosfat16|winfat32|reiser)\b/i ) && ($options .= " auto");
466c467
< 		($options =~ /\bext2\b/i) && ($MPID{$mountpoint} = 83); # Linux native
---
> 		($options =~ /\b(ext[23]|auto)\b/i) && ($MPID{$mountpoint} = 83); # Linux native
773,774c774,775
< 	    if ($MPOptions{$mountpoint} =~ /\bext2\b/i) {
< 	        print "Make Extended 2 Filesystem:\n";
---
> 	    if ($MPOptions{$mountpoint} =~ /\b(ext[23]|auto)\b/i) {
> 	        print "Make Extended 2/3 Filesystem:\n";
778a780
> 		($MPOptions{$mountpoint} =~ /(\-j)\b/) && ($command .= " $1");
814c816
<     $type = "ext2";
---
>     $type = "auto";
815a818,819
>     ($MPOptions{'/'} =~ /\b(ext3)\b/i) && ($type = "ext3");
>     ($MPOptions{'/'} =~ /\b(ext2)\b/i) && ($type = "ext2");
829c833
< 	$type = "ext2";
---
> 	$type = "auto";
831a836,837
> 	($MPOptions{$mountpoint} =~ /\b(ext3)\b/i) && ($type = "ext3");
> 	($MPOptions{$mountpoint} =~ /\b(ext2)\b/i) && ($type = "ext2");


More information about the linux-fai mailing list