General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Jul 20, 2017 6:37 pm

All times are UTC




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Diskimages?
PostPosted: Wed Sep 09, 2009 6:53 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6014
It's normal that the kernel partition seems an illegal partition. It doesn't contain a filesystem, it's a single file itself.
Code:
Mijzelf@LinuxBox:~/EdMini$ file Linux\ native\ Volume\ 2.img
Linux native Volume 2.img: u-boot/PPCBoot image
LnV3.img and LnV4.img seem to be OK. I can loopmount them, and watch the contents. They contain PPC executables:
Code:
Mijzelf@LinuxBox:~/EdMini/vol3/bin$ file busybox
busybox: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
But the FAT partition is not a legal partition. It contains a partitiontable itself:
Code:
Mijzelf@LinuxBox:~/EdMini$ sudo /sbin/losetup /dev/loop5 FAT\ 32\ Volume\ 1.img
Mijzelf@LinuxBox:~/EdMini$ /sbin/fdisk -l /dev/loop5

Disk /dev/loop5: 139 MB, 139829760 bytes
255 heads, 63 sectors/track, 17 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

      Device Boot    Start       End    Blocks   Id  System
/dev/loop5p1               1           3       16033+   c  Win95 FAT32 (LBA)
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(783, 254, 63) logical=(0, 161, 21)
Partition 1 has different physical/logical endings:
     phys=(783, 254, 63) logical=(2, 160, 20)
Don't know if that's bad. LacieHasser says that it's a 'Primary/FAT32 containing the Edmini-Logon for USB-connection'. When you can use your EdMini as an USB stick, this could be the raw image which is exposed to the PC, including partition table.

/edit: there's something strange with that FAT32 thingy. The image is 139MB, but the inner image is only 8225280 bytes. However, the inner partition is 16MB!
Code:
Mijzelf@LinuxBox:~/EdMini/fat32$ df .
Filesystem           1K-blocks      Used Available Use% Mounted on
-                        16000      9192      6808  58% /home/isaac/EdMini/fat32


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sat Sep 12, 2009 8:37 am 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
@ Mijzelf
Very interesting, and it seems to be very difficult to solve the problem. Maybe it's the anwser to my problem with hda2.
But first of all I want to get it booting into Linux/hda6. If this works, we can try to fix the USB-conncetion.

@ mspr
No, I didn't fix it, I'am still working...
I've found a Gparted-screenshot from a D2 Network here at NAS-Central:
http://forum.nas-central.org/viewtopic.php?f=146&t=1571
The sda6 there (equivalent to our hda6) is also blackmarked "unknown" and contains 7,81 MB so that will be right on v1 as Mijzelf pointed out.

Where's the error?

_________________
LacieHasser


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Mon Sep 14, 2009 2:40 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6014
Is there any sign how far the boot process advances? Can you ping the box, portscan, ...
I suppose there is no serial port available?

I can imagine the box needs an MBR on harddisk in order to boot from hda6. In that case an MBR donor is needed. There was no special MBR needed for the 2big.


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sat Sep 19, 2009 2:00 pm 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
The LED ist blinking first, after a while it's lighting continously.

A MBR isn't needed as the EDmini v2 shows. They are different in their processors PowerPC vs. ARM in the v2, but the process is the same.
It starts from the Flash-memory into the UBoot-partition/file, then starting the rootfs on hda7.
You can access a serial console via the JTAG-connector, but it doesn't help very much, you can see the output here:
http://lacie.nas-central.org/wiki/EDmini:Stock_UBoot_Information

_________________
LacieHasser


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Tue Sep 22, 2009 6:51 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6014
Quote:
A MBR isn't needed as the EDmini v2 shows. They are different in their processors PowerPC vs. ARM in the v2, but the process is the same.
Who says? LaCie? It's a complete redesign (other mb, other bootloader, other Linux) so the bootprocess could be changed too. Having said that, I don't think a MBR is used either, but you can't exclude it because a complete different nas doesn't use it.
Quote:
You can access a serial console via the JTAG-connector, but it doesn't help very much, you can see the output here:
That's not a normal bootlog as produced by uBoot. A normal bootlog (other box) is found here. As you can see the different stages of booting are logged well, so a problem can be found easy. But it's perfectly possible that a bootlog of your box will show nothing. I don't know if the bios already is logging to the serial port, so it is possible that nothing will be seen until uBoot is loaded, which is probably not the case.

