I’m writing this from my Windows install on my SSD. The conversion went very smoothly. I rebooted, the Intel software copied my drive before even getting to Windows, and when I rebooted, my SSD was bootable.
With windows working, it’s time to get my Linux install squared away. I’m going to recreate my raw vmdks, in case my drive numbers have changed in Windows. I’ll pass both my RAID array and (about to be reformatted) Windows HDD.
The only difference this time is to make sure to dismount anything first if necessary (My old Windows disk got mounted at startup).
While booting, I kept receiving the following error:
The solution to this is to delete the partition on the disk before booting (I was about to format it in Virtualbox anyway). After deleting that, my bridge VM worked correctly. I went into /mnt and got my logical volumes mounted.
My HDD is sda (that’s because it’s attached to port 0 in the virtual machine settings). So, the next step is to partition it the same way I had it partitioned under Windows.
In this case, I had the following partitions:
2MB – for GRUB2
200MB – /boot
Rest of drive – /
So, I fired up fdisk and created those three partitions.
Then, I ran mke2fs on /boot and / to create ext4 partitions:
mke2fs -t ext2 /dev/sda2 mke2fs -t ext4 /dev/sda3
Now, I can untar my tar files into the correct directory:
tar --preserve-permissions --preserve-order -z -x -f /mnt/lvolhome/matt/slash.tar.gz
Oops! This got me /mnt/real_slash/mnt/ssd_slash!
I just moved everything into the right directory (two dirs up) and I was good to go.
I did the exact same thing with my /boot partition:
tar --preserve-permissions --preserve-order -z -x -f /mnt/lvolhome/matt/slash.tar.gz
So where does this leave me? I have my Linux install on the correct disk, with all of the data ready to go. The filesystems are the same (although / is bigger).
Before I can think about booting, I need to get GRUB reinstalled on that drive.
To do that, I cheated a little bit here and booted my bridge VM with an Arch Linux iso. This is because I wanted to chroot, just like is done in the installer before reinstalling GRUB.
So, I downloaded the latest Arch iso and booted from it. First, I activated the logical volumes:
vgchange -a y VolGroup00
I mounted my / partition to /mnt/arch
mount /dev/sda3 /mnt/arch
Then, I mounted my boot, var, and home partitions
mount /dev/sda2 /mnt/arch/boot mount /dev/VolGroup00/lvolhome /mnt/arch/home mount /dev/VolGroup00/lvolvar /mnt/arch/var
Next, I mounted all of the filesystems necessary for chrooting
cd /mnt/arch mount -t proc proc proc/ mount -t sysfs sys sys/ mount -o bind /dev dev/ mount -t devpts pts dev/pts/ chroot /mnt/arch /bin/bash
From here, I only needed to do two things: Fix my fstab, and reinstall GRUB.For the fstab, the only thing I needed to do was change the UUID of my / and /boot partitions. I used blkid to find the new UUID.
And updated fstab appropriately:
With that fixed, I’m ready to get GRUB installed.
This actually required almost not work on my part, because the commands that generate the grub configuration file are fully automated. I have an existing custom file in /etc/grub.d/40_windows for the windows boot option, but the Intel cloning software kept the UUID.
So, getting GRUB installed was as simple as the following:
grub-mkconfig -o /boot/grub/grub.cfg grub-install /dev/sda
Using grub-install like that is why I wanted to chroot (and why I switched to an Arch iso).
After that was done, I reboot and both the Linux and Windows entries in the grub menu worked correctly (I changed my BIOS to boot to my HDD before my SSD). Also, I have GRUB configured to chain boot windows.
Next, I’ll put /var back onto / (I only ever had it that way to save on SSD writes) and move my home directory to the HDD temporarily so I can reformat the RAID array as NTFS.