Linux – jozefmares.com
Home Tags Posts tagged with "Linux"
Tag:

Linux

I needed to migrate Linux RAID partition (originating from Synology NAS) to new disk and I needed to do it under OS X.
With VMware Workstation this was not big deal, but seems like this is not possible from Fusion user interface.

Required steps

    1. Get name of device (use diskutil list or under Disk utility).screenshot_os_x_diskutil
    2. Start terminal (in Applications/Utilities).
    3. Change current working directory to WMware Fusion folder:
cd "/Applications/VMware Fusion.app/Contents/Library/"
    1. Create VMDK file which will be linking our real, raw device:
./vmware-rawdiskCreator create /your/device fullDevice ~/your-device ide
    1. Next, we need to go to folder where are virtual machines stored (usually Documents/Virtual Machines – in my case dedicated RAID drive).
    2. Find relevant virtual machine, click Show Package Contents.
    3. Move created file (your-device.vmdk) to opened folder.
    4. Open in favorite text editor machine_name.vmx and append:
ide1:1.present = "TRUE"
ide1:1.fileName = "your-device.vmdk"

You should be able to mount device under desired guest. I utilized this method to migrate data from RAID partition to USB drive during big clean-up and consolidation :).

Other small lessons learned

  • To make USB drive works as USB3 device you need at least kernel 3.2.
  • USB3 is really fast and stable, even under VMware Fusion.
  • Journaled HFS works very well under Linux, but you need to mount it with -o force,rw.

When I’m trying to create bootable Linux stick on Mac OS X (yes, I’m doing it) I usually get this error on PC (during boot attempt):

Missing operating system

This is because Unetbootin fails to set partition on USB stick as active and also somehow (I’m lazy to do code review) fails to install mbr.bin from syslinux.

This is how I fix it:

1. plug USB stick to Mac
2. list devices:

diskutil list

3. unmount usb stick (no, eject from Finder is not right thing to do):

diskutil unmountDisk /dev/disk2

4. fix problem with active partition:

sudo fdisk -e /dev/disk2
f 1
write
exit
diskutil unmountDisk /dev/disk2

5. download syslinux

6. write mbr.bin to USB stick (locate mbr.bin first):

sudo dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/disk2

7. write distribution as usual using Unetbootin.