Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Virtualization
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Virtualization
For questions on VMWare, VirtualBox, Xen, QEMU and other virtualization software.

 
Thread Tools Display Modes
Old November 4th, 2008   #1
Baji
5 Cups of Ubuntu
 
Join Date: Jun 2006
My beans are hidden!
HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

After days of trying to get the ipod touch working in ubuntu (ad-hoc wireless sync / wine itunes / qemu + winxp / kvm + winxp / virtualbox-ose + xp) I finally have it working using:

Virtualbox-2.0.4 (PUEL)
Recompile usbcore (Modify MAX_USBFS_BUFFER_SIZE to 128K in drivers/usb/core/devio.c) see VirtualBox ticket #491

This is a workaround --A fix is scheduled for Virtualbox 2.1.

Ill share it here please respond with suggestions/improvements/comments. It should also work for the iPhone.

1. Install VirtualBox-2.0
2. Configure Ubuntu for VirtualBox-2.0
3. Usb Filesystem fix
4. Kernel usbcore fix
5. Install Windows XP in VirtualBox
6. Running VirtualBox
7. Troubleshooting
8. Sources


1. Install VirtualBox-2.0

Add repository to /etc/apt/sources.list
Code:
echo "deb http://download.virtualbox.org/virtualbox/debian intrepid non-free" | sudo tee -a /etc/apt/sources.list
Add sun public apt-get key
Code:
 wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
Install VirtualBox-2.0
Code:
sudo apt-get update && sudo apt-get install virtualbox-2.0
Beware: the virtualbox module vboxdrv conflicts with kvm. See troubleshooting for more info.


2. Configure Ubuntu for VirtualBox-2.0

Add yourself to the vboxusers group
Code:
sudo gpasswd -a `whoami` vboxusers
Startup vboxdrv module on boot by appending it to /etc/modules
Code:
echo "vboxdrv" | sudo tee -a /etc/modules

3. Usb Filesystem fix

Get the vboxusers group id
Code:
cat /etc/group | grep vboxusers
Quote:
vboxusers:x:128:spirit
Edit /etc/fstab to add these two lines and replace the devgid with the vboxusers group id
Code:
#usbfs for virtualbox
none /proc/bus/usb usbfs devgid=128,devmode=664 0 0

4. Kernel usbcore fix

check your current kernel version
Code:
uname -r
Quote:
2.6.27-7-generic
Get the sources for your kernel and fix usb/core/devio.c
Code:
sudo apt-get build-dep linux-source-2.6.27
sudo apt-get install linux-source-2.6.27 build-essential
tar -jxvf /usr/src/linux-source-2.6.27.tar.bz2
cd linux-source-2.6.27/drivers/usb/core
perl -pi.bak -e 's/16384/131072/' devio.c
make -C /lib/modules/`uname -r`/build/ M=`pwd` modules
strip --strip-debug usbcore.ko
sudo install -m644 -b usbcore.ko /lib/modules/`uname -r`/kernel/drivers/usb/core
sudo depmod -ae
sudo update-initramfs -u
Reboot your system and check if vboxdrv is running
Code:
lsmod | grep vbox
Quote:
vboxdrv 72472 0

5. Install Windows XP in VirtualBox

Start VirtualBox using Applications->System Tools->Sun xVM Virtualbox or type "VirtualBox" in a terminal
Install Windows XP (SP2+) in a virtual machine.
This guide gives a rough idea howto. It is pretty much straightforward.
https://help.ubuntu.com/community/VirtualBox


6. Running VirtualBox
  • Enable usb and usb2 in the settings for you virtual machine
  • install itunes inside the vm
  • connect the ipod touch
  • cancel f-spot
  • in the top of the vm box click Devices and activate the apple ipod
  • Run iTunes inside vm


7. Troubleshooting

vboxdrv cannot load because kvm is loaded
purge the kvm package

Code:
sudo dpkg --purge kvm
sudo rmmod kvm
sudo modprobe vboxdrv
howto rebuild the vboxdrv module
Code:
sudo /etc/init.d/vboxdrv setup
after upgrading it stopped working
You need to apply the kernel usbcore fix again, and rebuild the vboxdrv module (see above)


8. Sources

