Hi,

I have a new Thinkpad and want to preserve the second partition (Compaq Diagnostics) while making a extended partition out of the first one.

setup_harddisks once worked with this configuration:

  disk_config disk1
  logical  /             8192-       rw,errors=remount-ro ; -j ext3
  logical  swap          127-1024    rw
  primary   -            preserve2

but setup-storage (version 1.2.1 from fai-client 3.3.5) does not work with that 
one:

  disk_config disk1 preserve_always:2
  logical  /             8192-       ext3 rw,errors=remount-ro
  logical  swap          1024-4096   swap sw
  primary  -             0-          -    -

Output is:

  # debug=1 disklist=sda setup-storage -f 
/var/lib/fai/config/disk_config/THINKPAD
  setup-harddisks is running in test-only mode
  disklist was: sda
  Starting setup-storage 1.2.1
  Using config file: /var/lib/fai/config/disk_config/THINKPAD
  Input was:
  disk_config disk1 preserve_always:2
  logical  /             8192-       ext3 rw,errors=remount-ro
  logical  swap          1024-4096   swap sw
  primary  -             0-          -    -
  (CMD) parted -s /dev/sda unit TiB print 1> /tmp/BiRXogGnGb 2> /tmp/3GAe2hWkrV
  Executing: parted -s /dev/sda unit TiB print
  (STDOUT) Model: ATA HITACHI HTS72201 (scsi)
  (STDOUT) Disk /dev/sda: 0.15TiB
  (STDOUT) Sector size (logical/physical): 512B/512B
  (STDOUT) Partition Table: msdos
  (STDOUT)
  (STDOUT) Number  Start    End      Size     Type     File system  Flags
  (STDOUT)  1      0.00TiB  0.13TiB  0.13TiB  primary  ntfs         boot
  (STDOUT)  2      0.13TiB  0.14TiB  0.00TiB  primary  fat32
  (STDOUT)
  (CMD) parted -s /dev/sda unit B print free 1> /tmp/o7fD3FSqL5 2> 
/tmp/mJxGmomLAs
  Executing: parted -s /dev/sda unit B print free
  (STDOUT) Model: ATA HITACHI HTS72201 (scsi)
  (STDOUT) Disk /dev/sda: 160041885696B
  (STDOUT) Sector size (logical/physical): 512B/512B
  (STDOUT) Partition Table: msdos
  (STDOUT)
  (STDOUT) Number  Start          End            Size           Type
  File system  Flags
  (STDOUT)  1      32256B         147900211199B  147900178944B  primary  ntfs   
      boot
  (STDOUT)  2      147900211200B  152444436479B  4544225280B    primary  fat32
  (STDOUT)         152444436480B  160039272959B  7594836480B             Free 
Space
  (STDOUT)
  (CMD) parted -s /dev/sda unit chs print free 1> /tmp/IxnOmL131D 2> 
/tmp/k9BkYh8CCU
  Executing: parted -s /dev/sda unit chs print free
  (STDOUT) Model: ATA HITACHI HTS72201 (scsi)
  (STDOUT) Disk /dev/sda: 19457,80,62
  (STDOUT) Sector size (logical/physical): 512B/512B
  (STDOUT) BIOS cylinder,head,sector geometry: 19457,255,63.  Each cylinder is 
8225kB.
  (STDOUT) Partition Table: msdos
  (STDOUT)
  (STDOUT) Number  Start        End           Type     File system  Flags
  (STDOUT)  1      0,1,0        17981,44,62   primary  ntfs         boot
  (STDOUT)  2      17981,45,0   18533,164,62  primary  fat32
  (STDOUT)         18533,165,0  19456,254,62           Free Space
  (STDOUT)
      Finding all volume groups
  (CMD) mdadm --detail --scan --verbose -c partitions 1> /tmp/r7BrECVeS5 2> 
/tmp/PAYHsDlBRi
  Executing: mdadm --detail --scan --verbose -c partitions
  Current disk layout
  $VAR1 = {
            '/dev/sda' => {
                            'bios_heads' => '255',
                            'disklabel' => 'msdos',
                            'partitions' => {
                                              '1' => {
                                                       'count_byte' => 
'147900178944',
                                                       'filesystem' => 'ntfs',
                                                       'begin_byte' => '32256',
                                                       'is_extended' => 0,
                                                       'end_byte' => 
'147900211199'
                                                     },
                                              '2' => {
                                                       'count_byte' => 
'4544225280',
                                                       'filesystem' => 'fat32',
                                                       'begin_byte' => 
'147900211200',
                                                       'is_extended' => 0,
                                                       'end_byte' => 
'152444436479'
                                                     }
                                            },
                            'bios_cylinders' => '19457',
                            'size' => '160041885696',
                            'sector_size' => '512',
                            'begin_byte' => 0,
                            'end_byte' => '160041885695',
                            'bios_sectors_per_track' => '63'
                          }
          };
  Current LVM layout
  $VAR1 = {};
  Current RAID layout
  $VAR1 = {};
  Preserved partition /dev/sda2 does not end at a cylinder boundary, parted may 
fail to restore the partition!
  Insufficient space available for partition /dev/sda5

What to do?

Regards,
Frank.

Antwort per Email an