Setup-storage use space between partitions
Steven Wend
swend at stud.hs-bremen.de
Fri May 3 11:39:01 CEST 2013
> On Thu, May 02, 2013 at 05:16:16PM +0200, Steven Wend wrote:
>> Hello guys,
>>
>> I have only one hdd which hast three partitions as shown below.
>>
>> -------------------------------------------------
>> | 1. NTFS part | 2. NTFS part | 2. NTFS part |
>> -------------------------------------------------
>>
>> Now I want to keep the first and the third partition. The second one can
>> has to be deleted and the upcoming free space should be used to install
>> Ubuntu with FAI.
>>
>> I tried to handle this with this disc_config:
>> ----
>> disk_config disk1 preserve_always:1,3 disklabel:msdos bootable:1
>> fstabkey:uuid
>>
>> primary / 16000 ext3 rw,noatime,errors=remount-ro
>> logical swap 4000 swap rw
>> logical /home 10000-50% ext3 rw,noatime,nosuid,nodev createopts="-L
>> home -m 1" tuneopts="-c 0 -i 0"
>> ----
>>
>> The first and third partition is marked with preserve_always.
> ...
>> Is this a bug or do I have a logical problem?
>
> "logical" hits the nail on its head - your partitions are not numbered
> 1, 2, 3 - but (very probably) 1, 5, 6 (with an "extended" partition
> sitting in between, supposedly at 2). Check with "fdisk -lu" (from
> inside a "sysinfo" run, for example)
>
> S
>
Hello Steffen,
thanks for your answer. First I had to update my "picture":
-------------------------------------------------
| 1. NTFS part | 2. NTFS part | 3. NTFS part |
| PRIMARY | PRIMARY | PRIMARY |
-------------------------------------------------
The initial table of fstab is:
-----------
Disk /dev/sda: 171.8 GB, 171798691840 bytes
255 heads, 63 sectors/track, 20886 cylinders, total 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xaad98181
Device Boot Start End Blocks Id System
/dev/sda1 2048 268437503 134217728 7 HPFS/NTFS/exFAT
/dev/sda2 268437504 334899199 33230848 7 HPFS/NTFS/exFAT
/dev/sda3 * 334899200 335513599 307200 7 HPFS/NTFS/exFAT
-----------
I made the wanted changes manually with fdisk an the result was:
-----------
Disk /dev/sda: 171.8 GB, 171798691840 bytes
255 heads, 63 sectors/track, 20886 cylinders, total 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xaad98181
Device Boot Start End Blocks Id System
/dev/sda1 2048 268437503 134217728 7 HPFS/NTFS/exFAT
/dev/sda2 268437504 301991935 16777216 83 Linux
/dev/sda3 * 334899200 335513599 307200 7 HPFS/NTFS/exFAT
/dev/sda4 301991936 334899199 16453632 5 Extended
/dev/sda5 301993984 310382591 4194304 83 Linux
/dev/sda6 310384640 334899199 12257280 83 Linux
Partition table entries are not in disk order
-----------
If I fix the table entries it looks like this:
-----------
Disk /dev/sda: 171.8 GB, 171798691840 bytes
255 heads, 63 sectors/track, 20886 cylinders, total 335544320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xaad98181
Device Boot Start End Blocks Id System
/dev/sda1 2048 268437503 134217728 7 HPFS/NTFS/exFAT
/dev/sda2 268437504 301991935 16777216 83 Linux
/dev/sda3 301991936 334899199 16453632 5 Extended
/dev/sda4 * 334899200 335513599 307200 7 HPFS/NTFS/exFAT
/dev/sda5 301993984 310382591 4194304 83 Linux
/dev/sda6 310384640 334899199 12257280 83 Linux
-----------
After that I modified my config_disk with "preserve_always:1,4" but the
same error was the result.
What does the "preserve_always:X" saves? Is the sda/hdaX before or after
the wanted modification ment?
More information about the linux-fai
mailing list