WD my book live, runs Debian.

Soldato
Joined
27 Oct 2006
Posts
6,972
Location
London
w00t - I haz debian (more to the point I have apt) - albeit it's etchy as my kernel couldn't handle lenny

I must say that debootstrapping was a pain as it didn't bother to install any core packages so I had to manually install the packages up to a level where I could get apt working.

Now to back it up :)
 
Associate
Joined
2 Feb 2011
Posts
1
Hello,

I had one of these things for some days (borrowed due to curiosity) and it is a sweet little box, but I'd like to use on-disk encryption for certain sensitive data. I would have no problem implementing this in a stock Debian setup, but unfortunately the WD NAS does not have a stock kernel and the used ARM kernel does not seem to be built for modules, and dm_mod is missing. Plus, I have no idea how the boot process of this machine works and what to do if I break the boot process and it hangs during boot.

So: if anybody were to clue me up regarding the boot process, how to use uBoot to install a custom kernel, and what to do if the install fails and the boot hangs, I will post a WD MyBook Live Disk Encryption HOWTO. ;)
 
Soldato
OP
Joined
22 Dec 2008
Posts
10,370
Location
England
I have source! Happy days. WD support got back to me, with a concise email and a link to their website. Where the source is available. If I'm honest, I hadn't thought to look there. Link

Uboot is explained, a link is given to a cross compiler with directions, and the kernel source is included. Rebuilding a module shouldn't be too hard from this point.
 
Soldato
OP
Joined
22 Dec 2008
Posts
10,370
Location
England
Well, it's knackered. Somewhere along the road stability was compromised. I'm partway through the recovery process, mostly posting to note my anger that the ext4 volume has been created with a generally-unreadable blocksize of 65536.
 
Soldato
Joined
27 Oct 2006
Posts
6,972
Location
London
Don't worry mate.... We've all bricked devices including myself due to silly schoolboy errors.

Look at the bright side ... Now you can buy something different to hack :D

ps The cpu in my device is just too weak so I've moved on to building an atom itx/nas combo ;)
 
Associate
Joined
10 Mar 2011
Posts
2
how open the device?

I read someone was able to open the WB MyBook live.. I'd like to do but how (without broke something?)
thank you in advance!
regards
 
Soldato
OP
Joined
22 Dec 2008
Posts
10,370
Location
England
So: if anybody were to clue me up regarding the boot process, how to use uBoot to install a custom kernel, and what to do if the install fails and the boot hangs, I will post a WD MyBook Live Disk Encryption HOWTO. ;)

I'm still working on modules. Someone's beaten me to it though, see here for a guide. menuconfig is running into dependency problems and make 44x/apollo_3G_nas_defconfig isn't going too well either.

I read someone was able to open the WB MyBook live.. I'd like to do but how (without broke something?)
thank you in advance!
regards

They're a much more careful man than I am if so. There's four small plastic clips which allow a snap fit assembly, I suspect for warranty returns they'll pull the casing off and fit a brand new one. As it is, it took me about half an hour to pry the thing apart, and I broke two out of the four tabs. It still fits back together quite securely, sitting on my shelf it's as if I never touched it. The casing doesn't fall off readily either.

@Subliminal changing to x86 looks pretty appealing to me too, it's certainly a faster & easier option. If I can get this damned thing to compile modules (and hopefully stop it using an unreadable ext4 fs) then it'll do pretty much anything I could ask of it. Albeit slowly.

edit; Removed a lot of error codes. I've given up on compiling on the nas and installed a crosscompiler on x86. This seems to be working, in that I have loop.ko built, installed and behaving itself. Next up is working out which of the many netfilter modules I'm interested in.

@John31, which encryption method do you want to get running? Encfs works as soon as loop.ko is compiled, actually I was astonished by how smoothly the linked howto went.

Edit: A summary of dm-crypt setup on this device:

Code:
# 1/ Build the following modules (I'm still crosscompiling from x86)
drivers/md/dm-crypt.ko
drivers/md/dm-mod.ko

# 2/ copy these modules to 
/lib/modules/2.6.32.11-svn21605/kernel/drivers/md/

# 3/ install modules 
/sbin/depmod -a &&  /sbin/modprobe -av dm-crypt dm-mod