How did you create your partitions? Some partition managers do strange things with extended/logical partitions. When you want more than one logical partition they create a chain of extended partitions, each containing one logical and one extended partition. Maybe the bios is not able to handle this.


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Fri Sep 25, 2009 7:52 am 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
The mysterious hda2:
It starts with USB-connection, but the EDminiLogon doesn't come.
Analyzing the image supplied by davyk via file /hda2.img shows "x86 boot sector, extendend partition table (last)\011"
I've copied this to the hda2-part., the result now is an unknown and unusable partition - have a look (it's now hdb2 because it's the second disk in a Linux-PC, so swap/hdb5 is also not usable)

Image

GParteds TestDisk 6.8 DataRecovery shows FAT12 and Error, but all the files into are visible & correct (pic 2) ???????

Image

2)
Image

_________________
LacieHasser


Last edited by LacieHasser on Sun Jul 24, 2011 5:27 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sun Oct 04, 2009 11:14 am 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
Some good news, a big step forward...

The da...'n things begins to work, starts up Linux & the network-interface !!!
The blue On-/Off-button works properly for shutdown!!!

So the images hda6, 7 & 8 are usuable & ok - a big "thank you" to davyk.

My intention was, that there's a problem getting an IP-adress via DHCP because pinging doesn't work and access via browser failed.
So I modified some files on hda8 to my workgroup-name and set up a fix adress as follow:
Code:
/etc/hosts
127.0.0.1      localhost.loacaldomain   localhost
192.168.2.102   EDmini

Code:
/etc/resolv.conf
#search home
#nameserver 192.168.1.1
nameserver 192.168.2.100

Code:
/etc/samba/smb.conf
[global]
workgroup = athome
...

Code:
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=EDmini
WORKGROUP=athome
WINS=

Code:
/etc/sysconfig/network-devices/ifconfig.eth0
ONBOOT=yes
#SERVICE=udhcpc
SERVICE=static
IP=192.168.2.102
NETMASK=255.255.255.0
GATEWAY=192.168.2.100
BROADCAST=192.168.2.255

Now Ping and Samba are working fine, LaCie IPConfigurator works with correct network-data and you can see the EDmini in the network-area under XP, asking for Login, but get no share/UserData - now we have to fix the connection to the hda3.
It's not mounted via fstab, that's doing by a crypting script called userdata in hda7/etc/rc.d/init.d (maybe examining can help). Mounting it directly via fstab failed.
Maybe it needs a directory named share or ED_mini or something else?

But I've access to /varlog/messages, and there are some errors in mounting the file-system comparing it with the old logging-messages from the images:

It's different from these lines:
Code:
EXT3-fs: Unrecognized mount option umask
EXT2-fs: Unrecognized mount option umask
FAT32: unable to read boot sector

tries also FAT, isofs, HFS+, hfs, NTFS, reiser, JFS, XFS
before
Code:
Adding Swap: 128448k swap space (Priority -1)

Maybe we need a bootblock there (but where), not an MBR ???

And now I got access to hda2 via my FAT32-modification of hda2, the drive is shown with the typical icon after connecting to USB, but without Autostart-function. You can start EDmini_LogOn.exe manually, but it didn't work, all fields are blanked.

Another problem: Trying to access the box via http://EDmini I get the error "404 Not Found" and can't start the web-interface http://EDmini/cgi-bin/admin too, get the login asking for user/pwd, it accepts admin, but shows only this text (edmini.sh):

Code:
/usr/bin/edmini.sh: line 1: Invalide: command not found
BusyBox v1.00 (2005.10.06-09:09+0000) multi-call binary

Usage: grep [-ihHnqvs] PATTERN [FILEs...]

Search for PATTERN in each FILE or standard input.

Options:
   -H   prefix output lines with filename where match was found
   -h   suppress the prefixing filename on output
   -i   ignore case distinctions
   -l   list names of files that match
   -n   print line number with output lines
   -q   be quiet. Returns 0 if result was found, 1 otherwise
   -v   select non-matching lines
   -s   suppress file open/read error messages

