No need for kpartx in this case. Just check the FreeBSD disklabels inside the logical volume. This can be done using fdisk:
#fdisk /dev/vg0/backup
Command (m for help): b
Reading disklabel of /dev/vg0/backup1 at sector 64.
BSD disklabel command (m for help): u
Changing display/entry units to sectors
BSD disklabel command (m for help): p
8 partitions:
# start end size fstype [fsize bsize cpg]
a: 4194367 25165886 20971520 4.2BSD 2048 16384 28552
b: 63 4194366 4194304 swap
c: 63 146785904 146785842 unused 0 0
d: 25165887 46137406 20971520 4.2BSD 2048 16384 28552
e: 46137407 146785904 100648498 4.2BSD 2048 16384 28552
Easier and faster with sfdisk:
#sfdisk -d /dev/vg0/backup# partition table of /dev/vg0/
backupunit: sectors
/dev/vg0/backup1 : start= 63, size=146785842, Id=a5, bootable
/dev/vg0/backup2 : start= 0, size= 0, Id= 0
/dev/vg0/backup3 : start= 0, size= 0, Id= 0
/dev/vg0/backup4 : start= 0, size= 0, Id= 0
/dev/vg0/backup5 : start= 4194367, size= 20971520
/dev/vg0/backup6 : start= 63, size= 4194304
/dev/vg0/backup7 : start= 25165887, size= 20971520
/dev/vg0/backup8 : start= 46137407, size=100648498
Now multiply the start sectors by 512 and use the result as an offset in the mount options:
#mount -t ufs -o ufstype=ufs2,offset=23622352384,ro /dev/vg0/backup /mnt/backup/
Notice the ro (read-only) flag, as most linux distributions don’t come with UFS write support.
- install latest Ubuntu server
- install Xen 3.3
- get Xen kernel from Ubuntu Hardy Heron repos
- add hostonly network:
brctl addbr hostonly
- set dom0 IP for hostonly network:
ifconfig hostonly 10.0.0.1 netmask 255.255.255.0
- start Xen daemon:
/etc/init.d/xend start
- start domU:
xm create xxxx.xen [-c]
- access console on paravirtualized domU:
xm console domU-name
- close Xen console: “Ctrl”+”]” (on german macbook pro keyboard: ctrl+alt+6, on german windows keyboard: Ctrl+Alt Gr+9)
- forward Microsoft Windows Remote Desktop using iptables:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 78.46.104.242 --dport 3389 -j DNAT --to 10.0.0.10:3389
iptables -A FORWARD -p tcp -i eth0 -d 10.0.0.10 --dport 3389 -j ACCEPT
- to allow ping to Windows domU, check ICMP settings in Windows Firewall
To speed up a Windows domU, the GPLPV drivers do a great job in paravirtualising essential parts of the system. The latest Windows versions require drivers to be signed in order to be installed. When trying to run gplpv_Vista2008x64_0.11.0.188.msi on a Windows 2008 R2 domU, the installer shows a message about activating “test signing” mode.
This is done via:
bcdedit.exe /set TESTSIGNING ON
The registry key “HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SystemStartOptions” will be changed to “TESTSIGNING etc.”. The domU has to be restarted after the change.
However, the GPLPV installer will still complain about activating “test signing”. This is a bug in the installer, which is looking for “/TESTSIGNING” in the according registry key. Just temporarily edit the registy key and add the slash, this way the install should work. Don’t forget to revert the change afterwards.