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

Eventually, I moved to DSM 5, very simply and quickly share ir this tutorial on a blank disc.

Boot from a live CD or a Linux version installed and replace the correct letter.

Clean HDD Install parted /dev/sdb mkpart primary 1M 2048M mkpart primary 2048M 3072M mkpart primary 3140M -2M mkpart primary 3072M 3106M mkpart primary 3106M 3134M mkpart primary 3134M 3136M mkpart primary 3136M 3138M mkpart primary 3138M 3140M q
mkswap /dev/sdb2
mkfs.ext3 /dev/sdb1
mkfs.ext3 /dev/sdb3

mkdir /tmp/hdd1
mkdir /tmp/hdd3
mount /dev/sdb1 /tmp/hdd1
mount /dev/sdb3 /tmp/hdd3
cd /tmp/hdd3

**edit user/group info**
chown -R evo:root /tmp/hdd3
chown -R evo:root /tmp/hdd1

**edit path info**
cd /media/sf_Storage/DSM/
tar xvfz dsm-rootfs.tgz -C /tmp/hdd1
dd if=dsm-kernel.img of=/dev/sdb4
dd if=dsm-bootconfig.env of=/dev/sdb7
cd /
umount /tmp/hdd1
umount /tmp/hdd3
sync

Connect to WDMC

Done!

Thx Fox_exe and Evostar.

For cons, I have a little problem, i would add my usb key :

none /proc proc defaults 0 0 /dev/root / ext3 defaults 1 1 /dev/sda3 /volume1 ext3 usrquota,grpquota 0 0 /dev/sda1 /media/usb vfat defaults,user,uid=win,gid=win,umask=113,dmask=002 0 0

But fstab always comes by default after reboot.

Try /etc.default/fstab

Thank you, it works better that way :wink:

mkdir /volume1/usb
nano /etc/fstab
/dev/sdb1 /volume1/usb vfat defaults 0 0
mount /volume1/usb

But after a reboot, the line does not remain written in fstab and not anything in the external devices under DSM once mounted.
Is would it be possible to fix this problem?
DSM really great, it’s really sad that he does not work on Debian, completely lost with Unix.

Edit :

Try /etc.default/fstab

I had not understood, sorry for my ignorance.

But it does not work, I added :

nano /etc.defaults/fstab
/dev/sdb1 /volume1/usb vfat defaults 0 0

The volume does not mount automatically.

I just read this topic, drivers problem? => Synology OS on WD my Cloud - new Hope - #30 by seedg4

Hi fox_exe

I previously followed your guide to install OMV on my MyCloud Gen1. Now I would like to migrate to DSM5. But I only have a mac so I’m having some trouble with the recovery steps of the process. Is there another way to do this migration perhaps that would work from a Mac?

Thx :slight_smile:

started on a linux livecd (if possible on mac) and following this tutorial on by selecting the right hard disk:

Clean HDD Install
parted /dev/sdb
mkpart primary 1M 2048M
mkpart primary 2048M 3072M
mkpart primary 3140M -2M
mkpart primary 3072M 3106M
mkpart primary 3106M 3134M
mkpart primary 3134M 3136M
mkpart primary 3136M 3138M
mkpart primary 3138M 3140M
q

mkswap /dev/sdb2
mkfs.ext3 /dev/sdb1
mkfs.ext3 /dev/sdb3

mkdir /tmp/hdd1
mkdir /tmp/hdd3
mount /dev/sdb1 /tmp/hdd1
mount /dev/sdb3 /tmp/hdd3
cd /tmp/hdd3

edit user/group info
chown -R (your user):root /tmp/hdd3
chown -R (your user):root /tmp/hdd1

edit path info
cd /media/sf_Storage/DSM/
tar xvfz dsm-rootfs.tgz -C /tmp/hdd1
dd if=dsm-kernel.img of=/dev/sdb4
dd if=dsm-bootconfig.env of=/dev/sdb7
cd /
umount /tmp/hdd1
umount /tmp/hdd3
sync

