Moode Audio Player for Raspberry Pi

Could always implement as a config setting but also could be permanent since I don't think checking for files first would have any negatives. There are two separate file checks though. One is for the known names "Cover, Folder, etc" and the other looks for any image type file. The logic would need to be rearranged a bit.
If there's not a clamor to change it there's no need to add complexity to things and make a preference for it. I didn't notice any difference in execution except the quality is occasionally better and is always uniform if the image is present whereas sometimes the routine would reject the embedded art in a file so it'd show two slightly different images when the embedded and folder images weren't identical.

And yeah, I just copy & pasted the order a bit. ;)
 
@stuzog
Are you knowing what is the content of your SD card ? It looks like 5 differents drives !

Have you another one, fresh formatted, that you can plug and post result ls command like you just did ?

Hi koda59,

I reformatted the SD card using Disk Utility in OS X on my iMac, then went through the process, and the result was exactly the same. So I deleted all the partitions and reformated the SD card with GParted in Linux and redid everything, but the same issue:

Code:
pi@raspberrypi:~ $ ls -al
total 44
drwxr-xr-x 3 pi   pi    4096 Dec 12 19:38 .
drwxr-xr-x 3 root root  4096 Nov 29 01:22 ..
-rw------- 1 pi   pi     400 Dec 12 19:38 .bash_history
-rw-r--r-- 1 pi   pi     220 Nov 29 01:22 .bash_logout
-rw-r--r-- 1 pi   pi    3523 Nov 29 01:22 .bashrc
drwxr-xr-x 2 root root  4096 Dec 12 04:10 mosbuild
-rwxr-xr-x 1 root root 12562 Dec  8 22:14 mosbuild.sh
-rw-r--r-- 1 pi   pi     675 Nov 29 01:22 .profile
pi@raspberrypi:~ $ sudo ./mosbuild.sh
****************************************************************
**
**  Moode OS Image Builder v1.0
**
**  Welcome to the automated process for creating the wonderful
**  custom Linux OS that runs moOde audio player.
**
**  You will need a Raspberry Pi running Raspbian with SSH
**  enabled, at least 2.5GB free space on the boot SDCard and
**  a spare USB or USB-SDCard drive that the new OS will be
**  written to during the build process.
**
**  Be sure to backup the SDCard used to boot your Pi
**
****************************************************************

////////////////////////////////////////////////////////////////
//
// STEP 1 - Download Raspbian Lite and create a new, base image
//
////////////////////////////////////////////////////////////////

** Check free disk space
** Do you have a backup of your boot SDCard (y/n)? y
** Unplug all USB storage devices from the Pi
** Are all USB storage devices unplugged (y/n)? y
** Plug in target USB drive for the new OS
** Is target USB drive plugged in (y/n)? y
** USB drive detected on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Partitions unmounted on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Option 1-5: use a proxy server for Internet access (y/n)? n
** Option 2-5: use a WiFi connection instead of Ethernet (y/n)? n
** Option 3-5: configure /var/www as squashfs (y/n)? y
** Option 4-5: install latest Linux Kernel (y/n)? y
** Option 5-5: Airplay, Ashuffle, LocalUI, Scrobbler, Squeezelite and UPnP/DLNA
** Install additional components (y/n)? y
** Ready for automated image build
** Proceed (y/n)? y
** Test Internet connection
** Download helper files
** Add options to properties file
** Load properties into env
** Base OS image was saved from previous build
** Use saved image to write to USB drive (y/n)? y
** Write image to USB drive on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
dd: unrecognized operand ‘/dev/sdb’
Try 'dd --help' for more information.
** Flush cached disk writes
**
** New base OS image created
**
** Remove the USB drive and use it to boot a Raspberry Pi
** The build will automatically continue at STEP 2 after boot
**
** Save base OS img for additional builds (y/n)? y
pi@raspberrypi:~ $ sudo shutdown -h 0
Shutdown scheduled for Tue 2017-12-12 20:41:20 UTC, use 'shutdown -c' to cancel.
Connection to 192.168.1.18 closed by remote host.
Connection to 192.168.1.18 closed.
[12:41:20][Stuart@Stuarts-iMac:~]$
Looks like the script is simply not writing to the SD Card.

Stuart
 
Yes because it can’t identify correctly the device for the SD

Your SD is identified as /dev/sda and /dev/sdb and /dev/sdc and /dev/sdd and /dev/sde ... very strange !

Maybe you can write it manually with

sudo dd if=<img file> of=/dev/sda

<img file> is the img file that you can find under mosbuild directory


Hi koda59,

