Hello again!
I think I already solved the previous one. I was trying to preserve
partition 3, which is the extended partition. Still, setup-storage
should not crash on this, but handle such situation gracefully.
After removing "3" from the "preserve_always" list, I am now seeing what
I think is another bug.
In my disk layout, partition 4 is the primary partition physically at
the end of the disk (a Windows recovery partition from the laptop
manufacturer). The logical partitions are situated between the primary
parititions 2 and 4 and are numbered 5, 6, etc.
It seems that setup-storage cannot handle the situation where partition
5 starts before partition 4 ends, even though they do not overlap
(partition 5 ends before 4 starts). The check is in Sizes.pm line 319 in
my version.
A full debug output is attached.
Toomas Tamm
setup-harddisks is running in test-only mode
Starting setup-storage 1.2.1+exp
disklist was: hda
Using config file: /var/lib/fai/config/disk_config/DISK_jensen
Input was:
# setup-storage configuration file for the laptop, jensen.
#
# It comes with a small partition as sda1, the larger
# sda2 for Win7, and sda4 for recovery.
#
# I shrunk sda2, created an extended partition in the empty
# space, and divided it between Windows Home (D:) and linux
# partitions. We preserve the size and location of everything,
# but create new filesystems.
# We use the "always_format" option which was created partially
# at my own request into FAI 3.3.5+experimental2.
#
disk_config disk1 bootable:1 preserve_always:1,2,4,5,6,7,8,9,10,11,12 always_format:6,7,8,9,10,11,12
primary - 0 - -
primary - 0 - -
logical - 0 - -
logical / 0 ext3 rw,errors=remount-ro createopts="-c -j"
logical swap 0 swap sw
logical /var 0 ext3 rw createopts="-c -m 5 -j"
logical /tmp 0 ext3 rw createopts="-c -m 0 -j"
logical /usr 0 ext3 rw createopts="-c -j"
logical /home 0 ext3 rw,nosuid,nodev createopts="-m 1 -j"
logical /wrk 0 ext3 rw,nosuid,nodev createopts="-m 1 -j"
primary - 0 - -
(CMD) parted -s /dev/hda unit TiB print 1> /tmp/tbXaW3lGZ8 2> /tmp/man6lbDCWJ
Executing: parted -s /dev/hda unit TiB print
(STDOUT) Model: ST380011A (ide)
(STDOUT) Disk /dev/hda: 0.07TiB
(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.00TiB 0.00TiB primary ntfs
(STDOUT) 2 0.00TiB 0.01TiB 0.01TiB primary ntfs
(STDOUT) 3 0.01TiB 0.07TiB 0.06TiB extended
(STDOUT) 5 0.01TiB 0.04TiB 0.03TiB logical ntfs
(STDOUT) 6 0.04TiB 0.04TiB 0.00TiB logical ext3
(STDOUT) 7 0.04TiB 0.04TiB 0.00TiB logical linux-swap
(STDOUT) 8 0.04TiB 0.04TiB 0.00TiB logical ext3
(STDOUT) 9 0.04TiB 0.04TiB 0.00TiB logical ext3
(STDOUT) 10 0.04TiB 0.05TiB 0.01TiB logical ext3
(STDOUT) 11 0.05TiB 0.06TiB 0.01TiB logical ext3
(STDOUT) 12 0.06TiB 0.07TiB 0.01TiB logical ext3
(STDOUT) 4 0.07TiB 0.07TiB 0.01TiB primary ntfs
(STDOUT)
(CMD) parted -s /dev/hda unit B print free 1> /tmp/IAMo2Q2OAO 2> /tmp/jIsMfHt6pe
Executing: parted -s /dev/hda unit B print free
(STDOUT) Model: ST380011A (ide)
(STDOUT) Disk /dev/hda: 80026361856B
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) Partition Table: msdos
(STDOUT)
(STDOUT) Number Start End Size Type File system Flags
(STDOUT) 1 32256B 1044610559B 1044578304B primary ntfs
(STDOUT) 2 1044610560B 11531842559B 10487232000B primary ntfs
(STDOUT) 3 11531842560B 74447009279B 62915166720B extended
(STDOUT) 5 11531874816B 42985313279B 31453438464B logical ntfs
(STDOUT) 42985313280B 43009989119B 24675840B Free Space
(STDOUT) 6 43010021376B 43643335679B 633314304B logical ext3
(STDOUT) 7 43643367936B 45740782079B 2097414144B logical linux-swap
(STDOUT) 8 45740814336B 46472831999B 732017664B logical ext3
(STDOUT) 9 46472864256B 47204881919B 732017664B logical ext3
(STDOUT) 10 47204914176B 53497221119B 6292306944B logical ext3
(STDOUT) 11 53497253376B 63984453119B 10487199744B logical ext3
(STDOUT) 12 63984485376B 73945267199B 9960781824B logical ext3
(STDOUT) 73945267200B 74447009279B 501742080B Free Space
(STDOUT) 4 74447009280B 80023749119B 5576739840B primary ntfs
(STDOUT)
(CMD) parted -s /dev/hda unit chs print free 1> /tmp/AKQoyr0yNs 2> /tmp/cqUmlsPZkA
Executing: parted -s /dev/hda unit chs print free
(STDOUT) Model: ST380011A (ide)
(STDOUT) Disk /dev/hda: 9729,80,62
(STDOUT) Sector size (logical/physical): 512B/512B
(STDOUT) BIOS cylinder,head,sector geometry: 9729,255,63. Each cylinder is 8225kB.
(STDOUT) Partition Table: msdos
(STDOUT)
(STDOUT) Number Start End Type File system Flags
(STDOUT) 1 0,1,0 126,254,62 primary ntfs
(STDOUT) 2 127,0,0 1401,254,62 primary ntfs
(STDOUT) 3 1402,0,0 9050,254,62 extended
(STDOUT) 5 1402,1,0 5225,254,62 logical ntfs
(STDOUT) 5226,0,0 5228,254,62 Free Space
(STDOUT) 6 5229,1,0 5305,254,62 logical ext3
(STDOUT) 7 5306,1,0 5560,254,62 logical linux-swap
(STDOUT) 8 5561,1,0 5649,254,62 logical ext3
(STDOUT) 9 5650,1,0 5738,254,62 logical ext3
(STDOUT) 10 5739,1,0 6503,254,62 logical ext3
(STDOUT) 11 6504,1,0 7778,254,62 logical ext3
(STDOUT) 12 7779,1,0 8989,254,62 logical ext3
(STDOUT) 8990,0,0 9050,254,62 Free Space
(STDOUT) 4 9051,0,0 9728,254,62 primary ntfs
(STDOUT)
Finding all volume groups
(CMD) mdadm --detail --scan --verbose -c partitions 1> /tmp/aOUEbec76I 2> /tmp/vuGpZTou7C
Executing: mdadm --detail --scan --verbose -c partitions
Current disk layout
$VAR1 = {
'/dev/hda' => {
'bios_heads' => '255',
'disklabel' => 'msdos',
'partitions' => {
'6' => {
'count_byte' => '633314304',
'filesystem' => 'ext3',
'begin_byte' => '43010021376',
'is_extended' => 0,
'end_byte' => '43643335679'
},
'11' => {
'count_byte' => '10487199744',
'filesystem' => 'ext3',
'begin_byte' => '53497253376',
'is_extended' => 0,
'end_byte' => '63984453119'
},
'3' => {
'count_byte' => '62915166720',
'filesystem' => '',
'begin_byte' => '11531842560',
'is_extended' => 1,
'end_byte' => '74447009279'
},
'7' => {
'count_byte' => '2097414144',
'filesystem' => 'linux-swap',
'begin_byte' => '43643367936',
'is_extended' => 0,
'end_byte' => '45740782079'
},
'9' => {
'count_byte' => '732017664',
'filesystem' => 'ext3',
'begin_byte' => '46472864256',
'is_extended' => 0,
'end_byte' => '47204881919'
},
'12' => {
'count_byte' => '9960781824',
'filesystem' => 'ext3',
'begin_byte' => '63984485376',
'is_extended' => 0,
'end_byte' => '73945267199'
},
'2' => {
'count_byte' => '10487232000',
'filesystem' => 'ntfs',
'begin_byte' => '1044610560',
'is_extended' => 0,
'end_byte' => '11531842559'
},
'8' => {
'count_byte' => '732017664',
'filesystem' => 'ext3',
'begin_byte' => '45740814336',
'is_extended' => 0,
'end_byte' => '46472831999'
},
'4' => {
'count_byte' => '5576739840',
'filesystem' => 'ntfs',
'begin_byte' => '74447009280',
'is_extended' => 0,
'end_byte' => '80023749119'
},
'1' => {
'count_byte' => '1044578304',
'filesystem' => 'ntfs',
'begin_byte' => '32256',
'is_extended' => 0,
'end_byte' => '1044610559'
},
'10' => {
'count_byte' => '6292306944',
'filesystem' => 'ext3',
'begin_byte' => '47204914176',
'is_extended' => 0,
'end_byte' => '53497221119'
},
'5' => {
'count_byte' => '31453438464',
'filesystem' => 'ntfs',
'begin_byte' => '11531874816',
'is_extended' => 0,
'end_byte' => '42985313279'
}
},
'bios_cylinders' => '9729',
'size' => '80026361856',
'sector_size' => '512',
'begin_byte' => 0,
'end_byte' => '80026361855',
'bios_sectors_per_track' => '63'
}
};
Current LVM layout
$VAR1 = {};
Current RAID layout
$VAR1 = {};
Preserved partition /dev/hda1 retains size 1044578304B
Preserved partition /dev/hda2 retains size 10487232000B
Preserved partition /dev/hda4 retains size 5576739840B
Previous partitions overflow begin of preserved partition /dev/hda5