General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Apr 27, 2017 2:56 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Strange Partition Table
PostPosted: Tue Nov 04, 2014 11:58 pm 
Offline

Joined: Tue Nov 04, 2014 10:00 pm
Posts: 5
Hi, I purchased a second hand EDMini V2 and although the network window on my computer could see it (and I could see the shared folders) when I entered admin for password it rejected it.
Even stranger was that the software from Lacie couldn't see it :(

I tried doing the press and hold power button reset sequence and that all seemed to work but when I did this I could no longer turn off by the blue button and had to pull the power. Once it had spun down and I reconnected the power it would turn on and off as it should but admin password still failed.

I did eventually get the Lacie software to see it (hurray) and decided that as I had nothing on the drive and wanted it clean I would do "Restore" rather than "Reset". All seemed to go fine and the software told me to turn the drive off and then on again. Blue button not turning it off, pull power, restore power, drive spins up but now invisible to network and button now does nothing (can only turn off by pulling power).... AAaarrrrrrrrr

I found this forum and went through the posts about restoring the partition table and contents. Fantastic :D Got a USB - Sata converter, downloaded Ubuntu 14.1 and set it to run from USB Stick, plugged it all up and ran "Disks" (apparently it's a derivative of Gnome), and there was the drive.

Much joy but short lived... The partition table I am looking at is quite different to what has been described before and I don't know if I should Format and start again or get a mate who is savvy with Linux to look at it first? I'm now worried that the 9 partition method might be wrong for this drive.
On the other hand it was second hand and may have been hacked quite different from it's original layout.

What is showing is:

/dev/sdb1 - Linux (Bootable). Contents: Ext3 (v1) - 3.1 GB - Mounted
/dev/sdb2 - Linux swap. Contents: Swap (v1) - Not Active - 543 MB
/dev/sdb3 - Linux. Contents: Ext3 (v1) - 496 GB - Mounted (it's a 500 GB Hitachi Drive)
/dev/sdb4 - Extended Partition - 41 MB
/dev/sdb5 - Linux. Contents: Unknown - 16 MB - In Extended Partition
/dev/sdb6 - Linux. Contents: Unknown - 8.2 MB - In Extended Partition
/dev/sdb7 - Linux. Contents: Ext3 (v1) - 3.1 GB - Mounted - In Extended Partition
Unallocated Space 2.6 MB

Disk assessment reports that the disk is Ok with 1 bad sector

Anyone have any ideas why the existing partition table is so different? If I delete the inactive swap partition at /dev/sdb2 would that bump all the others down and the main storage area (496 GB) would now be sdb2? But that would leave me having 6 partitions instead of 9

One last question, is there now a GUI method of restoring the partition contents files or is DD the best way?

Andy :)


Top
 Profile  
 
PostPosted: Wed Nov 05, 2014 12:37 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
Are you sure that is an Edmini V2? As you already mentioned, that table doesn't look like it. I know the Edmini (V1) had a different partition layout (a different SoC also, so you can't use V2 partition content).

Quote:
If I delete the inactive swap partition at /dev/sdb2 would that bump all the others down and the main storage area (496 GB) would now be sdb2?
Yes. But partition 5 and up are in an extended partition (partition 4), so these won't shift.

Quote:
is there now a GUI method of restoring the partition contents files
Not that I'm aware of.


Top
 Profile  
 
PostPosted: Thu Nov 06, 2014 10:11 pm 
Offline

Joined: Tue Nov 04, 2014 10:00 pm
Posts: 5
Hi Mijzelf, thank you for giving me a hand :)

I am almost certain that when windows network could find the drive it described it as an EDmini V2 but I will also check which processor is fitted as the USB port is a Type A and all pics I have seen of the V2 have a Type B... It came in the original box and that simply describes it as home edition but it was manufactured as a 500 GB drive (as opposed to 250 GB)

If it is a V1 it's still odd as they have 8 partitions :-/