Connect to WDMC

Done!

Note: Run “sudo su” (Type your password) for login as root. Or use “sudo [command]”.

@Fox_exe

That it is possible to compile a chroot debian on Comcerto 2000?
The application is not available in the package center, incompatibility?

@Fox_exe

  • First of all! Thank you very much! WD should be funding you as you make there device’s usable!

  • Second: Can you bring DSM 6.0 to Apple Watch? …Rsrsrsrs… just a joke :wink:

  • Third: My real question is about the WD My Cloud with OMV (based on Debian 7):
    I can’t get LUKS working because of the lack of the device-mapper driver.

root@mycloud# cryptsetup luksOpen /dev/sdaX sdaX /dev/mapper/control: open failed: No such device Failure to communicate with kernel device-mapper driver. Check that device-mapper is available in the kernel. Cannot initialize device-mapper. Is dm_mod kernel module loaded?

root@mycloud# dmsetup targets /dev/mapper/control: open failed: No such device Failure to communicate with kernel device-mapper driver. Check that device-mapper is available in the kernel. Command failed

Is it intended or what do I need to do to achieve profit? :stuck_out_tongue_winking_eye:

Need LVM drivers (modules) in kernel (Sources available in my archive).

Only if apple share source code for kernel and disable boot protection. (Same thing for porting Android to iPhone. Its possible too.)

1 Like

@Fox_exe from fox_bat

Need LVM drivers (modules) in kernel (Sources available in my archive).

