General NAS-Central Forums

Welcome to the NAS community
It is currently Sun Nov 19, 2017 4:03 pm

All times are UTC




Post new topic Reply to topic  [ 50 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Sun Sep 12, 2010 6:03 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
steps to recover your edmini v1 using gparted do the following

1. Plug the drive in a Linux computer, or use a Linux Live disk.

2. open gparted and make the following partition see the attached image

a. make 244 mb extended partition (sdb1)

inside the extended partition make the following partition

b. make 126 mb linux swap partition (sdb5)
c. make 8 mb ext3 partition (sdb6) a raw uBoot-Image for booting
d. make 102 mb ext3 partition (sdb7) root-filesystem
e. make 8 mb ext3 partition (sdb8) an overlay for hda7

3. make 134 mb fat32 partition ( sdb2 for USB login)

4. make a fat32 partition for the space left( sdb3 for user stored data).

than download davyk images and extract all files http://rapidshare.com/files/437283447/Edmini-img.7z

5. Use "dd" command to write those images to partitions sdb6, sdb7, sdb8, and sdb2 which you just created using this command:
Code:
dd if=/dev/home/Linux native Volume 2.img of=/dev/sdb6 bs=512

dd if=/dev/home/Linux native Volume 3.img of=/dev/sdb7 bs=512

dd if=/dev/home/Linux native Volume 4.img of=/dev/sdb8 bs=512

dd if=/dev/home/FAT 32 Volume 1.img of=/dev/sdb2 bs=512


6. write the MBR image to disk using this command

Code:
Code:dd if=/home/mbr of=/dev/sdb bs=30720 count=1


7. Substitute /home/ above for the location where you placed the image files. Substitute sdb to match your hardisk.

8. Once all images have been written, check gparted to see sdb5,sdb6, and sdb2 are black.
Now the drive should be good to go no need to modify any files. sorry for my bad English :)


You do not have the required permissions to view the files attached to this post.


Last edited by mtrok2 on Thu Dec 16, 2010 11:13 am, edited 7 times in total.

Top
 Profile  
 
PostPosted: Tue Sep 14, 2010 7:35 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
Hi I need some help here there is something strange although I can reconstruct any disk to run on edmini, still there is a problem. The edmini logon is hidden and I am not sure where, I know it contain two partation one is fat12 size around 16mb and the other one is Hfs+ size around 5mb and I think both stored in 134mb partation which shows as unallocated space, the problem that I can not copy the image to the unallocated space since it does not have a drive name assigned to it. the only way that I am able to run the edmini is by cloning the unallocated space from a harddisk that I have to the disk that I want to construct than I make the rest of partation manually which works for me, but it wont work for other unless we figure out how to write this image of the usb logon back to the disk. if I do not clone the unallocated space the drive does not work correctly, it works the same way like it worked for laciehassar in the other thread. the only way for the drive to work correctly is by putting the unallocated space back which tell me that this space is really reguired for the disk to boot correctly.

thanks


Top
 Profile  
 
PostPosted: Tue Sep 14, 2010 7:45 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
If you know the offset of the unallocated space, you can use a loop device:
Code:
losetup -o offset /dev/loop0 /dev/sdb
dd if=backup_of_unallocated_space of=/dev/loop0


Top
 Profile  
 
PostPosted: Tue Sep 14, 2010 8:06 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
thanks for the replay
no I do not know the offset of the unallocated space. I will have to read more and try to figure it out

Thanks again


Top
 Profile  
 
PostPosted: Tue Sep 14, 2010 8:21 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
mtrok2 wrote:
no I do not know the offset of the unallocated space.

Maybe fdisk -lu can tell you. It will show the start and end of all partitions in sectors. So you can find all unallocated space(s)


Top
 Profile  
 
PostPosted: Tue Sep 14, 2010 10:48 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
fdisk did not show the unallocated space. I used gparted information to get the start of the first sector which is 498015 and last sectors which is 771119

thanks


Top
 Profile  
 
PostPosted: Wed Sep 15, 2010 7:11 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
mtrok2 wrote:
fdisk did not show the unallocated space.
No, that's true. It shows all located space, and all sectors which aren't allocated, are unallocated.


Top
 Profile  
 
PostPosted: Wed Sep 15, 2010 8:18 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
Mijzelf wrote:
If you know the offset of the unallocated space, you can use a loop device:
Code:
losetup -o offset /dev/loop0 /dev/sdb
dd if=backup_of_unallocated_space of=/dev/loop0


