General NAS-Central Forums

Welcome to the NAS community
It is currently Fri Nov 24, 2017 11:16 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Jan 31, 2013 9:49 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Hello,

Iomega replaced my defect HMNHD with a PX4-300d with 4TB.
On paper, that would be a brilliant deal.

However, on my previous NAS I could easily install things as transmission using IPKG.

On this NAS however I can't seem to get anything working.

Anyway, apt-get is already on the machine. I just needed to add the correct folders.

However, when I proceed:
Quote:
root@NAS:/opt/apps# apt-get install transmission
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
apt apt-utils ca-certificates coreutils debconf debconf-i18n
debian-archive-keyring debianutils defoma dpkg file fontconfig
fontconfig-config gcc-4.3-base gnupg gpgv hicolor-icon-theme ifupdown
libacl1 libatk1.0-0 libatk1.0-data libattr1 libbz2-1.0 libc6 libcairo2
libcomerr2 libcups2 libcurl3 libdatrie0 libdb4.6 libdirectfb-1.0-0 libexpat1
libfontconfig1 libfontenc1 libfreetype6 libfribidi0 libgcc1 libgcrypt11
libgdbm3 libglib2.0-0 libglib2.0-data libgnutls26 libgpg-error0 libgpm2
libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libidn11 libjpeg62 libkeyutils1
libkrb53 libldap-2.4-2 liblocale-gettext-perl libmagic1 libncurses5
libnewt0.52 libpango1.0-0 libpango1.0-common libpcre3 libpixman-1-0
libpng12-0 libpopt0 libreadline5 libsasl2-2 libsasl2-modules libselinux1
libslang2 libssh2-1 libssl0.9.8 libstdc++6 libsysfs2 libtasn1-3
libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libthai-data
libthai0 libtiff4 libts-0.0-0 libusb-0.1-4 libx11-6 libx11-data libxau6
libxcb-render-util0 libxcb-render0 libxcb-xlib0 libxcb1 libxcomposite1
libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2
libxi6 libxinerama1 libxrandr2 libxrender1 lsb-base lzma ncurses-bin
net-tools netbase openssl perl perl-base perl-modules readline-common sed
transmission-cli transmission-common transmission-gtk ttf-dejavu
ttf-dejavu-core ttf-dejavu-extra ucf whiptail x-ttcidfont-conf x11-common
xfonts-encodings xfonts-utils zlib1g
Suggested packages:
aptitude synaptic gnome-apt wajig dpkg-dev apt-doc bzip2 python-apt
debconf-doc debconf-utils libterm-readline-gnu-perl libgnome2-perl
libqt-perl libnet-ldap-perl defoma-doc dfontmgr psfontmgr gnupg-doc
xloadimage imagemagick eog libpcsclite1 iproute dhcp3-client dhcp-client ppp
locales glibc-doc cups-common libfreetype6-dev rng-tools gnutls-bin gpm
librsvg2-common krb5-doc krb5-user ttf-kochi-gothic ttf-kochi-mincho
ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp
ttf-arphic-gkai00mp ttf-arphic-bkai00mp libsasl2-modules-otp
libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit
libsasl2-modules-gssapi-heimdal perl-doc
Recommended packages:
libft-perl
The following NEW packages will be installed:
apt apt-utils ca-certificates coreutils debconf debconf-i18n
debian-archive-keyring debianutils defoma dpkg file fontconfig
fontconfig-config gcc-4.3-base gnupg gpgv hicolor-icon-theme ifupdown
libacl1 libatk1.0-0 libatk1.0-data libattr1 libbz2-1.0 libc6 libcairo2
libcomerr2 libcups2 libcurl3 libdatrie0 libdb4.6 libdirectfb-1.0-0 libexpat1
libfontconfig1 libfontenc1 libfreetype6 libfribidi0 libgcc1 libgcrypt11
libgdbm3 libglib2.0-0 libglib2.0-data libgnutls26 libgpg-error0 libgpm2
libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libidn11 libjpeg62 libkeyutils1
libkrb53 libldap-2.4-2 liblocale-gettext-perl libmagic1 libncurses5
libnewt0.52 libpango1.0-0 libpango1.0-common libpcre3 libpixman-1-0
libpng12-0 libpopt0 libreadline5 libsasl2-2 libsasl2-modules libselinux1
libslang2 libssh2-1 libssl0.9.8 libstdc++6 libsysfs2 libtasn1-3
libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libthai-data
libthai0 libtiff4 libts-0.0-0 libusb-0.1-4 libx11-6 libx11-data libxau6
libxcb-render-util0 libxcb-render0 libxcb-xlib0 libxcb1 libxcomposite1
libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2
libxi6 libxinerama1 libxrandr2 libxrender1 lsb-base lzma ncurses-bin
net-tools netbase openssl perl perl-base perl-modules readline-common sed
transmission transmission-cli transmission-common transmission-gtk
ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ucf whiptail x-ttcidfont-conf
x11-common xfonts-encodings xfonts-utils zlib1g
0 upgraded, 124 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/55.7MB of archives.
After this operation, 167MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
E: Internal Error, Could not perform immediate configuration (2) on libc6


