Clean OS (Debian), OpenMediaVault and other "firmwares"

Webmin has been around for years mostly as a solution for managing webservers and for overall system administration. It is not specifically geared towards home solutions.You can nevertheless better extend it for that purpose by using third party modules such as  MiniDLNA Webmin Module.

MiniDLNA v. 1.1.2 versus v. 1.0.24 adds a better handling of the way content folders are organized. 1.1.2 versus 1.1.4 seems to notoriously add the following option which is useful if you want to serve mediafiles say from a camera, mixing photos and videos:

# + " PV" for pictures and video (eg. media_dir=PV,/home/jmaggard/digital_camera)

As for installing Plex, the bitbucket how-to guide is sound. It will work as it is, although I would suggest installing the chroot outside of the system 2GB partition because of size (the wheezy-armel chroot + Plex amount to as much as 400MB of data).

Is it possible to install it from the SD card?

My device isn’t booting - the two red LEDs are flashing intermittently.

However, when I install the upgraded firmware it looks as if it is booting OK from the SD card.

Can I compile it from source into a bootable binary on the SD card that then installs itself?

If you haven’t tried it, have you an idea of where I should start? The Firmware boots from:

MyPassportWireless_1.03.13.bin

If you put it on the SD card in a directory called ‘update’.

Presumably one way to get it to would would be to replace the above .bin with a compiled binary, then boot it from the SD card - and then login to move install linux where it’s supposed to be.

Is there an easier way you can suggest?

I’d imagine that, at WD, when a broken device comes in, they pop an SD card in and boot from that, it’d make sense, then they can run diagnostics etc, without disturbing the other volumes. I imagine that’s how they recover data.

That looks a possibility - if you boot from the SD card, there’s clearly some sort of ROM based OS  that runs. Do you know if that system has ‘tar’ ‘cp’ and ‘dd’ in it? If it does, then a script that does what you suggest below should do the trick.

Is there an easy way to build a bootable .bin file for the SD card? I see it has to have all the .md5 signatures correct, but, presumably, that’s to make sure that it’s not corrupted, not to prevent anybody from making a similar bootable binary.

From init script (Barebox / bootloader):

#./boot
sata # initialize SATA
sataenv run 7 # try to run script from partition 7
sataenv run 8 # try to run script from partition 8
. /env/bin/boot_sata # if all else fails, use this script to boot

Normal boot script commented, so no possible to boot from any other device except sata. Sorry.

From init script (Barebox / bootloader):

#./boot
sata # initialize SATA
sataenv run 7 # try to run script from partition 7
sataenv run 8 # try to run script from partition 8
. /env/bin/boot_sata # if all else fails, use this script to boot

Normal boot script commented, so no possible to boot from any other device except sata. Sorry.


Partition 7 is the DataVolume partition, I think - what is partition 8? Is it the SD card?

But the firmware is installed from the SD card by booting from the ‘update’ directory. 

Do you have the source of /env/bon/boot_sata  — It must have a provision for booting from the SD card.

fustbariclation wrote:

Partition 7 is the DataVolume partition, I think - what is partition 8? Is it the SD card

But the firmware is installed from the SD card by booting from the ‘update’ directory. 

Do you have the source of /env/bon/boot_sata  — It must have a provision for booting from the SD card.

No. You wrong:

/dev/sda1 - raid 1 Disk #1 - Root FS (mdadm raid)
/dev/sda2 - raid 1 Disk #2
/dev/sda3 - Swap
/dev/sda4 - Ext4 - User data (DataVolume)
/dev/sda5 - Main kernel
/dev/sda6 - backup kernel (Не используется вообще нигде)
/dev/sda7 - Boot config for Barebox
/dev/sda8 - Backup config (Not used)

There is no support for SD card. Only sata port (‘sata’ command from boot script initializing internal sata port. USB port not used at boot)

How does it boot from the SD card to install firmware then?

Hi hvalntim

i have installed the plex media server. I am still wondering how it is possible that it works with mixed armel/armhf architecture. It seems that armhf is backward compatible;-).