I reformatted the SD card using Disk Utility in OS X on my iMac, then went through the process, and the result was exactly the same. So I deleted all the partitions and reformated the SD card with GParted in Linux and redid everything, but the same issue:

Code:
pi@raspberrypi:~ $ ls -al
total 44
drwxr-xr-x 3 pi   pi    4096 Dec 12 19:38 .
drwxr-xr-x 3 root root  4096 Nov 29 01:22 ..
-rw------- 1 pi   pi     400 Dec 12 19:38 .bash_history
-rw-r--r-- 1 pi   pi     220 Nov 29 01:22 .bash_logout
-rw-r--r-- 1 pi   pi    3523 Nov 29 01:22 .bashrc
drwxr-xr-x 2 root root  4096 Dec 12 04:10 mosbuild
-rwxr-xr-x 1 root root 12562 Dec  8 22:14 mosbuild.sh
-rw-r--r-- 1 pi   pi     675 Nov 29 01:22 .profile
pi@raspberrypi:~ $ sudo ./mosbuild.sh
****************************************************************
**
**  Moode OS Image Builder v1.0
**
**  Welcome to the automated process for creating the wonderful
**  custom Linux OS that runs moOde audio player.
**
**  You will need a Raspberry Pi running Raspbian with SSH
**  enabled, at least 2.5GB free space on the boot SDCard and
**  a spare USB or USB-SDCard drive that the new OS will be
**  written to during the build process.
**
**  Be sure to backup the SDCard used to boot your Pi
**
****************************************************************

////////////////////////////////////////////////////////////////
//
// STEP 1 - Download Raspbian Lite and create a new, base image
//
////////////////////////////////////////////////////////////////

** Check free disk space
** Do you have a backup of your boot SDCard (y/n)? y
** Unplug all USB storage devices from the Pi
** Are all USB storage devices unplugged (y/n)? y
** Plug in target USB drive for the new OS
** Is target USB drive plugged in (y/n)? y
** USB drive detected on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Partitions unmounted on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Option 1-5: use a proxy server for Internet access (y/n)? n
** Option 2-5: use a WiFi connection instead of Ethernet (y/n)? n
** Option 3-5: configure /var/www as squashfs (y/n)? y
** Option 4-5: install latest Linux Kernel (y/n)? y
** Option 5-5: Airplay, Ashuffle, LocalUI, Scrobbler, Squeezelite and UPnP/DLNA
** Install additional components (y/n)? y
** Ready for automated image build
** Proceed (y/n)? y
** Test Internet connection
** Download helper files
** Add options to properties file
** Load properties into env
** Base OS image was saved from previous build
** Use saved image to write to USB drive (y/n)? y
** Write image to USB drive on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
dd: unrecognized operand ‘/dev/sdb’
Try 'dd --help' for more information.
** Flush cached disk writes
**
** New base OS image created
**
** Remove the USB drive and use it to boot a Raspberry Pi
** The build will automatically continue at STEP 2 after boot
**
** Save base OS img for additional builds (y/n)? y
pi@raspberrypi:~ $ sudo shutdown -h 0
Shutdown scheduled for Tue 2017-12-12 20:41:20 UTC, use 'shutdown -c' to cancel.
Connection to 192.168.1.18 closed by remote host.
Connection to 192.168.1.18 closed.
[12:41:20][Stuart@Stuarts-iMac:~]$
Looks like the script is simply not writing to the SD Card.

Stuart
 
Last edited:
I have the same mistake

I have edited the "/etc/rc.local" file so it works.


Hi,

If the Build completed successfully without any errors then that line would not be in rc.local since the file gets replaced at the very end of the build with one that does not contain that line.

Do you have the following at the end of /home/pi/mosbuild.log ??

.
.
.

////////////////////////////////////////////////////////////////
//
// Final cleanup
//
////////////////////////////////////////////////////////////////

** Remove mosbuild
** Clean package cache
** Clear syslogs
** "a timestamp"

////////////////////////////////////////////////////////////////
// END
////////////////////////////////////////////////////////////////

** Final reboot
 
Yes because it can’t identify correctly the device for the SD

Your SD is identified as /dev/sda and /dev/sdb and /dev/sdc and /dev/sdd and /dev/sde ... very strange !

Maybe you can write it manually with

sudo dd if=<img file> of=/dev/sda

<img file> is the img file that you can find under mosbuild directory

Tried that:

Code:
pi@raspberrypi:~/mosbuild $ sudo dd if=2017-11-29-raspbian-stretch-lite.img of=/dev/sda bs=1M
dd: failed to open '/dev/sda': No medium found
Tried it this way:

Code:
pi@raspberrypi:~/mosbuild $ sudo dd if=2017-11-29-raspbian-stretch-lite.img of=../../sda bs=1M
1772+0 records in
1772+0 records out
1858076672 bytes (1.9 GB, 1.7 GiB) copied, 240.968 s, 7.7 MB/s
pi@raspberrypi:~/mosbuild $

Same solid green light on reboot with supposedly bootable card.
 
Last edited:
If there's not a clamor to change it there's no need to add complexity to things and make a preference for it. I didn't notice any difference in execution except the quality is occasionally better and is always uniform if the image is present whereas sometimes the routine would reject the embedded art in a file so it'd show two slightly different images when the embedded and folder images weren't identical.

And yeah, I just copy & pasted the order a bit. ;)

lol, hackin!

-T
 
Does MoOde os support the new hifiberry amp2 also is blue tooth now supported ??

On the Hifiberry Amp2 Page: “If the software you’re using doesn’t provide the Amp2 as an output option, you should use the HiFiBerry DAC+ driver as the Amp2 is basically a DAC+ with an integrated power stage.”

If you haven’t bought one yet (I see they are out of stock) I would recommend the IQAudio Pi DigiAmp+ - great boards!

My Hifiberry Amp has given no end of trouble : incompatible drivers causing volume issues, hardware volume control not functioning

Hifiberry aware that they made a bad design, but unwilling to fix their problem with a new driver.
 
Hi koda59,

I reformatted the SD card using Disk Utility in OS X on my iMac, then went through the process, and the result was exactly the same. So I deleted all the partitions and reformated the SD card with GParted in Linux and redid everything, but the same issue:

Code:
pi@raspberrypi:~ $ ls -al...
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
dd: unrecognized operand ‘/dev/sdb’
Try 'dd --help' for more information.
** Flush cached disk writes
**
** New base OS image created
**
** Remove the USB drive and use it to boot a Raspberry Pi
** The build will automatically continue at STEP 2 after boot
**
** Save base OS img for additional builds (y/n)? y
pi@raspberrypi:~ $ sudo shutdown -h 0
Shutdown scheduled for Tue 2017-12-12 20:41:20 UTC, use 'shutdown -c' to cancel.
Connection to 192.168.1.18 closed by remote host.
Connection to 192.168.1.18 closed.
[12:41:20][Stuart@Stuarts-iMac:~]$
Looks like the script is simply not writing to the SD Card.

Stuart

But the script works on other Pi, so the problem has to be with your card and it’s five partitions.

Use SD Memory Card Formatter
for Mac Download - SD Association


Choose ‘overwrite’. Check in Disk Utility that it only has one partition. Put it in the Pi, check that it only has one partition. Run the script again.
 
Hi koda59,

I reformatted the SD card using Disk Utility in OS X on my iMac, then went through the process, and the result was exactly the same. So I deleted all the partitions and reformated the SD card with GParted in Linux and redid everything, but the same issue:

Code:
pi@raspberrypi:~ $ ls -al
total 44
drwxr-xr-x 3 pi   pi    4096 Dec 12 19:38 .
drwxr-xr-x 3 root root  4096 Nov 29 01:22 ..
-rw------- 1 pi   pi     400 Dec 12 19:38 .bash_history
-rw-r--r-- 1 pi   pi     220 Nov 29 01:22 .bash_logout
-rw-r--r-- 1 pi   pi    3523 Nov 29 01:22 .bashrc
drwxr-xr-x 2 root root  4096 Dec 12 04:10 mosbuild
-rwxr-xr-x 1 root root 12562 Dec  8 22:14 mosbuild.sh
-rw-r--r-- 1 pi   pi     675 Nov 29 01:22 .profile
pi@raspberrypi:~ $ sudo ./mosbuild.sh
****************************************************************
**
**  Moode OS Image Builder v1.0
**
**  Welcome to the automated process for creating the wonderful
**  custom Linux OS that runs moOde audio player.
**
**  You will need a Raspberry Pi running Raspbian with SSH
**  enabled, at least 2.5GB free space on the boot SDCard and
**  a spare USB or USB-SDCard drive that the new OS will be
**  written to during the build process.
**
**  Be sure to backup the SDCard used to boot your Pi
**
****************************************************************

////////////////////////////////////////////////////////////////
//
// STEP 1 - Download Raspbian Lite and create a new, base image
//
////////////////////////////////////////////////////////////////