/www/cgi-bin/public/sharelist: line 4: static: command not found
/www/cgi-bin/public/sharelist: line 10: Invalide: command not found
/www/cgi-bin/public/sharelist: line 11: Failed: command not found
/www/cgi-bin/public/sharelist: line 12: Failed: command not found
HTTP/1.0 200 OK
Content-Type: text/html

<html>
<head>
<link rel="stylesheet" href="/css/public_nas.css" type="text/css">
<title>LaCie NAS Administration</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
// Change image function
function ChangeImage (ImageName,FileName)
{
document[ImageName].src = FileName;
}
// -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
 a.s.o


Any ideas ????

_________________
LacieHasser


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sun Oct 04, 2009 8:02 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6014
Quote:
It's not mounted via fstab, that's doing by a crypting script called userdata in hda7/etc/rc.d/init.d

What this script actually does is loopmounting /dev/hda at offset $USERDATAPARTOFFSET. It seems this value is set by executing 'edmini_interface partition userdata offset'. I had a look, the string USERDATAPARTOFFSET is in the binary /usr/bin/edmini_interface.

The only reason I can think of for this is that the actual beginning of the mounted partition is another one than the point given by the partition table. Maybe this partition is also is exposed via usb to the PC, and thus should contain it's own partition table.
You could try to format the datapartition just flat ext3, and add it to fstab.


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sun Oct 18, 2009 11:36 am 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
H E U R E K A !!!

The EDmini v1 is now running like hell !!!

So here are my settings:

Image

According to davyk's partitions:

Image

I've taken the file userdata from an EDmini v2-image, modified the line USER_PART="/dev/sda2" to "/dev/hda3" and replace the old userdata in /etc/rc.d/init.d with the new one (get it here).

Then you add a line to fstab (both hda7 & 8) like this:
    # UserData
    /dev/hda3 /home vfat defaults 0 0

It works with FAT32, but better change to ext3, then you have to write
    # UserData
    /dev/hda3 /home ext3 defaults,rw 1 2

Don't forget to set USERDATA_HD= to /dev/hda3 in hda7/usr/bin/edmini.sh
and uncommentate/delete these lines:
Code:
eval `$EDM_IF partition userdata start`;
USERDATA_HD=`fdisk -lu $HDD_DEV | grep USERDATASECTORSTART | ( read DEV REST; echo $DEV)`

Today there are some errors in the admin-cgi-scripts (don't know why), and the USB-EDminiLogOn doesn't work - but this doesn't matter if you didn't want to use it via USB.

Image

Finally we can add remote root and dropbear (for SSH) as described here:
http://luon.net/~admar/journal/LaCieEthernetDiskMini.html
and here:
http://jim.studt.net/edmini/index.html
Attention please: There is an error cause Jim has forgotten the -f option!
Code:
http://lacie250/cgi-bin/hole?dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key

You have to restart dropbear (located in /etc/init.d/ with start | stop | restart | status) to enable ssh, so you have access via PuTTY. But it's not easy to configure, have a look here:
http://www.psykocybernetik.com/blog/?q=content/add-ssh-lacie-edmini-v2
http://www.psykocybernetik.com/blog/content/ssh-pam-and-private-public-key-authentication-lacie-edmini

>>>> Work finished

Greetings & good luck!

_________________
LacieHasser


Last edited by LacieHasser on Mon Jul 25, 2011 8:53 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sat Oct 24, 2009 2:02 am 
Offline

Joined: Wed Jul 15, 2009 10:33 pm
Posts: 4
Hello LacieHasser,
I'm trying to reconstruct my Edmini but I have some problems and I have some questions for you.
I hope that you can help me.

First question
I recovered the partitions images (hda6, hda7, hda8 and hda2) on my hard-disk.
I didn't use the image of the hda5 (swap) partition because you said that it's not usable).
Like you when I copied the hda2 (EdminiLogon) image supplied by davyk I obtained an unknown and unusable partition.
You wrote "And now I got access to hda2 via my FAT32-modification of hda2"
Could you tell me what I have to do exactly to solve this problem ?

Second question
You wrote that you took the file userdata from an EDmini v2-image, modified the line USER_PART="/dev/sda2" to "/dev/hda3" and replace the old userdata in /etc/rc.d/init.d with the new one.
I don't understand which partition image you used for the hda3.
I don't have an image for it so my hda3 is empty.
Which image you restored on the hda3 ?
I found the userdata file in /etc/rc.d/init.d/ but it's on the hda7 partition, not hda3.
Did you recovered this partition image two times ?