Just gave a search in your Google Drive (https://drive.google.com/folderview?id=0B_6OlQ_H0PxVRXF4aFpYS2dzMEE&usp=drive_web#list) and couldn’t find anything regarding LVM.

I’m running a WDMyCloud-Gen1 with your latest omv-testing and gave it an update to v. 2.2.5.

If you could give me a small brefing where and how to get these LVM driver (modules) running?

In the Plugin-List of OMV there is also a LVM offered. But i guess it’s not a driver (module) for the kernel what you said…

Yes, this is only web-plugin + control/monitoring tools.

For modules - you need recompile kernel with LVM support (Linux Kernel Configuration - Filesystems)
Latest kernel - on my gDrive. Default kernel config is same dir/archive (Or look for current config via /proc/config.gz if available)

Wow, I never compiled a kernel myself… but there’s always a first time :yum:

Am I right doing this directly on the NAS-device via ssh? And is it right it takes a lot of hours compiling?

EDIT: Right now I’m trying to get it done via the module-assistant (ModuleAssistant - Debian Wiki) but in the list of available modules there is no lvm and no dm-crypt etc…

For gen1 need v3 firmware (w/o “64k” patch). Just unpack kernel sources in any dir, copy kenel.config to this dir, rename to “.config”
Next:
apt-get install build-essential libncurses5 u-boot-tools
make menuconfig
make install
Then - just copy new kernel to 5rd partition (HDD), and modules to /lib/modules/kernel_version/

I arrived down here and then got an lot’s of error messages tha kind’a everything I do is wrong and that it can’t work out. :dizzy_face:

I did this now on my workstation (x86, *untu 14.04) is it wrong?

Do I need to do this on the NAS?

Hey,
This post has a lot of comment, and chrome wont let me search for the things I want.
I apologize if this already answered, So I want to install DSM5 and haveing trouble setting up the DHCP server, in BOOT TO RECOVERY. I have set my computer Ethernet ip to 192.168.0.1 and mask 255.255.255.0 and have changed MAC address in _Start_Ping.bat to mac address of mycloud. When its pluged in directly to my computer and turned on.

SENT (0.1920s) ICMP [192.168.0.1 > 255.255.255.255 Echo request (type=8/code=0) id=7159 seq=1] IP [ttl=64 id=2546 iplen=42 ]

Warning: Section [LISTEN_ON], Interface 192.168.0.1 is not Static, ignored
No Static Interface ready, Waiting…
Network changed, re-detecting Static Interfaces…
Lease Status URL: http://127.0.0.1:6789
Listening On: 192.168.0.1

Nothing happens to TFTP

I have also tried boot from HDD which worked, now stuck in recovery mode (green led and can telnet in, connected to router that is)
Problem is that instruction on installing DSM5, step 2 and 3 is what looks like require the TFTP server again.
I believe, I am doing something wrong, please help. Or is there a alternative way that don’t require the TFTP server.

You can run only TFTP server (w/o dhcp and ping). tftp needed for upload files to wdmc (Alternative - wget from ftp.anionix.ru)

Thanks, I got away with http://www.tricksguide.com/how-to-setup-a-tftp-server-tftpd32-windows.html

Hi again,

I’ve been running OMV on my MyCloud 4TB for a while now, and am now getting massive problems with the root partition having completely filled up (0 bytes remaining). This now means that the OMV GUI won’t progress past login screen and the most other services won’t run at all.

I was able to recover about 80MB or so from deleting old logs, but this has now filled up again as well. I can’t find any obvious large files that are taking up all the space or that could be deleted easily. apt-get clean etc have also been run and there’s just no more space to eek out.

I therefore hoped to be able to just resize the root partition to give it another Gb or so, but now I’m set up to do this with an external caddy and my MyCloud dismantled, I find that the partition structure is more complicated than I first thought:

GParted reports:
15MB unallocated
489Mb swap
2x 1.91gb raid (assume root)
95Mb unknown fs
1Mb unknown fs
2Mb unknown fs
3.63Tb ext4

Now I’m not sure what to do. Is it even possible to resize the root RAID partitions, or will the firmware no longer recognise the OS? I’m also not sure I trust GParted to move around the other partitions if it can’t figure out what they are.

– edit –

OK, just seen gbo’s post above which is pretty much doing exactly what I want to end up with (single 4Gb root partition). However I appear to be having the same issues as Tony_Le_moine with

mdadm: set device faulty failed for /dev/sda2: Device or resource busy

Inspecting the RAID with mdadm, I see the following:

sudo mdadm --detail /dev/md1
/dev/md1:
Version : 0.90
Creation Time : Wed May 13 19:46:29 2015
Raid Level : raid1
Array Size : 1999808 (1953.27 MiB 2047.80 MB)
Used Dev Size : 1999808 (1953.27 MiB 2047.80 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Sat Jul  9 16:19:31 2016
      State : clean, degraded 

Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

       UUID : 7ed83112:0452ad6d:997ceb89:519129b4
     Events : 0.2712

Number   Major   Minor   RaidDevice State
   0       0        0        0      removed
   1       8        2        1      active sync   /dev/sda2

Now, does this mean that the other RAID partition has been removed and I just need to resize the partitions? I also assume these steps need to be done with a live CD rather than via SSH?

I’ll admit to being a little lost now - I’m fine with moving partitions about in Windows (and setting up partitions in Linux), but dealing with RAID on remote login is a little beyond my experience :sweat:

edit - for completeness

sudo parted -l
Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number Start End Size File system Name Flags
3 15.7MB 528MB 513MB linux-swap(v1) primary
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB ext3 primary raid
5 4624MB 4724MB 99.6MB primary
6 4724MB 4824MB 101MB primary
7 4824MB 4826MB 1049kB primary
8 4826MB 4828MB 2097kB primary
4 4828MB 4001GB 3996GB ext4 primary

Model: Linux Software RAID Array (md)
Disk /dev/md0: 2048MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 2048MB 2048MB ext3

Model: Linux Software RAID Array (md)
Disk /dev/md1: 2048MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 2048MB 2048MB ext3

?? Can somebody give me a hint? I just have a 2GB root partition on the NAS, can it work like this? And with the firmware… do I need to flash it back to v3 (stock) firmware? :flushed:

Dsm6 is running awesome on my my cloud mirror gen1, up 24 hours without one bug or problem, can we get external device support? Also we may need to tweak smbd a bit for CPU usage, do we have kernel source? I wouldn’t mind forking it and submitting patches.