Bug 37453 - Kickstart partitioning jumps into diskdruid
Summary: Kickstart partitioning jumps into diskdruid
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Brent Fox
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-04-24 17:11 UTC by Anders Blomdell
Modified: 2007-04-18 16:32 UTC (History)
0 users

Clone Of:
Last Closed: 2001-04-27 12:22:33 UTC

Attachments (Terms of Use)
ks file using fdisk in the %pre section (474 bytes, text/plain)
2001-04-25 20:15 UTC, Michael Fulbright
no flags Details

Description Anders Blomdell 2001-04-24 17:11:23 UTC
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 

Comment 1 Brent Fox 2001-04-24 18:16:26 UTC
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?

Comment 2 Anders Blomdell 2001-04-24 18:35:48 UTC
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^(

Comment 3 Michael Fulbright 2001-04-24 18:53:35 UTC
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.

Comment 4 Anders Blomdell 2001-04-24 19:07:37 UTC
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

Comment 5 Michael Fulbright 2001-04-25 20:15:59 UTC
Created attachment 16445 [details]
ks file using fdisk in the %pre section

Comment 6 Michael Fulbright 2001-04-25 20:17:12 UTC
Please try this method out.

Comment 7 Anders Blomdell 2001-04-27 08:04:35 UTC
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...

Comment 8 Anders Blomdell 2001-04-27 12:22:28 UTC
BTW: I used the following %pre lines:

mknod /tmp/hda
dd if=/dev/zero of=/tmp/hda bs=512 count=1
fdisk /tmp/hda << 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.

Note You need to log in before you can comment on or make changes to this bug.