Thank you very much
Bye


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sun Oct 25, 2009 12:43 pm 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
@mspr
1)
Quote:
I didn't use the image of the hda5 (swap) partition because you said that it's not usable).
Correct

Quote:
Like you when I copied the hda2 (EdminiLogon) image supplied by davyk I obtained an unknown and unusable partition.
I've got the same as you can read in my posting "The mysterious hda2" from 25. Sep. 2009 w. 3 pictures. It's something "Lacie-special" with looping the hda2-partition & a userdata offset, didn't find out exactly what they've done with hda2 (v2 didn't have a USB-connection).

Now we are on the box with ssh we can find this:
Code:
LaCie250 / # eval 'edmini_interface partition userdata offset'
Invalide map signature: [0]
Failed to find the Ethernet Disk Mini Map!
Failed to initialize the partition manager

You can extract the files with a Win-prog called Winimage and create a new hda2.img w. FAT32 spec, then you can write it back with dd as I did.
After this you can see the EDmini-Icon from the box connecting the USB-Port:
Image

:idea: If you're familiar w. Linux you can change the name of the disk: mlabel -i /dev/hda2 ::"ED_MINI" :!:

So far, so good - but remember: you didn't need hda2 for networking with the EDmini !!!!!! It's only for using v1 via USB.

2)
Quote:
I don't understand which partition image you used for the hda3.
As you pointed out: hda3 is empty, just formatted as FAT32 (or ext3), it didn't need an image.
Quote:
I found the userdata file in /etc/rc.d/init.d/ but it's on the hda7 partition, not hda3.
Yes, thats also right, change this out & you're on the right way!

bye

_________________
LacieHasser


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Mon Mar 22, 2010 7:55 pm 
Offline

Joined: Mon Mar 22, 2010 4:13 pm
Posts: 3
I've been reading this thread to try to get my EDmini v1 running again.

The Edmini works fine when connected with USB, I can run the loginprogram and access my files and Lacie EdMiniUpdater finds the drive.

But when I connect the device to the LAN, the port on the switch lights up, but there is no traffic from the EdMini and I cannot see any mac-address on the port where it's connected. I've tried reseting the device in EdMiniUpdater with no success. Plugging the drive in a computer shows all partitions and contents as I imaging the would look like.

So before I repartition the original HDD and probably messes things up even more I took an old PATA disk and partitioned it like LacieHasser shows above. I then downloaded davyk's images and used dd to restore hda6 (uBoot), hda7 (root filesystem) and hda2 (FAT32 Edmini logon). Starting it up on the LAN I got the same problem as above, no traffic on the ethernet port. If I connect it via USB, I can see all 7 partitions on the drive, not just the FAT32 logon partition. It's like when you plug in any drive in the Edmini and connect it. One strange thing about this is that my hda2 (fat32 logon) shows as "unknown filesystem" when I've restored the partition. I guess I must have done something wrong when creating the partitions or restoring the dd-images, but I can't figure out what.

Do anyone have any suggestions on what to try next either with the original or the replacement drive?

Also, does anyone know how to remove the logon when you connect it to USB? So when you connect it you'll see your files (hda3) immediately instead of hda2?


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Sun Mar 28, 2010 10:04 am 
Offline

Joined: Wed Sep 02, 2009 7:25 am
Posts: 17
Sponk,

you didn't mentioned hda8 on the new disk !!??
Can you ping the IP address ??
If not it's maybe a hardware defect ??

It's ok that hda2 "contains no filesystem" if you repartioned it from the davyk images, have a look at my screenshots:
    identified as FAT12
    unusual number of reserved sectors
    incorrect number of heads/cylinder

My configuration enables functionality over network only, not USB (I'am very happy to use it w.out USB because the EDmini is slowing down using the loop-device,
direct access via 'mount' is the better & faster way for networking).

In my opinion this thing works with USB if you configure it as described here:
http://forum.nas-central.org/viewtopic.php?f=141&t=1879

_________________
LacieHasser


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Thu Apr 22, 2010 8:10 am 
Offline

Joined: Mon Mar 22, 2010 4:13 pm
Posts: 3
But hda8 is just the overlay right? It's not included in davyk's partition images. On my original disk hda8 is empty.