When you try to fix this package you get this:
Quote:
root@NAS:/var/cache/apt/archives# dpkg -i "libc6_2.7-18lenny7_amd64.deb"
Selecting previously deselected package libc6.
(Reading database ... 0 files and directories currently installed.)
Unpacking libc6 (from libc6_2.7-18lenny7_amd64.deb) ...
Matching libraries: /mnt/apps/lib/libc.so.6

A copy of glibc was found in an unexpected directory.
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library and try again.
dpkg: error processing libc6_2.7-18lenny7_amd64.deb (--install):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
libc6_2.7-18lenny7_amd64.deb


I tried moving /mnt/apps/lib/libc.so.6 temporary to another location, but I get the message it is a read-only file system.

Hope someone can help me with this..


Top
 Profile  
 
PostPosted: Thu Jan 31, 2013 10:44 pm 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
Can you provide the output of mount, uname -a, cat /proc/mdstat, vgdisplay and lvdisplay. Then it's much clearer how you can proceed.

Stefan


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 3:44 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Hi,

here it is:

Quote:
root@NAS:/# mount
rootfs on / type rootfs (rw)
/dev/root.old on /initrd type ext2 (rw,relatime,errors=continue)
none on / type tmpfs (rw,relatime,size=51200k,nr_inodes=255071)
/dev/sde1 on /boot type ext2 (rw,relatime,errors=continue)
/dev/loop0 on /mnt/apps type squashfs (ro,relatime)
/dev/loop1 on /etc type ext2 (rw,sync,noatime)
/dev/loop2 on /oem type cramfs (ro,relatime)
proc on /proc type proc (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
none on /proc/fs/nfsd type nfsd (rw,relatime)
none on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /mnt/apps/lib/init/rw type tmpfs (rw,nosuid,relatime,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
/dev/mapper/6ecd3c42_vg-vol1 on /mnt/system type xfs (rw,noatime,attr2,delaylog,logbufs=8,noquota)
/dev/mapper/77d75ef1_vg-lv34398f64 on /mnt/pools/A/A0 type xfs (rw,noatime,attr2,delaylog,nobarrier,inode64,logbufs=8,noquota)
root@NAS:/# uname -a
Linux NAS 2.6.39.3 #1 SMP Mon Feb 13 17:07:11 EST 2012 x86_64 GNU/Linux
root@NAS:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md1 : active raid5 sda2[0] sdd2[3] sdc2[2] sdb2[1]
2867343360 blocks super 1.0 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]

md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1]
20980816 blocks super 1.0 [4/4] [UUUU]

unused devices: <none>
root@NAS:/# vgdisplay
--- Volume group ---
VG Name 77d75ef1_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.67 TiB
PE Size 4.00 MiB
Total PE 700034
Alloc PE / Size 691200 / 2.64 TiB
Free PE / Size 8834 / 34.51 GiB
VG UUID m9dCJu-NDJn-BM7u-28Vp-I0ql-bo0t-onrKEo

--- Volume group ---
VG Name 6ecd3c42_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 20.01 GiB
PE Size 4.00 MiB
Total PE 5122
Alloc PE / Size 5122 / 20.01 GiB
Free PE / Size 0 / 0
VG UUID 4YWe7j-GgoD-3rXZ-uDcI-hFPo-uhbe-Gyxyjb

root@NAS:/# lvdisplay
--- Logical volume ---
LV Name /dev/77d75ef1_vg/lv34398f64
VG Name 77d75ef1_vg
LV UUID otaypg-MQ5j-ljHE-8Mda-qYvi-182F-kWk6ch
LV Write Access read/write
LV Status available
# open 1
LV Size 2.64 TiB
Current LE 691200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 6144
Block device 253:0

