You are not logged in.

#1 2009-09-24 17:31:38

digivampire
Member
From: Irvine, CA
Registered: 2008-10-21
Posts: 8
Website

Arch linux through vmware in dual boot

Hi guys,

I've reinstalled arch again on a fake (intel) raid system with dual boot with Windows 7. Right now arch runs just fine natively on the machine, but I want to set it up so I can run it from vmware in windows as well. I have most things figured out but I have a small problem which I have yet to tackle.

Natively the disks are mapped through dmraid in the following manner (etc/fstab):

/dev/mapper/isw_cidbgaibjd_Systemp3 /boot ext2 defaults 0 1
/dev/mapper/isw_cidbgaibjd_Systemp5 swap swap defaults 0 0
/dev/mapper/isw_cidbgaibjd_Systemp6 / ext4 defaults 0 1
/dev/mapper/isw_cidbgaibjd_Systemp2 /mnt/Win7 ntfs-3g defaults 0 0
/dev/mapper/isw_cidbgaibjd_Datap1 /mnt/Data ntfs-3g defaults 0 0

To access from vmware in Win7 I have set up vmware to map the physical (raid) drive where the arch partitions are for the virtual machine. The difference is that in Win7 the raid drive /dev/mapper/isw_cidbgaibjd_System is seen as /dev/sda (vmware abstracts the raid drive as a regular scsi/sata drive).

I've used mkinitcpio to generate a separate profile "kernel26-vmware" to load different hooks to boot arch linux in a virtual machine and create a separate runlevel (runlevel 7) to load different daemons at boot and added a new entry in grub to load the kernel26-vmware mkinitcpio image and go into runlevel 7. The only problem remaining is to switch out /etc/fstab so that it loads proper device paths to the raid drive partitions e.g.:

/dev/sda3 /boot ext2 defaults 0 1
/dev/sda5 swap swap defaults 0 0
/dev/sda6 / ext4 defaults 0 1
/dev/sda2 /mnt/Win7 ntfs-3g defaults 0 0
/dev/sdb1 /mnt/Data ntfs-3g defaults 0 0

So the question is, is there anyway to tell mkinitcpio to rewrite fstab at boot with what I want depending on if I'm booting arch natively through dual boot, or booting from vmware in Win7? I've seen that mkinitcpio has "FILES" directive which enables it to load additional custom files. Can this be used to load two separate fstabs and a small script that will ovewrite /etc/fstab on boot?

Last edited by digivampire (2009-09-24 17:32:48)

Offline

#2 2009-09-25 04:46:22

digivampire
Member
From: Irvine, CA
Registered: 2008-10-21
Posts: 8
Website

Re: Arch linux through vmware in dual boot

Nevermind, I figured out the solution. Since UUIDs are preserved on the filesystem, setting fstab to use /dev/disk/by-uuid... works when booting both native and from vmware.

Offline

Board footer

Powered by FluxBB