On my original disk the partitions looks like this

Disk /dev/sdb: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0+ 30 31- 248976 5 Extended
start: (c,h,s) expected (0,1,1) found (1023,254,63)
end: (c,h,s) expected (30,254,63) found (1023,254,63)
/dev/sdb2 31 47 17 136552+ c W95 FAT32 (LBA)
start: (c,h,s) expected (31,0,1) found (1023,254,63)
end: (c,h,s) expected (47,254,63) found (1023,254,63)
/dev/sdb3 48 60801- 60754- 488001024 c W95 FAT32 (LBA)
start: (c,h,s) expected (48,0,1) found (1023,254,63)
/dev/sdb4 0 - 0 0 0 Empty
/dev/sdb5 0+ 15 16- 128457 82 Linux swap / Solaris
start: (c,h,s) expected (0,2,1) found (1023,254,63)
end: (c,h,s) expected (15,254,63) found (1023,254,63)
/dev/sdb6 * 16+ 16 1- 8001 83 Linux
start: (c,h,s) expected (16,1,1) found (1023,254,63)
end: (c,h,s) expected (16,254,63) found (1023,254,63)
/dev/sdb7 17+ 29 13- 104391 83 Linux
start: (c,h,s) expected (17,1,1) found (1023,254,63)
end: (c,h,s) expected (29,254,63) found (1023,254,63)
/dev/sdb8 30+ 30 1- 8001 83 Linux
start: (c,h,s) expected (30,1,1) found (1023,254,63)
end: (c,h,s) expected (30,254,63) found (1023,254,63)

On the 80GB disk I'm trying to get working on the Lacie I partitioned it like this

Disk /dev/sdc: 3647 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sdc1 0+ 31 32- 257008+ 5 Extended
/dev/sdc2 * 32 49 18 144585 c W95 FAT32 (LBA)
/dev/sdc3 50 3646 3597 28892902+ c W95 FAT32 (LBA)
/dev/sdc4 0 - 0 0 0 Empty
/dev/sdc5 0+ 15 16- 128457 82 Linux swap / Solaris
/dev/sdc6 16+ 16 1- 8001 83 Linux
/dev/sdc7 17+ 29 13- 104391 83 Linux
/dev/sdc8 30+ 30 1- 8001 83 Linux


and then used the linux dd command to restore davyk's images. But when I connect the Lacie with this 80GB disk with USB I see all the partitions on the disk, not just the logon partition which I'm supposed to see.

What did you use to partition the disk with the unusual c, h, s values that parted reports?

The network interface is stone dead (except for the LEDs). No traffic what so ever comes from the Lacie. I'm guessing it's a hardware problem, but it would be nice to confirm that by getting the 80GB disk working with davyk's images.

Right now I've given up hope. I reformatted the original 500GB disk and I'm using it as a normal USB-disk

Thanks for helping out!


Top
 Profile  
 
 Post subject: Re: Diskimages?
PostPosted: Tue Aug 24, 2010 11:05 am 
Offline

Joined: Tue Aug 24, 2010 10:28 am
Posts: 6
Hi guys.
I’m a newbie in this forum and I have just basic skills when it comes to computers. My knowledge in linux is zero (0). The thing is that I bought myself a LaCie Ed 300GB mini some years ago and I’ve just love it. Unfortunately this pressures thing was bricked last week due to a failing power supply. I’ve goggled around and found this thread and became quite upbeat after reading it. The problem is that after my failure with the Ed mini power supply I took it apart and connected it to my computer an formatted the hard drive (Maxtor PATA 300GB original disk) with the intention just to use it as a USB disk. The problem with this is that I had to login every time because the logon icon for the guest account is coming up every time I connect the disk to a computer. This “login stuff” must be hardcoded in some way because the hard disk is for the moment formatted in NTFS and I can’t see any hidden partitions if I look at it in partition magic. After reading this thread I’ve realized that it could be a way to bring new life in my just passed away disk again.
Is there a way to just clone an old working disk with Ghost or partition magic or whatever program and then just reimage my original disk? As I have no knowledge whatever in computing and linux this should be the easiest way for me to bring new life in my Ed mini. Is there anybody out there how could help me with this problem I should appreciate it soooo much!!
Best regards
obus


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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