One of the forum members PMed me with a Q on this topic, it is better to as questions here so that others can read the dialogue
Your tutorial has been of great help. Specifically in trying to resize vdi's. I qualify as a "non-expert" and followed your recommendations to no avail.
I'm running VB 2.1.0 on a Linux Host. I have a couple dynamic vdi's that I am trying to expand. vdi are stored on a ext2 partition and my VM's partitions are FAT32 (I know, I should go to NTFS but not enough space to run convert...)
The copy process using gparted Live, Disk Copy or simple dd command all seems to copy the partition properly. However I have not try to increase the size of the new partition since I cannot make the new partition to boot.
I got everything from Boot error, hanging screen and NDLR missing errors. In recovery mode I have tried various combinations of fixboot and fixmbr.
TerryE wrote:The tedious bit is then getting the new partition to boot properly ... Once you’ve cracked this for your OS, you can quickly get this down to a routine process, but there are enough complications here to merit a separate topic in its own right."
- Do I make the new partition active before or after the copy?
- Should I format the new partition before the copy?
- If I reboot after the copy process, the new partition gets assign the "d" drive.
- Unclear about the fixboot fixmbr. You say in the tutorial to just run fixboot. Does the order matters?
Any help would be greatly appreciated.
OK. Let's pick this apart. (I am assuming that you are running XP as your guest). First a couple of points (i) you should really do a tunefs -j
to convert your ext2
partition to ext3
. There are tiny performance advantages to ext2 at a loss of a risk of file system integrity. (ii) I am not sure why you can't run convert32. If necessary make space by moving data onto another (temporary) VDI which you've formatted using the XP disk management function.
With XP I strongly recommend using one partition to store your OS, core Program Files
and your Documents and Settings
for the Administrator
account only. Move all other Documents and Settings
including All Users
onto a second D partition (this involves some registry tweaks in the case of XP Home, or an easier approach is to use one of the SysInternals tools). All of the partitions apart from the system C partition can be simply copied using file manager simply by attaching the new disk to the old system, logging on in Safe mode and using xcopy to copy the entire contents of the partitions one-by-one from the old disk to the new. This way the new partition can be NTFS and the old FAT32. No problem. In fact this approach also works if you can boot from a BartPE ISO and various other permutations like temporarily cloning the old VDI and copying from the clone to the new ...
Just remember to clean up your C drive before copying it if you are using a clone method rather that a filesystem to filesystem method.
But to your specific Qs:
(i) Read the wiki article on MBR. Making a partition active just sets a bit in the partitions entry in the partition record in the MBR. You can do this at any time. However you should have one and only one active partition on a HDD volume.
(ii) If you are copying a file system using GParted or the like then you don't need to format the destination FS. If you are using XCOPY within XP then you do.
(iii) You have two VDIs attached during the copy. You need to remember to release them from the VM and attach the new VDI in the place of the old one so that when you boot it assume the same drive letters. Also remember that there is nothing stopping you splitting your system over multiple VDIs: one for the C partition, one for the D etc. and in many ways this makes managing your VM a lot easier.
(iv)boot. See as follows.
You will be booting your XP system using a standard MS boot process. Here the MS MBR bootstrap scans the MBR looking for the active partition. For XP this is a fixed bit of code which is place onto the MBR by fixmbr (or infact with most Linux distros you can apt-get it and put it onto a floppy image to load from your liveCD, and some liveCDs have it preconfigured).
The MBR bootstrap then jumps into the bootstrap stored in Sector 1 of the active partition. This is the start of the NTLDR. The NTLDR understands NTFS etc. It processes the boot.ini menu, loads any SCSI drivers if needed, the NT Kernel and HAL. It then reads enough of the registry to select the appropriate H/W profile and loads any device drivers. From there the booted NT kernel takes over and you are away.
Fixboot repairs the integrity of the bootstrap within the boot partition
, that is the NTLDR etc because this has some hard-wired offsets in it. This is why you need to specify a drive letter for this. Normally if you are doing a clone of a partition then you won't need to do a fixboot.