[ubuntu-uk] Creating a partition at end of the disk

Matthew Saunders me3ohm at gmail.com
Wed Nov 15 09:50:19 GMT 2006


I am installing Ubuntu Server 6.10 for the purpose of creating an
installation environment for our 700 computers.  It will be a small
linux partition that has scripts to connect to the image store and
reimage the Windows partition and will include other support tools
like backing up files for example.

Currently, I have created ntfsclone images, and reimaged these back to
the hard drive via an sshfs mount and using dd to zero hda2 on each
attempt. The bit I am stuck on is creating the partitions using a
script due to the ramdom sizes involved.  I need hda1 to be the size
of the disk minus 500mb, whereas hda2 is the 500mb.  I have got loads
of results from sfdisk, fdisk, and cfdisk, but I am not use what value
to trust for 'out in the wild' use because some of the values vary
from hard drive to hard drive.

Does anyone have any ideas on how to get a partition of 500mb at the
end on the disk and then another the rest of the size at the
beginning?  I have seen a program before that  has an option for
beginning or end when creating the partition, just can't remember
which one.  I am currently using fdisk and directing the key presses
from a file.

The reason for not having the 500mb at the front, and then the rest
for Windows is due to NTFS having to know in it's partitions table
where the beginning of the partition is.  NTFS does not trust the hard
drive partition table (apparently, so many google searches report).
After NTFS cloning the windows partition, I use ntfsresize to increase
it's partition table's size to the maximum of the partition - this
works fine for the size but does not resolve the start block.  Norton
Ghost resolves the issue of the partition start block, but if I create
the partitions on another drive, it doesn't boot because 500mb from
the start of the disk might be on a different block.  I have already
seen two drive with different block sizes!

Sorry this is long...



More information about the ubuntu-uk mailing list