However, OS died while plex indexing large number of files. I am not sure whether it runned out of memory but at the end OS stands still :-(. I stopped all my services to spare some memoty and tried again, but it did not help. I am thinking mounting the tmp to the HDD. I am not sure whether plex media server uses the tmp folder but when it does it might eat all the RAM. Didi you do some tweaking to make the plex server really working?

ARMHF - Floating point instructions works at hardware (No emulation)
ARMEL - Floating point instructions emulated programmatically.
There is no difference between armel/armhf (but hf works faster)

1 Like

Great work Fox_exe and thanks for the guide. Since I have no linux knowledge I used the auto installation guide. After the installation I cannot access dev/sda4. I cannot see the partitions when i use fdisk. But can see it with sfdisk.

What should I do further? Please help. I dont need any raid functionality, I just want to install Minidlna and logitech media server on my device.

fdisk -l

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util fdisk doesn’t support GPT. Use GNU Parted.

Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/md0: 2047 MB, 2047803392 bytes
2 heads, 4 sectors/track, 499952 cylinders, total 3999616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn’t contain a valid partition table

Disk /dev/md1: 2047 MB, 2047803392 bytes
2 heads, 4 sectors/track, 499952 cylinders, total 3999616 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md1 doesn’t contain a valid partition table

sfdisk -l

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util sfdisk doesn’t support GPT. Use GNU Parted.

Disk /dev/sda: 364801 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 267349- 267350- 2147483647+ ee GPT
start: (c,h,s) expected (0,0,2) found (0,0,1)
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty

Disk /dev/md0: 499952 cylinders, 2 heads, 4 sectors/track

sfdisk: ERROR: sector 1076830729 does not have an msdos signature
/dev/md0: unrecognized partition table type
No partitions found

Disk /dev/md1: 499952 cylinders, 2 heads, 4 sectors/track

sfdisk: ERROR: sector 1076830729 does not have an msdos signature
/dev/md1: unrecognized partition table type
No partitions found

pradeepzn, what exacly firmware you installed? Clean debian?

Ok, just edit mount point:

nano /etc/fstab

And edit or add this line:

# Data ("Shares" in original firmware)
/dev/sda4 /data ext4 noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 0

Change /data to any other folder (But crete this folder first: mkdir /data )

Save it (crtl-x, yes) and run mount -a (Or reboot device)

Clean Debian is the firmware. Edited fstab as advised, now i can access my library.

I installed logitech media server, i can access the web page and configure, will test it further with my streaming devices.

Please suggest, can I go ahead and install other tweaks like samba4 ?

Thanks a lot for the guidance…

even 180 MB free ram did not help to run the plex media server on top of my 1000 + familly photo and  video archive :frowning:

Whole system got frozen everytime the plex tried to index archive. Seems that Plex server on mycloud is not really suitable  for large familly archives. However, i managed to install the miniDLNA 1.1.2 via debootstrap thanks to  ikubux’s guide. So i am now happily running  miniDLNA 1.1.2 for my kids and  miniDLNA 1.0.24 for my movies in paralel.  

FYI Jessie debian release seems to be running in chroot without any problems

I installed clean debian and was working fine until I played around and uninstalled mdadm. Samba stopped working.

So I tried reinstalling clean debian using autoinstall, but it fails. I reinstalled mdadm still failed.

mdadm: set device faulty failed for /dev/sda1: Device or resource busy
mdadm: Cannot find /dev/md1: No such file or directory
Something wrong: /dev/md1 not exist! Exit now…

How do i install the original WD firmware? Please help.

Before autoinstall.sh try to stop all services (Except SSH and Mdadm).

Thanks Fox-exe, after stopping services the result is same. 

Script updated, please try it. If still not work - write full log to me in PM.

1 Like

Fox_exe,

Great job with CleanDebian.  Just what I was looking for.

Unfortunately, twice it has crashed with no way of getting back in to the system.

First was without any swapfile (I thought this may have been the problem) and second was while installing a nodejs module.  It wasn’t really taxing the processor or memory.

I was installing remotely and thought perhaps my network went down but even at home there was no SSH access.   It responded to pings fine.

I had to hard-reset the drive but it never came back up.  Just a white light for a few hours.

I searched the drive for any log files before it crashed but nothing.  The dmesg was all good.   Perhaps I’ll install some system logging this reinstallation :slight_smile:

I’m very interested in helping out in any way I can.   Having just a tiny server is ideal for me.

CleanDebian runs 2x as fast as WDs factory install so I don’t mind reinstalling if and when it crashes.

I had the freeze issue with Plex when I first scanned my collection of video and music.

After a reinstall I noticed my swap wasn’t mounted.   Check ‘mount’ to see if /dev/sda3 is as swap, if not try swapon /dev/sda3

1 Like

After the new install and a reboot, it didn’t come back up again.

I noticed an mdadm error with the run_me_after_reboot.sh

Perhaps it’s due to not saving the mdadm.conf?