kickstart partitioning fails with --recommended or --asprimary

Bug #48311 reported by Matt Soccio
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kickseed (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Use system-config-kickstart to generate a ks.cfg with three partitions like so:

#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext3 --size 3500 --asprimary
part swap --recommended
part /home --fstype ext3 --size 1 --grow --asprimary

When the partitioner kicks in there is a brief warning of "getopt: --recommended not recognized". Once the partitioning begins, it fails and states that it cannot create a partition outside of the disk. If I define a size for swap and get rid of the --asprimary, the disk gets automatically setup with logical partitions.

Revision history for this message
Colin Watson (cjwatson) wrote :

I know that --recommended isn't supported, but to my knowledge --asprimary is supported. Did you try without --recommended but with --asprimary?

Changed in system-config-kickstart:
status: Unconfirmed → Confirmed
Revision history for this message
Matt Soccio (soccio) wrote :

Colin,

I've reboot several times, and in each case part 1 was for a 3.5G / as primary, part 2 was for a 256K swap as primary. All test were done by tweaking the settings for part 3 which was for /home.

1. --asprimary --size 1 --grow -> Failed with "Can't have partition out side of disk" while computing the partitions.

2. --asprimary --size 2000 -> Succeeded to partition

3. --size 1 --grow -> Succeeded to partition

It looks like the --asprimary + --grow does not work in this case. Warning - we are setting up an auto-installer for our school district to redistribute old PC's to needy families. Both of the very old PCs that I have tested so far has done the low-mem install. While I don't see any reason that this should affect the kickstart partition process, I wouldn't be surprised if this was some sort of old-school large disk issue at the bios level.

Revision history for this message
William Oakley (woakley) wrote :
Download full text (4.7 KiB)

Hello Matt and Colin

We are assessing Ubuntu Server 6.06 LTS (32 and 64bit) for use as a low cost Linux web hosting platform in our Datacentres across Europe.

Having used the Debian Installer for installing Debian for some time now, we were keen to try out the Ubuntu kickstart install as a replacement. Debian has been a popular choice for many of our customers over Redhat for a number of reasons and we feel that Ubuntu can trump that. However, like Matt, we have noted some issues with this in relation to partitioning.

We have noted the following results so far:

1. When using the following config for partitioning:

# disk config
zerombr yes
clearpart --all --initlabel
bootloader --location=mbr
part / --fstype=ext3 --size=8192 --asprimary
part swap --size=512 --grow --maxsize=2048 --asprimary
part /var --fstype=ext3 --size=6000 --grow --asprimary

This produces an installed system which is partitioned as follows:

root@ubuntu:~# fdisk -l /dev/hda

Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/hda1 1 996 8000338+ 83 Linux
/dev/hda2 997 1058 498015 82 Linux swap / Solaris
/dev/hda3 1059 4865 30579727+ 5 Extended
/dev/hda5 1059 4865 30579696 83 Linux

root@ubuntu:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 7.6G 485M 6.7G 7% /
varrun 125M 48K 125M 1% /var/run
varlock 125M 0 125M 0% /var/lock
udev 125M 40K 125M 1% /dev
devshm 125M 0 125M 0% /dev/shm
lrm 125M 18M 107M 15% /lib/modules/2.6.15-27-686/volatile
/dev/hda5 29G 266M 27G 1% /var

root@ubuntu:~# mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
varrun on /var/run type tmpfs (rw)
varlock on /var/lock type tmpfs (rw)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
devshm on /dev/shm type tmpfs (rw)
lrm on /lib/modules/2.6.15-27-686/volatile type tmpfs (rw)
/dev/hda5 on /var type ext3 (rw)

Hence, the system has not followed our request to partition /var as a primary partition. But it has for / and swap partitions.

2. When using the following config for partitioning:

# disk config
zerombr yes
clearpart --all --initlabel
bootloader --location=mbr
part / --fstype ext3 --size 8192
part swap --size 2048
part /var --fstype ext3 --size 1 --grow

This produces an installed system which is partitioned as follows:

root@ubuntu:~# fdisk -l /dev/sda

Disk /dev/sda: 36.2 GB, 36270243840 bytes
255 heads, 63 sectors/track, 4409 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 1 4409 35415261 5 Extended
/dev/sda5 1 996 8000307 83 Linux
/dev/sda6 997 1245 2000061 82 Linux swap / ...

Read more...

Revision history for this message
William Oakley (woakley) wrote :

Colin

Is the kickstart method of installing still being developed? If so, I'd be intertested in finding out what the next developments are likely to be.

I look forward to talking further with you.

kind regards

- William

Revision history for this message
stephen mulcahy (stephen-mulcahy) wrote :

Hi,

I just got bitten by this bug also. The following does not work (on reboot, the I get a kernel panic on being unable to mount root),

part swap --size 4096 --asprimary --ondisk sda
part / --fstype ext3 --size 10240 --asprimary --ondisk sda
part /webstar1 --fstype ext3 --size 1 --grow --asprimary --ondisk sda

The following works as expected (giving me logical partitions)

part swap --size 4096 --ondisk sda
part / --fstype ext3 --size 10240 --ondisk sda
part /webstar1 --fstype ext3 --size 1 --grow --ondisk sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004b696

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 498 4000153+ 82 Linux swap / Solaris
/dev/sda2 499 121601 972759847+ 5 Extended
/dev/sda5 499 1743 10000431 83 Linux
/dev/sda6 1744 121601 962759353+ 83 Linux

Revision history for this message
MAIRE Romuald (rmaire) wrote :

Hi,

Apparently the bug is still here ! I'm working on a Jaunty Ubuntu Server auto install.

The following doesn't work :
         part / --fstype ext4 --size=20480 --asprimary
         part swap --size=2048 --asprimary
         part /home --fstype ext4 --size=1 --grow --asprimary

But after few searches and few tests the following is working :
         part / --fstype ext4 --size=20480 --asprimary
         part swap --size=2048 --asprimary
         part /home --fstype ext4 --size=1 --grow

Note that the only different thing is that the last partition isn't "--asprimary" ...
It's apparently impossible to have all partitions as PRIMARY. On a disk we can have 4 primary partitions (taking care that the last can be a extended partition with logical partitions within).

Do you thing the bug can be solved (since 2006...) ???

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.