Quote:
Originally posted by leosgb
I strongly suggest the reading of gnupod's manual because it is very self contained but i leave here a few steps to use it(taken from the manual):
1 - prepare it for gnupod if it was never done before(command changes if you have a mac like ipod):
gnupod_INIT.pl -m /mnt/ipod
2 - Add a few songs:
gnupod_addsong.pl -m /mnt/ipod /mp3_dir/*
3 - Delete songs(will delete all files from artistname):
gnupod_search.pl -m /mnt/ipod -a "artistname" -d
4 - before leaving:
mktunes.pl -m /mnt/ipod
/usr/bin/sudo /usr/bin/eject /dev/sda1
These are the steps i take to use mine. There are many other options please refer to the manual first! Thanks jaufrec for your help and good luck for the others.
|
Yup, I just got my brand new 1GB ipod shuffle working with Linux! I'm so happy! It took me a while to figure out because I haven't played around with mounting USB devices before and my ipod already had a few songs from itunes installed (on my dad's Windows machine). Here's what I did step by step:
1) Decide a directory for mounting your ipod shuffle. I used /mnt/ipod, and from here on out I will refer to it as {ipodDIR}, so wherever you see it replace that with the name of
your mount directory
2) Edit your .bashrc file in your home directory. Add the following at the beginning after the comments:
Code:
# Add mount path for ipod
export IPOD_MOUNTPOINT={ipodDIR}
Obviously, '/mnt/ipod' should be replaced with whatever directory you decided to use to mount your ipod. This is so that you don't have to tediously type '-m={ipodDIR}' everytime you run a gnupod script.
3) Type "source .bashrc" (assuming you are in your home directory
4) Type su and enter password to get root priveldges
5) Now create the directory for mounting your ipod shuffle. 'mkdir {ipodDIR}'
6) Plug your ipod into a functional USB port on your PC
7) Type "cat /proc/bus/usb/devices | grep ipod" and make sure you see that the device is plugged in properly. If you don't see it listed check your USB connection (the orange LED on the front of the ipod shuffle should be blinking when it's plugged in, but it might not if it's fully charged I think)
8) Type 'modprobe -l | grep usb-storage' to make sure you have the usb-storage module loaded. If you don't, simply type modprobe usb-storage.
9) Now it's time to mount your ipod shuffle. My device was at '/dev/sda1', but yours may be different. 'mount -t vfat /dev/sda1 {ipodDIR} -o sync'
10) If it's your first time running gnupod on your ipod shuffle run the following command: 'gnupod_INIT'. This creates the directory tree and file structure that gnupod requires. You only have to run this once.
11) Run 'gnupod_check' and make sure there are no errors reported. If there are errors, see A) below.
12) Time for the fun stuff, adding music! This is the usage: "gnupod_addsong file_path/file_name". Wildcards work here too. Here's a couple cases:
Code:
gnupod_addsong ~/music/foreign/*.mp3
gnupod_addsong /home/username/music/classical/Beethoven_-_Moonlight_Sonata.mp3
13) After you are done adding all the music you want, run 'gnupod_search' which will print out every music file loaded on your ipod shuffle. You might also want to do this periodically if you are adding *a lot* of music, because it also reports how much space is left on the ipod.
14) Run gnupod_check one more time to make sure that there weren't any errors loading any of the files (I actually had a couple the first time, which caused my ipod to not play anything!)
15) *DO NOT UNPLUG OR UNMOUNT YOUR IPOD YET*. First run 'mktunes'. This script formats the gnupod playlist into the ipod playlist so that your ipod shuffle will actually play the files.

(if you accidentally forget to do this, plug your ipod back in and re-mount it, then run the script and unmount it and it should be fine)
16) Now it is unsafe to unmount your ipod. Type 'umount {ipodDIR}'
17) Now you can listen to your music. Unplug the shuffle from the USB port and enjoy.
******************* Possible Problems and Fixes ***********************
A) If you have any errors reported by gnupod_check, run the following: 'gnupod_addsong --restore' I had to run it a couple times as I kept screwing things up.

Then run gnupod_check again to make sure it works.
B) If you still have errors (like bad files) you can try browsing through {ipodDIR} and manually remove the old files. You can also do a "rm -rf" on the first subdirectory inside {ipodDIR}, but you will lose all your music if you do so and will have to run gnupod_INIT once again.
I hope that helps some people avoid the frustration I have for the past hour or so. Obviously there are some more advanced functions than what I listed here, but these are the basics. The gnupod manual is always a good source of information, however it seems geared towards ipod users (not ipod shuffle) and use with firewire, not usb.
GNUPOD manual:
http://www.gnu.org/software/gnupod/gnupod.html