https://help.ubuntu.com/community/VirtualBox
[SOLVED] Virtual box ipod touch / iphone sync
http://www.virtualbox.org/ticket/491

Last edited by Baji; November 6th, 2008 at 05:14 PM..
Baji is offline   Reply With Quote
Old November 4th, 2008   #2
rickatnight11
Just Give Me the Beans!
 
rickatnight11's Avatar
 
Join Date: Dec 2006
Location: Richmond, VA
Beans: 62
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to rickatnight11 Send a message via Yahoo to rickatnight11 Send a message via Skype™ to rickatnight11
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

This looks great! I'm going to test this out tonight! Thanks for the hard work.
rickatnight11 is offline   Reply With Quote
Old November 7th, 2008   #3
ger_macaco
Just Give Me the Beans!
 
Join Date: Jan 2008
Location: Buenos Aires
Beans: 53
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

Did you try with iPod Touch 1G or 2G?
ger_macaco is offline   Reply With Quote
Old November 9th, 2008   #4
Baji
5 Cups of Ubuntu
 
Join Date: Jun 2006
My beans are hidden!
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

Quote:
Originally Posted by ger_macaco View Post
Did you try with iPod Touch 1G or 2G?
I tried it with the iPod Touch 8GB but it should work with the iPhone aswel
Baji is offline   Reply With Quote
Old November 9th, 2008   #5
ger_macaco
Just Give Me the Beans!
 
Join Date: Jan 2008
Location: Buenos Aires
Beans: 53
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

Quote:
Originally Posted by Baji View Post
I tried it with the iPod Touch 8GB but it should work with the iPhone aswel
But was it an iPod Touch 1G (no speaker) or 2G (with speaker)? I am asking because there is no driver for linux (and no way of accesing it yet) for 2G.
ger_macaco is offline   Reply With Quote
Old November 11th, 2008   #6
obloxeon
5 Cups of Ubuntu
 
Join Date: Dec 2006
Beans: 23
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

Tried it and no dice...
obloxeon is offline   Reply With Quote
Old November 11th, 2008   #7
huanix
5 Cups of Ubuntu
 
Join Date: May 2007
Beans: 38
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

I wrote a script that's working pretty well to allow people to sync pods in virtualbox:

http://www.huanix.com/2008/11/03/fix...ng-windows-xp/
huanix is offline   Reply With Quote
Old November 12th, 2008   #8
AndThenWhat
Gee! These Aren't Roasted!
 
Join Date: Apr 2008
Location: USA
Beans: 202
Ubuntu 9.04 Jaunty Jackalope
Send a message via AIM to AndThenWhat Send a message via Skype™ to AndThenWhat
Angry Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

I tried it and it didn't work. I have Intrepid with the same uname as you. I followed all steps but still get the error in iTunes about not being able to read the iPhone "" because of an unknown error.
AndThenWhat is offline   Reply With Quote
Old November 12th, 2008   #9
Baji
5 Cups of Ubuntu
 
Join Date: Jun 2006
My beans are hidden!
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

Quote:
Originally Posted by AndThenWhat View Post
I tried it and it didn't work. I have Intrepid with the same uname as you. I followed all steps but still get the error in iTunes about not being able to read the iPhone "" because of an unknown error.
Just to check, could you report the results of the following commands here:

grep 'vboxusers' /etc/group
grep '/proc/bus/usb' /etc/fstab
ls -al /proc/bus/usb/001/
lsmod | grep vbox
dpkg -l \* | grep virtualbox

If you have updated the kernel, you have to reapply the usbcore fix. Could you try reconfiguring the vboxdrv module (sudo /etc/init.d/vboxdrv setup) and restarting?

What iphone/ipod touch are you using? is it jailbroken?
Baji is offline   Reply With Quote
Old November 15th, 2008   #10
b3n87
A Carafe of Ubuntu
 
Join Date: Oct 2006
Beans: 145
Re: HOWTO: Ipod Touch Sync in Virtualbox & Intrepid Ibex

So can anyone confirm if this works with the iPhone 3G?

Last edited by b3n87; November 15th, 2008 at 01:23 PM..
b3n87 is offline   Reply With Quote

Bookmarks

Tags
intrepid, iphone, ipod touch, jaunty, usb 2.0, virtualbox

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:02 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry