[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Problem with fdisk partition aligment (for VMWare) and kickstart patitioning



Thomas Hemmingby Espe wrote:
(this has also been posted to rhn-satellite-users, sorry for the cross-posting).

Hello.

We are trying to setup automated partition aligment during kickstart
install. The kickstart is generated
from a Satellite 5.4 installation.

In the %pre-section of the kickstart, I have the following script:

fdisk /dev/sda <<EOF
d
1
d
2
d
3
d
4
n
p
1
1
+200m
t
fb
x
b
1
128
w
EOF

which deletes previously created partitions, creates a 200MB partition
and aligns it to sector 128, as per
http://www.vmware.com/pdf/esx3_partition_align.pdf
Then, we create the remaning partitions:

part /boot --fstype=ext3 --noformat --onpart=sda1
part pv.00 --size=1000 --grow
volgroup vg00 pv.00
logvol /opt --vgname=vg00 --name=optvol --size=6000 --grow
logvol /var/opt --vgname=vg00 --name=varoptvol --size=1000 --grow
logvol /var --vgname=vg00 --name=varvol --size=4000
logvol / --vgname=vg00 --name=rootvol --size=8000
logvol swap --vgname=vg00 --name=swap --size=4000

During installation, after the %pre-scripts have run, the following
messages appears:

"Unable to locate partition sda1 to use for /boot.
Press OK to reboot your system"

On VT 2, I am able to verify that the partition does indeed exist
(using fdisk -lu) and that it starts at sector 128.

Has anyone else been experiencing this? Does anyone see a solution to this?

Sincerely,




Instead of doing the "d 1 d 2 ..." I just zero out the mbr with dd

dd if=/dev/zero of=/dev/sda bs=512 count=1

Then, I do a similar fdisk <<EOF, however, I also set sda1 to be bootable, and create a partition for the physical volume, set it to making sure to start/end on a boundary.

I'd double check to make sure you don't have a clearpart directive that is overwriting your changes.

You could also try running partprobe after you finish writing out the change to the partition table.

Hugh


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]