--- Logical volume ---
LV Name /dev/6ecd3c42_vg/vol1
VG Name 6ecd3c42_vg
LV UUID C6BUBx-sOuN-Qyia-kqaj-QDWh-tTFO-5xisvZ
LV Write Access read/write
LV Status available
# open 1
LV Size 20.01 GiB
Current LE 5122
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

root@NAS:/#


Top
 Profile  
 
PostPosted: Fri Feb 01, 2013 3:50 pm 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
Ok, that looks similar to the usual EMC Lifeline pattern, but one thing is problematic: /mnt/apps is squashfs, so it can't be mounted r+w. It would probably be necessary to change it to a ext2/3 file system. Can you post ls -l / and cat /proc/cmdline and losetup -a, too?

Stefan


Top
 Profile  
 
PostPosted: Sat Feb 02, 2013 3:00 am 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Sure, thanks for your help so far!!

Quote:
MBP-EMP:~ Edward$ ssh root@nas.local
root@nas.local's password:
root@NAS:/# ls -l /
total 9
lrwxrwxrwx 1 root root 13 Jan 14 00:48 bin -> /mnt/apps/bin
drwxr-xr-x 8 root root 4096 Aug 23 17:45 boot
lrwxrwxrwx 1 root root 10 Jan 14 00:48 debug -> /etc/debug
drwxr-xr-x 9 root root 7300 Jan 14 00:48 dev
drwxr-xr-x 66 root root 3072 Feb 1 19:51 etc
drwxr-xr-x 3 root root 60 Jan 14 00:48 home
drwxr-xr-x 12 Evolutionhost default 1024 Jan 14 00:48 initrd
lrwxrwxrwx 1 root root 13 Jan 14 00:48 lib -> /mnt/apps/lib
lrwxrwxrwx 1 root root 4 Jan 14 00:48 lib64 -> /lib
drwxr-xr-x 5 root root 120 Jan 14 00:49 mnt
drwxr-xr-x 2 root root 160 Jan 14 00:49 nfs
drwxr-xr-x 1 Evolutionhost 232 340 Jan 1 1970 oem
lrwxrwxrwx 1 root root 15 Jan 14 00:49 opt -> /mnt/system/opt
dr-xr-xr-x 154 root root 0 Jan 14 00:47 proc
drwxr-xr-x 4 root root 220 Jan 31 01:40 ram
lrwxrwxrwx 1 root root 14 Jan 14 00:48 sbin -> /mnt/apps/sbin
drwxr-xr-x 2 root root 40 Jan 14 00:48 selinux
drwxr-xr-x 12 root root 0 Jan 14 00:48 sys
drwxrwxrwt 5 root root 500 Feb 2 03:58 tmp
lrwxrwxrwx 1 root root 13 Jan 14 00:48 usr -> /mnt/apps/usr
drwxr-xr-x 10 root root 200 Jan 14 00:48 var
root@NAS:/# cat /proc/cmdline
console=tty0 console=ttyS0,115200
root@NAS:/# losetup -a
/dev/loop0: [0841]:76482 (/sysroot/boot/images/apps)
/dev/loop1: [0841]:76483 (sysroot/boot/images/config)
/dev/loop2: [0841]:76484 (/sysroot/boot/images/oem)


Top
 Profile  
 
PostPosted: Tue Feb 05, 2013 5:17 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Stefan, do you have any clue on how to install for example Transmission (web interface)


Top
 Profile  
 
PostPosted: Sun Feb 10, 2013 8:47 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Seidler you still alive?

Do you think I can just make apt-get working by following exactly this:
http://iomega.nas-central.org/wiki/Hack ... e_Media_CE)#resizing_and_rw-mount_.2Fmnt.2Fapps

Else I might just throw this NAS at the trash. Without custom software its worthless


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 9:37 am 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
Hi,

sorry, I was busy some days ;)

Well, it looks good so far, but there's one thing we need to find out: where the initramfs is stored. I suspect it's somewhere on /dev/sde. If you don't mind, can you create a pastebin of the output of dmesg (preferably right after startup) and the other questions is, can you create a dump of /dev/sde (or at least the first 32MB of it) and upload it somewhere?

Oh, and maybe post the content of /boot: ls -lR /boot, maybe it's easier than I think.

Creating a disk dump is as simple as dd if=/dev/sde bs=1M count=32 | gzip > /mnt/pools/A/A0/<a name of a share you have created>/dump.gz. The file dump.gz will then appear on the given share, and you can upload it to any file sharing service. Maybe it's best if you PM'd me the link, since I can't guarantee 100% that there's no personal information in that dump.

I'm afraid that it might take additional steps, but hacking a device to which you don't have full access to is ... a bit complicated ;)

