setup-storage, extended partition 1, preserve partition 2

Frank Doepper fd at taz.de
Fri Mar 11 16:56:12 CET 2011


Am 09.03.11 um 23:32 schrieb Michael Tautschnig:

>> 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-          -    -
>>
>
> [...]
>
>>
>> What to do?
>>
>
> Would you mind upgrading to either 3.4.7 or possibly even to an experimental
> version (well, right now 3.4.7 would be the better choice as setup-storage in
> experimental might be broken). That said, I've put the same disk layout on a
> test system and it seems to work fine with a slightly patched (see recent mails
> about problems with disk size) experimental builds. Therefore there's also a
> good chance that this works well with 3.4.7.

ok. with 3.4.7:

hangover:~# disklist=sda setup-storage 
setup-harddisks is running in test-only mode
Starting setup-storage 1.3
Using config file: /var/lib/fai/config/disk_config/THINKPAD
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
     Finding all volume groups
Executing: mdadm --examine --scan --verbose -c partitions
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

with 4.0~beta2+experimental61:

hangover:~# disklist=sda setup-storage 
setup-storage is running in test-only mode
Starting setup-storage 1.3+exp
Using config file: /var/lib/fai/config/disk_config/THINKPAD
Use of uninitialized value $this_mp in string eq at /usr/share/fai/setup-storage//Parser.pm line 1130, <$config_file> line 1.
Use of uninitialized value $this_mp in hash element at /usr/share/fai/setup-storage//Parser.pm line 1131, <$config_file> line 1.
Use of uninitialized value $this_mp in string eq at /usr/share/fai/setup-storage//Parser.pm line 1135, <$config_file> line 1.
Use of uninitialized value $this_mp in hash element at /usr/share/fai/setup-storage//Parser.pm line 1135, <$config_file> line 1.
Executing: parted -s /dev/sda unit TiB print
Executing: parted -s /dev/sda unit B print free
Executing: parted -s /dev/sda unit chs print free
     Finding all volume groups
Executing: mdadm --examine --scan --verbose -c partitions
Previous partitions overflow begin of preserved partition /dev/sda2

FYI:

hangover:~# sfdisk -d
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=       63, size=288867537, Id= 7, bootable
/dev/sda2 : start=288867600, size=  8875440, Id=12
/dev/sda3 : start=        0, size=        0, Id= 0
/dev/sda4 : start=        0, size=        0, Id= 0

hangover:~# sfdisk -l

Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
Warning: The partition table looks like it was made
   for C/H/S=*/240/63 (instead of 19457/255/63).
For this listing I'll assume that geometry.
Units = cylinders of 7741440 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+  19104   19105- 144433768+   7  HPFS/NTFS
                 end: (c,h,s) expected (1023,239,63) found (1022,239,63)
/dev/sda2      19105   19691     587    4437720   12  Compaq diagnostics
                 start: (c,h,s) expected (1023,239,63) found (1022,239,63)
                 end: (c,h,s) expected (1023,239,63) found (1022,239,63)
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty

hangover:~# cat /var/lib/fai/config/disk_config/THINKPAD
disk_config disk1 preserve_always:2
logical  /             8192-       ext3 rw,errors=remount-ro
logical  swap          1024-4096   swap sw
primary  -             0-          -    -

Beste Grüße,
Frank.


More information about the linux-fai mailing list