setup_harddisks patch

Paul Lussier p.lussier at comcast.net
Mon Feb 18 18:28:00 CET 2008


Hi Folks,

I'd like to submit a minor patch for FAI's setup_harddisks script.
This patch allows you to create a partition of type 'da', which is
"Non-Filesystem Data".  We use this partition type extensively and
have evidently been maintaining this patch internally for years having
thought a patch had been submitted.

Therefore, I'd like to submit the following patch which allows you to
use the 'nfdata' type in a disk config file:

$ diff -c /tmp/setup_harddisks-PB /tmp/setup_harddisks
*** /tmp/setup_harddisks-PB     Mon Feb 18 12:14:16 2008
--- /tmp/setup_harddisks        Mon Feb 18 12:14:49 2008
***************
*** 135,141 ****
  #     swap         : swap partition
  #     dosfat16     : DOS 16bit FAT file system
  #     winfat32     : Win95 FAT32 file system
- #     nfdata       : non-filesystem data (ptype 0xda; don't format)
  #     writable     : mounts a preserved partition writable
  #     xfs          : xfs
  #     reiser       : reiserfs
--- 135,140 ----
***************
*** 502,508 ****
                      && die "ERROR: unable to preserve partitions of size 0.\n$line\n ";
                  } else {
                    # If not preserve we must know the filesystemtype
!                   ($options !~ /\b(ext2|ext3|auto|swap|dosfat16|winfat32|reiser|xfs|nfdata)\b/i ) && ($options .= " auto");
                  }
                if($size =~ /^(\d*)(\-?)(\d*)$/){
                    $Min = $1;
--- 501,507 ----
                      && die "ERROR: unable to preserve partitions of size 0.\n$line\n ";
                  } else {
                    # If not preserve we must know the filesystemtype
!                   ($options !~ /\b(ext2|ext3|auto|swap|dosfat16|winfat32|reiser|xfs)\b/i ) && ($options .= " auto");
                  }
                if($size =~ /^(\d*)(\-?)(\d*)$/){
                    $Min = $1;
***************
*** 533,539 ****
                ($options =~ /\bswap\b/i) && ($MPID{$mountpoint} = 82); # Linux swap
                ($options =~ /\bdosfat16\b/i) && ($MPID{$mountpoint} = 6); # DOS FAT 16bit (>=32MB, will be changed later)
                ($options =~ /\bwinfat32\b/i) && ($MPID{$mountpoint} = "b"); # Win 95 FAT 32
-               ($options =~ /\bnfdata\b/i) && ($MPID{$mountpoint} = "da"); # non-fs data
                $MPOptions{$mountpoint} = $options;
                if($test == 1){
                    print "$mountpoint,$MPMinSize{$mountpoint}-$MPMaxSize{$mountpoint},";
--- 532,537 ----


Thanks.

-- 
Seeya,
Paul


More information about the linux-fai mailing list