** Check free disk space
** Do you have a backup of your boot SDCard (y/n)? y
** Unplug all USB storage devices from the Pi
** Are all USB storage devices unplugged (y/n)? y
** Plug in target USB drive for the new OS
** Is target USB drive plugged in (y/n)? y
** USB drive detected on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Partitions unmounted on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
** Option 1-5: use a proxy server for Internet access (y/n)? n
** Option 2-5: use a WiFi connection instead of Ethernet (y/n)? n
** Option 3-5: configure /var/www as squashfs (y/n)? y
** Option 4-5: install latest Linux Kernel (y/n)? y
** Option 5-5: Airplay, Ashuffle, LocalUI, Scrobbler, Squeezelite and UPnP/DLNA
** Install additional components (y/n)? y
** Ready for automated image build
** Proceed (y/n)? y
** Test Internet connection
** Download helper files
** Add options to properties file
** Load properties into env
** Base OS image was saved from previous build
** Use saved image to write to USB drive (y/n)? y
** Write image to USB drive on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
dd: unrecognized operand ‘/dev/sdb’
Try 'dd --help' for more information.
** Flush cached disk writes
**
** New base OS image created
**
** Remove the USB drive and use it to boot a Raspberry Pi
** The build will automatically continue at STEP 2 after boot
**
** Save base OS img for additional builds (y/n)? y
pi@raspberrypi:~ $ sudo shutdown -h 0
Shutdown scheduled for Tue 2017-12-12 20:41:20 UTC, use 'shutdown -c' to cancel.
Connection to 192.168.1.18 closed by remote host.
Connection to 192.168.1.18 closed.
[12:41:20][Stuart@Stuarts-iMac:~]$
Looks like the script is simply not writing to the SD Card.

Stuart

Hi Stuart,

Between the two prompts below, a before and after snapshot are taken of the device config. Only one device should appear when they are compared, the device that was plugged in.

** Are all USB storage devices unplugged (y/n)? y
before_snapshot
** Plug in target USB drive for the new OS
after_snapshot


I'm not sure how below can result :-0 but if I can repro this maybe the Builder can be enhanced to deal with it.

** USB drive detected on /dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde


-Tim
 
Thanks, Tim, I'd really appreciate getting this to work. I have no idea why it's creating/seeing all those partitions. Right now, I can't use MoOde unless I can go back to the previous version -- how would I do that? Which file(s) do I download and copy onto the card?

Stuart

Hi Stuart,

You have to provide exact details on your configuration other wise it won't be possible to attempt a repro.

For example, are u using a Raspberry Pi-3B running latest Raspbian Stretch Lite, SSH enabled and a single USB drive plugged in?

-Tim
 
Thanks, Tim, I'd really appreciate getting this to work. I have no idea why it's creating/seeing all those partitions. Right now, I can't use MoOde unless I can go back to the previous version -- how would I do that? Which file(s) do I download and copy onto the card?

Stuart

Hi Stuart,

What kind of MicroSD to USB adapter are you using? Is it a muli-slot card reader? If so, that might be causing problems.

Just a thought.
Richard
 
Hi Stuart,

What kind of MicroSD to USB adapter are you using? Is it a muli-slot card reader? If so, that might be causing problems.

Just a thought.
Richard

My thoughts too. I have a Belkin muli-slot card reader that gives the same series of sdx when plugged in to linux.

A dedicated microSD to USB adapter is what you want.
Memwah Micro SD Card Reader - Fast USB 2.0 Adapter for all MicroSD cards - Pro Action Camera UK

Interesting.

What is output fro the cmd below when no USB devices are plugged in and then after a single device is pludgged in.

ls -tr /dev/disk/by-id 2> /dev/null | sort

-Tim
 
What is output from cmds below

mpc outputs

aplay -l

-Tim
Hi Tim,
Please see the results

Connecting to 192.168.1.4 port 22, please wait...
login as:
pi@192.168.1.4's password:
Linux kernel 4.9.67-v7+ running on armv7l architecture
____ __
__ _ ___ / __ \___/ /__
/ ' \/ _ \/ /_/ / _ / -_)
/_/_/_/\___/\____/\_,_/\__/

moOde audio player
(C) 2014 Tim Curtis