# 4/ apt-get install cryptsetup #possibly some other things I already had installed as well

# 5/ Test
head -c 100M /dev/zero > luksfile  # create empty file
losetup /dev/loop0 luksfile        # map luksfile to /dev/loop0
cryptsetup luksFormat /dev/loop0   # create LUKS on loop device
cryptsetup luksOpen /dev/loop0 testing #Open the /dev/loop0 file, call it testing
mkfs.ext2 /dev/mapper/testing  #Make an ext2 filesystem on testing
mount -t ext2 /dev/mapper/testing /mnt/tmp #Mount the device on /mnt/tmp

# 6/ Closing the encrypted volume
umount /mnt/tmp
cryptsetup luksClose testing

# 7/Opening the encrypted volume
losetup /dev/loop0 luksfile #Needed after a reboot
cryptsetup luksOpen /dev/loop0 testing && mount -t ext2 /dev/mapper/testing /mnt/tmp

edit:Not convinced cryptoloop is required, as it's the predecessor of dm-crypt.
 
Last edited:
Joined
1 Oct 2006
Posts
13,900
This thread is awesome, I'm considering getting the 2x1TB raid option of these MyBooks to handle my backups and DLNA/remote downloads.

From reading the wiki page these newer models should be able to do the stuff you've mentioned above too - happy days. :)
 
Associate
Joined
16 Aug 2011
Posts
1
Hi,

Has anyone got an idea how to "see" mybooklive nas device from my psbsd computer. Both devices work in the same home network. I'm pretty new to Linux and BSD but got time and enthusiasm to learn.

Thank you in advance!

Regards,
Plamen
 
Soldato
OP
Joined
22 Dec 2008
Posts
10,370
Location
England
What do you mean by "see"? I don't know much about *bsd, but google suggests ssh, nmap and ping are all available. ping and nmap should make finding the ip address of the nas straightforward, or you can look in the web interface of your router.

ssh will give you a root shell on the device (password is Welc0me, or possibly welc0me). Debian is different to *bsd internally though, so tred softly.

Once you know the ip address, nfs (network file system) or samba (emulates windows file sharing) are both available to linux and *bsd. Either of these will provide friendly read / write access to the device.

If it's a network issue, rather than directly related to the NAS, the networking section of these boards is pretty good. Wd community forums are useful too, though you have to dig through some rubbish to find anything useful.

I hope that helps a bit. Welcome the forums
 
Associate
Joined
16 Mar 2012
Posts
1
As Debian Lenny reached the end of its life cycle last month (which means it no longer receives security updates), I'm wondering if it's possible to upgrade the MyBook Live to Debian Squeeze. I'm really not that knowledgeable about Linux (never compiled a kernel by myself, for instance), so I'm unsure if this is feasible (and in that case if I should really go for "apt-get upgrade", or just edit /etc/apt/sources.list to point it to Squeeze), and what's the likelihood of this bricking the device.

BTW, I also tried to use IP filters in it, but eventually found out that the kernel provided wasn't compiled with some settings that are required for iptables. I resorted to a stricter SSH configuration, including key authentication (certainly not perfect security-wise, but I guess it's better than nothing). I also used internal IP filters for some applications (amuled has this functionality, you just need a cron script to update the filter list; in the case of rtorrent that required using a patch -- on 0.8.6 -- and compiling from source).
 
Soldato
OP
Joined
22 Dec 2008
Posts
10,370
Location
England
Hi,

Iirc there are problems with udev if you try the obvious upgrade path, I think it upgrades to squeeze quite happily if you continue with the current kernel and hold back udev. I'm not sufficiently worried about the security of the nas to update to squeeze. You should read this though.

To be honest I haven't got around to trying to use netfilter on the nas. The kernel out of the box wont do it, but I think it's possible with modules. Maybe one of these days :(
 
Soldato
Joined
27 Oct 2006
Posts
6,972
Location
London
Heh, this project still alive ?

I dumped mine in favour of the htpc in my sig as the arm processor that I had was too slow for anything constructive.

If I recall I did build a toolchain in a fedora VM which I used to successfully compile kernel modules. God help me as I can't remember the details but I do remember building the usb-serial driver as I needed that.
 
Back
Top Bottom