Stefan


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 8:49 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Thanks,

here is the ouput of ls -LR /boot and dmesg, right after rebooting.
http://pastebin.com/Wgx4tDxY

I'll sent you the dump via PM in a minute. Thanks in advance. Sure ain't easy though.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 9:40 pm 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
Oh man, this IS easier than I thought!

So, here's how you modify the initramfs:
Code:
cd /boot/images
cp initrd initrd.bak # just make a backup
mkdir ir
mknod /dev/loop3 b 7 3 # don't worry if this yields an error
mount -o loop initrd ir
cd ir


Now you should find the file common.sh and in it:
Quote:
mount -o loop,ro $APPS_IMAGE sysroot/mnt/app

This is the "culprit". Change it to
Code:
mount -o loop,rw ${APPS_IMAGE}.new sysroot/mnt/apps

(hint: nano is probably the best editor you'll find on the system)

Good. Now for the apps image. It's squashfs, which is useless. So we do
Code:
cd /boot/images
dd if=/dev/zero of=apps.new bs=1M seek=511 count=1 # make a sparse image for the new r/w apps
mkfs.ext2 -F -m 0 apps.new # format it as ext2
mkdir an
mknod /dev/loop4 b 7 4 # don't worry if this yields an error
mount -o loop apps.new an
cd /mnt/apps
tar c * | tar x -C /boot/images/an # can take a while
cd -
ls an # this should output a couple of folders like bin, lib, usr, var
umount an


Ok, now once you've got the initrd open, we might as well insert the commands for apt-get - read the portion after the text in red. Remember: the file linuxrc can be found in /boot/images/ir and edited with nano.

Finally, wrap up the initrd again:
Code:
cd /boot/images
umount ir


Now - good luck ;) I mean, reboot, and hope for the best.

If all is well, the system should come up again and you can execute the first part of the apt-get tutorial. Afterwards, everything should be fine.

However, if any of this gives an error which you don't know, you should stop right there and ask for advice. Remember, most of this is based on guesswork ;)

Stefan


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:13 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
Are you sure this isn't dangerous?

I mean the files on the NAS are not that important, most are downloaded movies.
I don't want to brick my nas forever though :)

Do you have skype so we can chat a bit while I run the stuff? Username is same as here.

This is the output so far:
Quote:
root@NAS:/# cd /boot/images
root@NAS:/boot/images# cp initrd initrd.bak
root@NAS:/boot/images# mkdir ir
root@NAS:/boot/images# mknod /dev/loop3 b 7 3
root@NAS:/boot/images# mount -o loop initrd ir
mount: you must specify the filesystem type
root@NAS:/boot/images#







Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:29 pm 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
OK, try adding -t ext2 after -o loop.

I say, if you follow the instructions, it should not be dangerous. You're only changing some things, they are important, but if executed correctly, they work fine.

Stefan


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:34 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
I'm afraid it might have looked simpler then it is:

Quote:
mount: wrong fs type, bad option, bad superblock on /dev/loop3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


dmesg:
Quote:
root@NAS:/boot/images# dmesg | tail
[ 1981.432026] bonding: bond0: link status up for interface eth1, enabling it in 16500 ms.
[ 1981.460011] r8168: eth0: link up
[ 1981.500012] r8168: eth1: link up
[ 1991.888012] bond0: no IPv6 routers present
[ 1997.944152] bonding: bond0: link status definitely up for interface eth1, 1000 Mbps full duplex.
[ 2183.129383] vsd[4208]: segfault at d0 ip 00007fcd291e0628 sp 000000004811fef0 error 4 in libpthread-2.7.so[7fcd291d9000+16000]
[ 5431.815174] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 5431.825243] FAT: bogus number of FAT structure
[ 5431.829742] VFS: Can't find a valid FAT filesystem on dev loop3.
[ 6542.492052] EXT2-fs (loop3): error: can't find an ext2 filesystem on dev loop3.


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:47 pm 
Offline

Joined: Fri Jul 13, 2012 8:12 am
Posts: 110
Ah. Try zcat < initrd > initrd.ungz. If that still doesn't work, it might be an uImage and we need another step in between.

G' night for now though...

Stefan


Top
 Profile  
 
PostPosted: Mon Feb 11, 2013 10:49 pm 
Offline

Joined: Thu Jan 31, 2013 9:46 pm
Posts: 16
I assume it worked since it didn't give any errors. But what do I run after? Again the mount command?
The .ungz file contains the mount scripts you talked about earlier.

Good night!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: ruspray and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group