The programs included with Moode are free software; the
exact distribution terms for each program are described
in the individual files in /usr/share/doc/*/copyright.
Moode comes with absolutely no warranties expressed or
implied, or any other guarantees.

Last login: Wed Dec 13 01:54:51 2017 from 192.168.1.3

pi@moode:~ $ mpc outputs
Output 1 (ALSA default) is enabled
Output 2 (ALSA crossfeed) is enabled
Output 3 (ALSA parametric eq) is enabled
Output 4 (ALSA graphic eq) is enabled

pi@moode:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: BossDAC [BossDAC], device 0: Boss DAC HiFi pcm512x-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
pi@moode:~ $
 
Last edited:
Interesting.

What is output fro the cmd below when no USB devices are plugged in and then after a single device is plugged in.

ls -tr /dev/disk/by-id 2> /dev/null | sort

-Tim

Hi Tim, here is the Belkin reader (without a card inserted) before and after on my linux box.
It has 6 slots for 9 different types of card.

Code:
blunder@blunder-OptiPlex-755:~$ ls -tr /dev/disk/by-id 2> /dev/null | sort
ata-ST3250820AS_9QE15Z1E
ata-ST3250820AS_9QE15Z1E-part1
ata-ST3250820AS_9QE15Z1E-part2
ata-ST3250820AS_9QE15Z1E-part3
ata-ST3250820AS_9QE15Z1E-part5
ata-ST3250820AS_9QE15Z1E-part6
ata-ST3250820AS_9QE15Z1E-part7
blunder@blunder-OptiPlex-755:~$ ls -tr /dev/disk/by-id 2> /dev/null | sort
ata-ST3250820AS_9QE15Z1E
ata-ST3250820AS_9QE15Z1E-part1
ata-ST3250820AS_9QE15Z1E-part2
ata-ST3250820AS_9QE15Z1E-part3
ata-ST3250820AS_9QE15Z1E-part5
ata-ST3250820AS_9QE15Z1E-part6
ata-ST3250820AS_9QE15Z1E-part7
usb-Generic_STORAGE_DEVICE_000000001514-0:0
usb-Generic_STORAGE_DEVICE_000000001514-0:1
usb-Generic_STORAGE_DEVICE_000000001514-0:2
usb-Generic_STORAGE_DEVICE_000000001514-0:3
usb-Generic_STORAGE_DEVICE_000000001514-0:4

Here it is with a Moode sd card inserted.. this corresponds with it reporting as sdd I have been caught out by this reader before so now pay attention to df -h before using it to write...;)
blunder@blunder-OptiPlex-755:~$ ls -tr /dev/disk/by-id 2> /dev/null | sort
ata-ST3250820AS_9QE15Z1E
ata-ST3250820AS_9QE15Z1E-part1
ata-ST3250820AS_9QE15Z1E-part2
ata-ST3250820AS_9QE15Z1E-part3
ata-ST3250820AS_9QE15Z1E-part5
ata-ST3250820AS_9QE15Z1E-part6
ata-ST3250820AS_9QE15Z1E-part7
usb-Generic_STORAGE_DEVICE_000000001514-0:0
usb-Generic_STORAGE_DEVICE_000000001514-0:1
usb-Generic_STORAGE_DEVICE_000000001514-0:2
usb-Generic_STORAGE_DEVICE_000000001514-0:2-part1
usb-Generic_STORAGE_DEVICE_000000001514-0:2-part2
usb-Generic_STORAGE_DEVICE_000000001514-0:3
usb-Generic_STORAGE_DEVICE_000000001514-0:4

Code:
blunder@blunder-OptiPlex-755:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.4G     0  2.4G   0% /dev
tmpfs           492M  7.7M  484M   2% /run
/dev/sda2        13G  8.2G  3.4G  72% /
tmpfs           2.5G   44M  2.4G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.5G     0  2.5G   0% /sys/fs/cgroup
/dev/sda6        44G   37G  4.7G  89% /home
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           492M   88K  492M   1% /run/user/1000
/dev/sda7       159G  131G   29G  83% /media/blunder/hoarding
/dev/sdd2       481M  216M  237M  48% /media/blunder/root
/dev/sdd1        14M  3.7M   11M  27% /media/blunder/boot

On the other hand, my dedicated sd to usb adapter always reports as sdb if no other usb devices are plugged in and I have no problems with the Moode build recipes.

It will be interesting to see what Stuart is using ???.
 
Last edited:
Gentle persons.

A lot of messages have passed through this thread since I wrote a similar message back in the moOde 3.x days, but it seems even more urgent now that we are running the moOde builder (or the manual build script) on our own devices.

Please---when posting problems tell us *all* the nitty gritty hardware details. What RPi model, how powered, what size memory card, what peripherals (yes, their make and model) and how connected, what connectivity to LAN and to Internet, these are basic hardware details which set the stage for examining what so often is reported as a software issue.

Given that folks all over the world (just look at the flags!) are now successfully building moOde on a variety of hardware should be a clue that there's something different about yours. The more that's known, the more likely your problem will be solved quickly and, if warranted, the moOde builder or moOde itself will be adjusted to deal with similar cases. Sometimes, though, like the punchline to an old doctor joke, the right answer may be "don't do that."

Just my 2 cents worth (currently about 1 millionth of a Bitcoin).

Regards,
Kent