I took the starting offset of the unallocated space and I multiply by 512 than I used the command losetup -o 394813440 /dev/loop0 /dev/sdb nothing happened after I clicked enter afterward I used the command dd if=fat32.img of=/dev/loop0 and it started to write. I took the disk and connected it to the box and still does not work. did I do that correctly.


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 8:26 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
I think you used the ending offset. When I look at your gparted dump, I see sdb1 is 243 MiB big, and the unallocated space (which is positioned behind), is 133 MiB. Together they are 376 MiB, which about equals your offset of 394813440.

The offset should be about 255000000, which is about sector number 500000.

Quote:
nothing happened after I clicked enter
That's common linux practice. No feedback is good feedback. You can see the results of your action with
Code:
losetup -a
which lists all occupied loopdevices.

BTW, I now see the whole loop device is unnecessary. You can also use
Code:
dd if=fat32.img of=/dev/sdb seek=offset

where offset is the offset in sectors. (Unless you specify another blocksize)


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 10:34 am 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
dd if=unallocated_space.img of=/dev/sdb seek=offset worked, it copied the image to the unallocated spcace. the drive now boot from USB and through network correctely. The problem was with davyk fat32 image. I pluged one of my working harddisk 80gband checked the sector of the unallocated space in hex editor and compared it to davyk fat32 image and they did not match, so I used linux disk internal to create an image of the unallocated space of my working hard disk than I used the above commaned and connected the drive and everything work :P although the fat32 sdb2 got corrpted and showed the spcification of 80gb disk, but no problem I just formated the disk and back to normal. By the way I used it on 4GB harddisk so the 4gb become 80 and I put the unallocated space at the begining so I used offset 0. I will try to upload the images and edit the guide for others to use. thanks Mijzelf for your help.


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 11:02 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Quote:
although the fat32 sdb2 got corrpted and showed the spcification of 80gb disk

In that case your unallocated_space.img is too big, and has overwritten the start of partition sdb2.

BTW, when I read your startpost, I don't understand how the unallocated space is created. I suppose you created a sdb2, and a sdb3, and then deleted sdb2? Did gparted automatically rename sdb3 to sdb2?


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 1:13 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
yes gparted automatically renamed it from sdb3 to sdb2, but now I do not have to create sdb3 I just leave free space of 134mb before sdb2 when i create it so no need to create sdb3. when I connect via usb before logon gparted show sdb1 file system unknow size 1kb and sdb2 hfs+ size 4.96mb and 128.39 mb of unallocated space. fdisk shows sdb1 as apple partiation map and sdb2 as apple hfs. disk utillity shows the capacity of disk 140mb and partitioning as master boot record and show sdb1 partation type w95 fat32 type fat 12 (16mb) and sdb2 partitation type unknown type hfs (5.2mb) and 118 mb of unallocated space total 139.2mb so for sure my image is too big and overwritten the start of sdb2 so I will try again this time I will make the unallocated space 140 mb and see what happen. by the way do u think this image has the usb logon info and an MBR for the disk to boot correctly or what. thanks


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 5:46 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Using testdisk I found the image contains both an IBM and a Mac partition table, and a FAT and a HFS+ partition. The FAT partition contains an autorun.inf which starts a EDmini_LogOn.exe. Further it contains a subdirectory Linux containing an i386 executable EDmini_LogOn. The HFS+ partitions seems to contain a Mac executable EDMini_LogOn.
So yes, I think this image contains USB logon info.

By the way, I *think* the image is way to big. The HFS+ partition is 5201920 bytes, the FAT partition is 16418304 bytes. Let's take some overhead, then I think that you can skip everything after 32MiB.


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 6:20 pm 
Offline

Joined: Sat Sep 11, 2010 3:56 pm
Posts: 25
yes the image contain the usb logon for windows/mac/linux I can see it when I connect the disk via usb. but davyk image does not work for me and it is diffrenet than the image I made from one of my disk which I think it contain some extra code that is needed for the disk to boot correctly and accessed via web. when I used davyk image the usb logon does not work and accessing via web return an error like laciehassar had. but if I use the image that I created everything works good except that I have written over sdb2 and need to delete it and format it again but I will try to solve that. sorry I did not understand what you mean about skip everything after 32MiB. Thanks


Top
 Profile  
 
PostPosted: Thu Sep 16, 2010 7:58 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
mtrok2 wrote:
sorry I did not understand what you mean about skip everything after 32MiB. Thanks

I mean that only the first 32MB of the unallocated space actually contain data. (At least at the davyk image). The rest contains only zero's. (I checked that).
So instead of writing your whole image, you could suffice only writing the first 32MB:
Code:
dd if=unallocated_space.img of=/dev/sdb seek=offset count=64k

(This will write 64k blocks of 512 bytes). Now your sda2 will not be damaged. You could also choose to shrink your image:
Code:
dd if=unallocated_space.img of=first_32MB.img count=64k


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

All times are UTC


Who is online

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