The following lines in kickstart fails and prompts for disk druid/fdisk. clearpart --all part /export/c --size 2000 --onprimary 1 part / --size 4000 part swap --size 256 removing "--onprimary 1" works (except that /export/c is not on partition 1).
It's usually a good idea to have a /boot partition located somewhere inside the first 1024 cylinders on the disk. I have a feeling that this is the problem. I bet if you used something like this: clearpart --all part /boot --size 50 --onprimary 1 part /export/c --size 2000 --onprimary 2 part / --size 4000 part swap --size 256 then things would work correctly. Some bioses don't support booting off partitions over 1024 cylinders, so you have to have a small boot partition inside the first 1024 cylinders for the system to boot. Does this fix the problem?
No, because the problem is that anaconda prompts for disk druid/fdisk. The system boots fine if I have a disk that is prepartitioned as follows: # fdisk -l /dev/hda Disk /dev/hda: 255 heads, 63 sectors, 1869 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 255 2048256 6 FAT16 /dev/hda2 256 765 4096575 83 Linux /dev/hda3 766 1869 8867880 5 Extended /dev/hda5 766 798 265041 82 Linux swap and use the following partitioning commands part /export/c --usepart hda1 --noformat part / --usepart hda2 part swap --usepart hda5 This bug might be related to #25683. Unfortunately I don't have time to dive deeply into the problem in the next two weeks 8^(
You need to use --onpart hda1, I believe, to use a pre-existing partition. You probably should set the type using the --type parameter as well. --onprimary is only for allocating new partitions. We do not support allocating non-Linux native partitioning via kickstart.
1. I don't want to use a preexisting partition, I just wanted to make clear that the problem was NOT LILO, but anaconda. 2. I want to allocate a new primary partition during kickstart, and it DOES fail even without "--type 6". -- Flame on The set of patches I sent in for RedHat 7.0 did work with these partitioning commmands, question is if it is any use to spend time on improving(?) kickstarting if problems are classified as NOTABUGs. It is a nuisance to prepartition all disks when I get new machines, but if you don't want the functionality I wont try to persuade you. --Flame off
Created attachment 16445 [details] ks file using fdisk in the %pre section
Please try this method out.
Works like a charm (but the syntax stinks). More support for my case that the intelligence in kickstart partitioning should be scrapped? What about syntax along these lines: clearpart ... part hda1 --size xx ... part hda2 ... part hdb1 ... raid md0 --level 1 hda2 hdb1 ... mount / --device hda1 ... mount /home --device md0 --noformat...
BTW: I used the following %pre lines: %pre mknod /tmp/hda dd if=/dev/zero of=/tmp/hda bs=512 count=1 fdisk /tmp/hda << EOF n p 1 +2048M t 1 6 p w EOF mknod /tmp/hda1 dd if=/dev/zero of=/tmp/hda1 bs=512 count=10 rm /tmp/hda rm /tmp/hda1 The dd to /tmp/hda1 is to make sure that mount doesn't try to mount /dev/hda1 by the [possible] now obsolete ext2fs '/' label.