Hi,
I already read about the other problem with partition in RC1, but I think the problems I have are different. It seems that the partition_nr statement is completely ignored:
This profile
<partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>swap</mount> <partition_nr config:type="integer">2</partition_nr> <size>1gb</size> </partition> </partitions> <use>all</use> </drive> </partitioning>
should result in a hard disk with just /dev/hda2 as swap. But it creates /dev/hda1 as swap.
In a more complicated profile, I used partition_nr to setup this partition table:
/dev/hda2 swap swap defaults 1gb /dev/hda3 / ext3 defaults 15gb /dev/hda5 /local ext3 defaults 8gb /dev/hda6 /home ext3 defaults 20gb /dev/hda7 /usr/local/storage ext3 defaults max
I specified all partition like above (with create, format, partition_nr). In SuSE 9.0 this would automatically create /dev/hda4 as extended partition,.
With 10.0RC1 it created 4 primary partition, using /local as /dev/hda3, /home as /dev/hda4 and then failed to create another partition for /usr/local/storage (of course). I don't know if this is due to the problem with the partition_nr or if autoyast lost the functionality to autodetect that /dev/hda4 must be an extended partition.
So I tried to specify another entry
<partition> <create config:type="boolean">true</create> <partition_nr config:type="integer">4</partition_nr> <partition_id config:type="integer">5</partition_id> <size>max</size> </partition>
according to the html documentation. This leads to /dev/hda1 swap /dev/hda2 / /dev/hda3 <extended partition> /dev/hda5 <no mount point> /dev/hda6 /local /dev/hda7 /home /dev/hda8 /usr/local/storage
So this gets completely messed up :-) Especially this not-mounted /dev/hda5 partition is very very strange.
So at the moment, partitioning is almost impossible with 10.0RC1 :-)
I have all the y2log files available, please let me know for which examples you need them (if any).
cu, Frank
On Wednesday 21 September 2005 11:45, Frank Steiner wrote:
This profile
<partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>swap</mount> <partition_nr config:type="integer">2</partition_nr> <size>1gb</size> </partition> </partitions> <use>all</use> </drive> </partitioning>
should result in a hard disk with just /dev/hda2 as swap. But it creates /dev/hda1 as swap.
okay, I never tried something like that. I'm not so sure that this worked on SUSE Linux 9.3 but anyway, please add: <keep_partition_num>1</keep_partition_num> in the <drive> section.
I hope I got you right, that you hava a primary partition nr. 1 that you want to keep. If you don't have a primary partition 1 and you want to start with a primary partition 2, without any prim. part. 1 at all, I don't think that's possible with autoyast but I really would be interested for what kind of reason you need such a strange partitioning.
So at the moment, partitioning is almost impossible with 10.0RC1 :-)
then you can call me the partitioning wizard. Making the impossible happen ;)
Uwe Gansert wrote
okay, I never tried something like that. I'm not so sure that this worked on SUSE Linux 9.3 but anyway, please add: <keep_partition_num>1</keep_partition_num> in the <drive> section.
I hope I got you right, that you hava a primary partition nr. 1 that you want to keep. If you don't have a primary partition 1 and you want to start
Well, no, this was just to demonstrate that the partition_nr is ignored :-)
with a primary partition 2, without any prim. part. 1 at all, I don't think that's possible with autoyast but I really would be interested for what kind of reason you need such a strange partitioning.
Indeed we used to have this for certain hosts, because we weren't sure yet if the first partition was going to be a windows or linux partition later, so we just left the space unused. Anyway, it does work this way in 9.0 :-) Is it really difficult to make autoyast work this way? I thought that's what the partition_nr parameter is for... Telling autoyast "Shut up and do I want!" ;-))
then you can call me the partitioning wizard. Making the impossible happen ;)
I surely will if you could also solve the other two problems for us :-)
Seriously, can you say sth. about the second and third problem? autoyast used to auto-generate an extended partition as /dev/hda4 if only /dev/hda1-3 and /dev/hda5 were specified. That's where the partition_nr element helped a lot, because we generate the profiles from fstab files by scripts, and we didn't have to think about the extended partition ourselves, autoyast just determined it by itself.
Assuming that this was lost some time between 9.0 and 10.0 (wuah, bring it back please :-)), what about this strange behaviour when specifying the extended partition manually? To make sure it's not caused by the missing first partition, I used the profile listed below. Note that without specifying the extended partition no. 4, autoyast in SuSE 9.0 will create this (which is what we expect):
/dev/hda1 /dos fat32 defaults 4gb /dev/hda2 swap swap defaults 1gb /dev/hda3 / ext3 defaults 15gb /dev/hda5 /local ext3 defaults 8gb /dev/hda6 /home ext3 defaults 20gb
However, 10.0RC1 will create this (with defining partition 4 as extended partition; failing without it):
/dev/hda1 /dos fat32 defaults 4gb /dev/hda2 swap swap defaults 1gb /dev/hda3 <extended> /dev/hda5 / ext3 defaults 15gb /dev/hda6 <no mountpoint, 16GB size> /dev/hda7 /local ext3 defaults 8gb /dev/hda8 /home ext3 defaults 20gb
This can't make any sense... I specify an extended partition for no. 4, but /dev/hda4 is not created at all, but therefore /dev/hda3 becomes an extended partition, although I specified /dev/hda3 with mountpoint "/", /dev/hda6 is created but not used at all,...
"Wizard, wizard, make it work!" ;-)
I feel the partition_nr element should have more weight like a "force it to be /dev/hda<partition_nr> if the user tells me, how stupid this may look to me..." and should never be overridden by autoyast's own decision.
Oh, btw, talking about old features: autoyast1 (SuSE 6.4) used to have this feature "If I find an fstab, I reuse it and leave all partitions untouched, unless I'm told to format some". This fstab-feature was missing in 9.0 completely and came back in 9.1, but now with the contrary behaviour: "format all partitions unless I'm told to leave some untouched". This is somewhat dangerous because you will accidentally format partitions if you forget to specify them. Couldn't this be changed so that one can chose if the default behaviour is either format-all or format-none?
cu, Frank
<partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">fat32</filesystem> <format config:type="boolean">false</format> <fstopt>defaults</fstopt> <mount>/dos</mount> <partition_nr config:type="integer">1</partition_nr> <size>4gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>swap</mount> <partition_nr config:type="integer">2</partition_nr> <size>1gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/</mount> <partition_nr config:type="integer">3</partition_nr> <size>15gb</size> </partition> <partition> <create config:type="boolean">true</create> <partition_nr config:type="integer">4</partition_nr> <partition_id config:type="integer">5</partition_id> <size>max</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/local</mount> <partition_nr config:type="integer">5</partition_nr> <size>8gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/home</mount> <partition_nr config:type="integer">6</partition_nr> <size>max</size> </partition> </partitions> <use>all</use> </drive>
</partitioning>
On Wednesday 21 September 2005 13:50, Frank Steiner wrote:
with a primary partition 2, without any prim. part. 1 at all, I don't think that's possible with autoyast but I really would be interested for what kind of reason you need such a strange partitioning.
Indeed we used to have this for certain hosts, because we weren't sure yet if the first partition was going to be a windows or linux partition later, so we just left the space unused.
okay. I can't say if this is possible with autoyast. I did not try to have an empty space instead of the first primary until now.
Anyway, it does work this way in 9.0 :-) Is it really difficult to make autoyast work this way?
I can't say. the partitioning code in autoyast is very complex. I'll really have to fight with that beast in the near future and I keep that in mind.
Seriously, can you say sth. about the second and third problem? autoyast used to auto-generate an extended partition as /dev/hda4 if only /dev/hda1-3 and /dev/hda5 were specified.
that is still the case.
"Wizard, wizard, make it work!" ;-)
It's not that different from your version but I had to workaround a bug in RC1 (<usepart> for partition 1) and I've added some <partition_type> elements to make sure autoyast has the same idea of what is primary and what not like I do. Then I kicked out the extended partition, because it's not needed in the profile. Maybe the partition_nr is not needed than anymore but I did not try that.
<partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <create config:type="boolean">false</create> <format config:type="boolean">false</format> <fstopt>defaults</fstopt> <mount>/dos</mount> <partition_type>primary</partition_type> <partition_nr config:type="integer">1</partition_nr> <usepart config:type="integer">1</usepart> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>swap</mount> <partition_nr config:type="integer">2</partition_nr> <partition_type>primary</partition_type> <size>1gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/</mount> <partition_nr config:type="integer">3</partition_nr> <partition_type>primary</partition_type> <size>15gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/local</mount> <partition_nr config:type="integer">5</partition_nr> <size>8gb</size> </partition> <partition> <create config:type="boolean">true</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/home</mount> <partition_nr config:type="integer">6</partition_nr> <size>20gb</size> </partition> </partitions> <keep_partition_num>1</keep_partition_num> <use>all</use> </drive> </partitioning>
Oh, btw, talking about old features: autoyast1 (SuSE 6.4) used to have this feature "If I find an fstab, I reuse it and leave all partitions untouched, unless I'm told to format some". This fstab-feature was missing in 9.0 completely and came back in 9.1,
that might be. Autoyast in 10.0 is the first autoyast that I'm responsible for.
but now with the contrary behaviour: "format all partitions unless I'm told to leave some untouched". This is somewhat dangerous because you will accidentally format partitions if you forget to specify them. Couldn't this be changed so that one can chose if the default behaviour is either format-all or format-none?
hmmm. I have to take a look at that by myself to see how that works and how it behaves.
Uwe Gansert wrote
okay. I can't say if this is possible with autoyast. I did not try to have an empty space instead of the first primary until now.
Developers won't ever have a chance to imagine what crazy kind of configs the user will want to have ;-)
Seriously, can you say sth. about the second and third problem? autoyast used to auto-generate an extended partition as /dev/hda4 if only /dev/hda1-3 and /dev/hda5 were specified.
that is still the case.
Right! Your version of the profile works!
"Wizard, wizard, make it work!" ;-)
It's not that different from your version but I had to workaround a bug in RC1 (<usepart> for partition 1) and I've added some <partition_type>
Ok, I should have tried that myself because I read about it in the other thread, sorry!
elements to make sure autoyast has the same idea of what is primary and
Indeed it currently only works with these partition_type elements, however, the information is redundant: If <partition_nr> is given and out of {1,2,3,4} *and* a mount point is given, then autoyast could derive it's a primary partition, because an extended partition doesn't have a mount point. However, maybe it's not bad to explicitely state it even if it's redundant, because redundant information lowers the chance of errors :-)
In the same sense, "usepart" is redundant if <partition_nr> is given and <create> is set to false, but I think I got you right that this is just the bug in RC1.
One more interesting effect: Adding "<keep_partition_num>5</keep_partition_num>" will make /local be created as /dev/hda6 and /home as /dev/hda7. I had expected partitioning to fail because keeping partition 5 and creating a partition with <partition_nr>5</partition_nr> is a contradiction. I think it would be better to fail here instead of overriding the partition_nr element, because then it is hard to estimate which instructions override others. I feel that if I specify a partition with a partition_number and a mount point, autoyast should never calculate a partition table in which the partition with that mount point has a different number. It should always fail if it can't give me the partition number that I wanted for that mount point. Otherwise the partition_nr element is somewhat useless...
Oh, btw, talking about old features: autoyast1 (SuSE 6.4) used to have this feature "If I find an fstab, I reuse it and leave all partitions untouched, unless I'm told to format some". This fstab-feature was missing in 9.0 completely and came back in 9.1,
that might be. Autoyast in 10.0 is the first autoyast that I'm responsible for.
I'm pretty sure this is a hard job to take over such a big project!
but now with the contrary behaviour: "format all partitions unless I'm told to leave some untouched". This is somewhat dangerous because you will accidentally format partitions if you forget to specify them. Couldn't this be changed so that one can chose if the default behaviour is either format-all or format-none?
hmmm. I have to take a look at that by myself to see how that works and how it behaves.
Thanks!
cu, Frank
On Wednesday 21 September 2005 17:06, Frank Steiner wrote:
elements to make sure autoyast has the same idea of what is primary and
Indeed it currently only works with these partition_type elements, however, the information is redundant: If <partition_nr> is given and out of {1,2,3,4} *and* a mount point is given, then autoyast could derive it's a primary partition, because an extended partition doesn't have a mount point.
I'm not so sure about that. A partition that is not mounted into the system has no mountpoint too. hda1 might be such a candidate if it's for a windows system partition that shall not be mounted into the parallel installed linux system. All in all the partitioning is a very tricky thing, even if it sounds quite easy at first.
In the same sense, "usepart" is redundant if <partition_nr> is given and <create> is set to false, but I think I got you right that this is just the bug in RC1.
yes. That's fixed in the final version.
Uwe Gansert wrote
however, the information is redundant: If <partition_nr> is given and out of {1,2,3,4} *and* a mount point is given, then autoyast could derive it's a primary partition, because an extended partition doesn't have a mount point.
I'm not so sure about that. A partition that is not mounted into the system has no mountpoint too.
Sure, this is just an "if", and not an "if and only if"! If you have partition number <= 4 and a mount point, it's a primary partition. If you are missing the mount point, you can't tell if it should be primary or extended...
All in all the partitioning is a very tricky thing, even if it sounds quite easy at first.
Definitely :-)
I played around a little bit with your config, trying to keep all partitions, but even with the <usepart> workaround, I couldn't figure out how...
I set all <create> to false, keeping <format>which still deletes and recreates all partitions but the first. Then adding <usepart> and <keep_partition_num> for partition 2 and 3 works, too. /dev/hda2 and /dev/hda3 are just formatted, not deleted and recreated.
But then I tried the same for partition 5, i.e., adding <usepart config:type="integer">5</usepart> and <keep_partition_num>5</keep_partition_num>
The result is, well, say "somewhat unexpected" :-) /dev/hda6 is deleted and recreated for mountpoint /dos /dev/hda7 is created for swap, but /dev/hda2 is used for swap. /dev/hda8 is created for /, /dev/hda9 for /usr/local/storage. /dev/hda5 is formatted with ext3.
I thought I might have to specify <keep_partition_num> for partition 4 (the extended), too, but then partitioning fails completely.
So I still am not able to keep all partitions and just format some :-( Here's the config causing that strange partitioning:
<partitioning config:type="list"> <drive> <device>/dev/hda</device> <partitions config:type="list"> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ntfs</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/dos</mount> <partition_type>primary</partition_type> <partition_nr config:type="integer">1</partition_nr> <usepart config:type="integer">1</usepart> <size>4gb</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>swap</mount> <partition_nr config:type="integer">2</partition_nr> <partition_type>primary</partition_type> <usepart config:type="integer">2</usepart> <size>1gb</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/</mount> <partition_nr config:type="integer">3</partition_nr> <partition_type>primary</partition_type> <usepart config:type="integer">3</usepart> <size>15gb</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/local</mount> <partition_nr config:type="integer">5</partition_nr> <usepart config:type="integer">5</usepart> <size>8gb</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <fstopt>defaults</fstopt> <mount>/usr/local/storage</mount> <partition_nr config:type="integer">6</partition_nr> <size>max</size> </partition> </partitions> <keep_partition_num>1</keep_partition_num> <keep_partition_num>2</keep_partition_num> <keep_partition_num>3</keep_partition_num> <keep_partition_num>5</keep_partition_num> <use>all</use> </drive> </partitioning> </profile>
On Thursday 22 September 2005 11:51, Frank Steiner wrote:
So I still am not able to keep all partitions and just format some :-(
hmmm. This looks like a bug to me. I just have finished a fix for that but it needs more testing to verify that it doesn't break something else.
autoinstall@lists.opensuse.org