I will post an update once I have had a look at the board :)

Andy


Top
 Profile  
 
PostPosted: Thu Nov 06, 2014 10:41 pm 
Offline

Joined: Tue Nov 04, 2014 10:00 pm
Posts: 5
Just had a look (only 2 x screws holding the board in) and it has EDMini V2 printed on the circuit board

Andy :)


Top
 Profile  
 
PostPosted: Fri Nov 07, 2014 8:29 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
Ah yes, the home edition. That is the same hardware as the 'classic' V2, but it only lacks an USB device connector.

I'm not aware of any difference in partition scheme, but I bought my exemplar 2nd hand without disk, I think.

Anyway, the only partitions important to get it booting are 6 and 7. 6 is a raw partition containing a uImage (the kernel), and 7 contains a small userland. The 'classic' scripts on partition 7 assemble a layered filesystem of partitions 8 and 9, and then switch root to it. But there is no reason why a partition 7 couldn't contain something else. (I had a 2Big2 running Debian by simply creating a big partition 7 and put a Debian rootfs on it.)

Seeing your table I think partition 7 already contains the 'complete' firmware. Maybe a backup in partition 1.

If you have a spare disk, you can simply create a 'classic' Edmini V2 disk, and see if it boots.

(BTW, actually only partition 6 is important, as the bootloader (in flash) expects the kernel there. The commandline specifies partition 7 as rootfs, but compiling a kernel which ignores the commandline is trivial)


Top
 Profile  
 
PostPosted: Sun Nov 09, 2014 11:42 pm 
Offline

Joined: Tue Nov 04, 2014 10:00 pm
Posts: 5
I have now backed up Partition 6 and 7 so I can always go back as it was :)

What I need now is a lot of hand holding on how to use DD... I have looked on tinternet but it's making me even more confused :(
I tried moving the target files (sda6 etc) around the file structure and the best I have got is that I do not have permission to write to the target drive... I don't have a clue how to format my instruction...

Could someone do a simple partition backup using "Disks"?

Sorry for being so rubbish at Linux :-/

Andy


Top
 Profile  
 
PostPosted: Mon Nov 10, 2014 9:52 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5981
Actually it's really simple. dd is a tool to copy one file to another. Not more, not less. Because in Linux everything is a file, even when it isn't a file, you can also use this tool to copy disks, partitions and other block devices to each other, to files, or back. By default dd copies from stdin to stdout. Fortunately you can alter that.
dd if=somefile of=/dev/sda1
copies somefile (iinputfile) to a partition (outputfile).
dd if=/dev/sda1 of=/path/to/somefile
copies a partition to a file. As that file can become huge, you can pipe it through a compressor (by omitting the 'of' dd copies to stdout):
dd if=/dev/sda1 | gzip >/path/to/somefile.gz
Then you have to decompress it when you want to restore it.
cat /path/to/somefile.gz | gzip -d | dd of=/dev/sda1
Quote:
the best I have got is that I do not have permission to write to the target drive.
In that case I guess you are using sudo to get root privileges in this form:
sudo cat /path/to/somefile.gz | gzip -d | dd of=/dev/sda1
But sudo only elevates 'cat' here. To do this properly, the command is
cat /path/to/somefile.gz | gzip -d | sudo dd of=/dev/sda1


Top
 Profile  
 
PostPosted: Wed Nov 12, 2014 2:23 am 
Offline

Joined: Tue Nov 04, 2014 10:00 pm
Posts: 5
I'm making progress :D

Deleted all the existing partitions and started afresh. Cheated a bit as found Gdiskdump (DD Gui) and the drive now turns on and off as it should and I can see EDMINI in network view (though not Hipserve as a Media Device).
The Lacie software does not see the drive but I'm guessing that's something to do with Hipserve not showing?

Hopefully it's something to do with me not setting partition 2 up properly so I'm going to have another go tomorrow.

Thank you Mijzeff for all your help, Andy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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