Disk labels in setup_harddisks

Devlin devlin at softhome.net
Thu Jun 20 15:22:08 CEST 2002


Follows a patch to setup_harddisks to use ext[23] disk labels, and make 
the comments about extra ext2 options look more like the resierfs stuff.

Should we generalize the passing of options to mkfs's?
A new extra option could be -M <option block> (eg: -M '-j -L usr').  
setup_harddisks could validate each option in the block to the fs type.

--- setup_harddisks.orig        Thu Jun 20 08:15:56 2002
+++ setup_harddisks     Thu Jun 20 09:04:20 2002
@@ -37,6 +37,7 @@
  # [-d]                     default: no DOS alignment
  #
  #---------------------------------------------------
+# Last changes: 20.06.2002 by Devlin <devlin at softhome.net>
  # Last changes: 14.05.2002 by Thomas Lange use strict
  # Last changes: 04.05.2002 by Thomas Lange use strict
  # Last changes: 29.04.2002 by Thomas Lange add swaplist
@@ -110,25 +111,24 @@
  #         default is "default"
  #
  #   After the semicolon there could be extra options like:
-#     -i <bytes>   : Bytes per inodes
-#                    (only ext2/3 filesystem)
-#     -m <blocks>% : reserved blocks percentage for superuser
-#                    (only ext2/3 filesystem)
-#     -j          : format in ext3
-#     -c           : check for bad blocks
-#     format       : Always format this partition even if preserve
-#     lazyformat   : Do not format if partition has not moved
-#                    (useful for testing the installation)
-#     boot         : make this partition the boot-partition (the
-#                    linux root filesystem is the default)
-#     ext2         : Extended 2 filesystem (this is the default)
-#     swap         : swap partition
-#     dosfat16     : DOS 16bit FAT file system
-#     winfat32     : Win95 FAT32 file system
-#     writable     : mounts a preserved partition writable
-#     reiser       : reiserfs
-#       -h <hash>  : set reiserfs hash
-#       -v <ver>   : set reiserfs version
+#     -c             : check for bad blocks
+#     format         : Always format this partition even if preserve
+#     lazyformat     : Do not format if partition has not moved
+#                      (useful for testing the installation)
+#     boot           : make this partition the boot-partition (the
+#                      linux root filesystem is the default)
+#     ext2           : Extended 2 filesystem (this is the default)
+#       -i <bytes>   : Bytes per inodes
+#       -m <blocks>% : reserved blocks percentage for superuser
+#       -j          : format in ext3
+#       -L <label>   : use a disk label
+#     swap           : swap partition
+#     dosfat16       : DOS 16bit FAT file system
+#     winfat32       : Win95 FAT32 file system
+#     writable       : mounts a preserved partition writable
+#     reiser         : reiserfs
+#       -h <hash>    : set reiserfs hash
+#       -v <ver>     : set reiserfs version
  #
  use strict;
  # getopts variables:
@@ -801,6 +801,7 @@
                 ($MPOptions{$mountpoint} =~ /(\-i\s*\d+)\b/) && 
($command .= " $1");
                 ($MPOptions{$mountpoint} =~ /(\-m\s*\d+)\b/) && 
($command .= " $1");
                 ($MPOptions{$mountpoint} =~ /(\-j)\b/) && ($command .= " 
$1");
+               ($MPOptions{$mountpoint} =~ /(\-L\s*\d+)\b/) && 
($command .= " $1");
                 $command .= " /dev/$device";
                 print "  $command\n";
                 if ($test != 1){



More information about the linux-fai mailing list