Install Debian & ArchLinuxARM on Iomega HMNHDCE

olderzeus
Posts: 20
Joined: Sun Aug 26, 2012 11:11 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by olderzeus » Fri Dec 21, 2012 12:59 pm

SezerC wrote:I've succcessfully installed debian to my HMNDCE. Everythings fine. But i think there are something unstable; when i plug device into electricity, it doesnt boot debian. ı cannot connect device via ssh or even via webmin But press power button once to restart, it restarts and boot debian.
How can we fix this?

(excuse me for bad english :) )

Sezer.

edit: and also i tried to install open media vault manually onto debian, but it gave an error about Arm CPus. Any fix for that?
In this Debian [or ArchLinuxARM] systen, HMNHDCE's powerbutton is redefined as:
Press once: After 8 seconds, system will restart network service;
Press twice (In 8 seconds, after first press): After 5 seconds, system will reboot;
Press triple (In 5 seconds, after second press): System will shut down immediately;
This redefined depend on package screen, it already include in this system;
if you used this commond:

Code: Select all

ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
to regenerate ssh service's key, you may need to change your password through usb device bootup.

your can bootup from usb storage, and:
mount inner hdd:

Code: Select all

mkdir -p /hdd
mount /dev/sda1 /hdd
chroot /hdd
passwd root
exit
after all, reboot to normal, now you can connect device via ssh;

My english is pool 2...

tyux2
Posts: 8
Joined: Wed Jan 16, 2013 8:10 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by tyux2 » Fri Jan 18, 2013 12:28 pm

Hi Olderzeus,

I am currently trying to get Debian on a 2 terra Iomega NAS.
Only problem that my linux (Ubuntu) sees the HDD with a Sata to USB adapter with 4096 sector size. As soon as I run your scripts to prepare the disk I see that everything is 8 times bigger.
The 32 Mb partition is 256 Mb, the 21.5 Gb partition is around 165 GB.

I am not sure that this is correct, but I checked the other script to install the bootsector, and this script is using sector numbers as addressing.

Is there anything I can solve this issue? Should I change anything in the scritps? Is there a method to change from sector size 4096 to 512?

Thanks in advance!

Cheers,

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by Mijzelf » Fri Jan 18, 2013 1:20 pm

Are you using a SATA to USB convertor? I have read that many of these use the same value for physical and logical sector size, which is 4k for an advanced format disk. So try to connect the disk directly to (e)sata.

tyux2
Posts: 8
Joined: Wed Jan 16, 2013 8:10 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by tyux2 » Fri Jan 18, 2013 1:36 pm

Mijzelf wrote:Are you using a SATA to USB convertor? I have read that many of these use the same value for physical and logical sector size, which is 4k for an advanced format disk. So try to connect the disk directly to (e)sata.
Only problem is that I have only laptops available. I have a 6 years old laptop which I can assembly, but I am not sure that it is using the eSATA connector.

BTW, can I recover somehow the original firmware with this 4096 sector size?

Thanks for the answer...

Cheers,

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by Mijzelf » Fri Jan 18, 2013 1:51 pm

tyux2 wrote:BTW, can I recover somehow the original firmware with this 4096 sector size?
Yes, I think so. Original firmware recovery boils down to writing a 32MB file to the raw disk device, so here sectorsizes are not important.

BTW, there might be an option to force the sector size to 512b. Create a loopdevice on the raw disk with blocksize 512, and run the script on that.

olderzeus
Posts: 20
Joined: Sun Aug 26, 2012 11:11 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by olderzeus » Fri Jan 18, 2013 2:02 pm

tyux2 wrote:Hi Olderzeus,

I am currently trying to get Debian on a 2 terra Iomega NAS.
Only problem that my linux (Ubuntu) sees the HDD with a Sata to USB adapter with 4096 sector size. As soon as I run your scripts to prepare the disk I see that everything is 8 times bigger.
The 32 Mb partition is 256 Mb, the 21.5 Gb partition is around 165 GB.

I am not sure that this is correct, but I checked the other script to install the bootsector, and this script is using sector numbers as addressing.

Is there anything I can solve this issue? Should I change anything in the scritps? Is there a method to change from sector size 4096 to 512?

Thanks in advance!

Cheers,
My script used parted to create partition and used "s" as unit;
You can modify the script to change unit to "B"(Byte) or "kB"(kilobyte)

& You can modify the script to change the size of first partition for rootfs.
The follow is my partition info in unit "B".

Code: Select all

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jan 16 18:56:01 2013 from admin-pc
root@IomegaNAS:~# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit                                                             
Unit?  [compact]? B                                                       
(parted) print                                                            
Model: ATA ST32000542AS (scsi)
Disk /dev/sda: 2000398934016B
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End             Size            File system  Name     Flags
 1      33554432B    8623489023B     8589934592B     ext3         primary
 2      8623489024B  2000398917119B  1991775428096B  ext4         primary

(parted)                                                                  

command line:

Code: Select all

parted /dev/sdX mkpart primary 33554432B 8623489023B
parted /dev/sdX mkpart primary 8623489024B 2000398917119B

tyux2
Posts: 8
Joined: Wed Jan 16, 2013 8:10 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by tyux2 » Fri Jan 18, 2013 2:14 pm

Thank you for the answer. :)

What about this script? #!/bin/sh

if [ "$1-" = "-" ]; then
echo "You must choose a device!"
exit 1
elif [ -e $1 ]; then
dd if=bootrom.warpped of=$1 bs=512
dd if=stage1.wrapped of=$1 seek=34
dd if=u-boot.sd.wrapped of=$1 seek=154
dd if=u-boot.sd.env of=$1 seek=558
dd if=uImage.wrapped of=$1 seek=1290
dd if=initrd.wrapped of=$1 seek=16674
dd if=serial.warpped of=$1 seek=57080
dd if=stage1.wrapped of=$1 seek=57088
dd if=u-boot.sd.wrapped of=$1 seek=57208
dd if=uImage.wrapped of=$1 seek=58344
sync
exit 0
else
echo "$1 not exists"
exit 1
fi


Should I modify anything also?

Thank you, cheers

olderzeus
Posts: 20
Joined: Sun Aug 26, 2012 11:11 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by olderzeus » Fri Jan 18, 2013 2:20 pm

tyux2 wrote:Thank you for the answer. :)

What about this script? #!/bin/sh

if [ "$1-" = "-" ]; then
echo "You must choose a device!"
exit 1
elif [ -e $1 ]; then
dd if=bootrom.warpped of=$1 bs=512
dd if=stage1.wrapped of=$1 seek=34
dd if=u-boot.sd.wrapped of=$1 seek=154
dd if=u-boot.sd.env of=$1 seek=558
dd if=uImage.wrapped of=$1 seek=1290
dd if=initrd.wrapped of=$1 seek=16674
dd if=serial.warpped of=$1 seek=57080
dd if=stage1.wrapped of=$1 seek=57088
dd if=u-boot.sd.wrapped of=$1 seek=57208
dd if=uImage.wrapped of=$1 seek=58344
sync
exit 0
else
echo "$1 not exists"
exit 1
fi


Should I modify anything also?

Thank you, cheers

Modify mkgptdisk.sh or mkdosdisk.sh
only modify :

Code: Select all

parted $1 mkpart primary 65536s 42008576s
to:

Code: Select all

parted $1 mkpart primary 33554432B 8623489023B
and you can use gdisk create the 2nd partition

tyux2
Posts: 8
Joined: Wed Jan 16, 2013 8:10 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by tyux2 » Fri Jan 18, 2013 2:25 pm

As I am not expert in Linux, I try to find how command "dd" works.

dd if=bootrom.warpped of=/dev/sdb bs=512

bs parameter is in sectors? or is it in bytes?

dd if=stage1.wrapped of=$1 seek=34

Same question applies to seek. Is it sectors?

If they are sectors, how should I modify the flushsd.sh script?

Thanx

olderzeus
Posts: 20
Joined: Sun Aug 26, 2012 11:11 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by olderzeus » Fri Jan 18, 2013 2:38 pm

tyux2 wrote:As I am not expert in Linux, I try to find how command "dd" works.

dd if=bootrom.warpped of=/dev/sdb bs=512

bs parameter is in sectors? or is it in bytes?

dd if=stage1.wrapped of=$1 seek=34

Same question applies to seek. Is it sectors?

If they are sectors, how should I modify the flushsd.sh script?

Thanx
I read the help of command "dd", it's used byte as unit, and default bs is 512 bytes.
If you want modify this command lines, then all lines add "bs=512 ibs=512 obs=512" too.(It's "dd" command's default parameter)


I'm not confirm the seek parameter can use unit.
Maybe you can modify it.

Code: Select all

c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M
GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.
Last edited by olderzeus on Fri Jan 18, 2013 2:43 pm, edited 1 time in total.

tyux2
Posts: 8
Joined: Wed Jan 16, 2013 8:10 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by tyux2 » Fri Jan 18, 2013 2:42 pm

Cool, good infos. :)

I'll try to make a functional NAS from my bricked unit and I'll update you with the results.

Thx...

jaimealm
Posts: 21
Joined: Tue Jun 22, 2010 3:08 pm

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by jaimealm » Wed Jan 30, 2013 8:38 pm

i've been trying this for a week and everything works ok, but now i want to use the original hard drive i have with original iomega firmware.
Do you think it could be possible to install this without deleting the big partition of a hard drive with the original firmware?
i think there's something to do with the partition table we use.

olderzeus
Posts: 20
Joined: Sun Aug 26, 2012 11:11 am

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by olderzeus » Thu Jan 31, 2013 2:45 am

jaimealm wrote:i've been trying this for a week and everything works ok, but now i want to use the original hard drive i have with original iomega firmware.
Do you think it could be possible to install this without deleting the big partition of a hard drive with the original firmware?
i think there's something to do with the partition table we use.
There is no way for original iomega firmware and this debian to use the same big partition with inner HDD, because the big partition of XFS in original iomega firmware doesn't work correct with this debian or archlinux.

deanodley
Posts: 3
Joined: Thu Aug 23, 2012 3:43 pm

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by deanodley » Wed Feb 06, 2013 6:23 pm

@olderzeus - once debian.tgz is installed on the hmnhd-ce, is there an easy way to upgrade to Debian wheezy/testing?
I think the kernel must be upgraded first or there will be problems with udev.
I assume the new kernel must be written directly to the disk rather than using apt/aptitude?
Any suggestions? Thanks.

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

Re: Install Debian & ArchLinuxARM on Iomega HMNHDCE

Post by seidler2547 » Wed Feb 06, 2013 6:37 pm

olderzeus wrote:
jaimealm wrote:i've been trying this for a week and everything works ok, but now i want to use the original hard drive i have with original iomega firmware.
Do you think it could be possible to install this without deleting the big partition of a hard drive with the original firmware?
i think there's something to do with the partition table we use.
There is no way for original iomega firmware and this debian to use the same big partition with inner HDD, because the big partition of XFS in original iomega firmware doesn't work correct with this debian or archlinux.

That's not entirely true. I have posted instructions already on how to revert back to the original firmware. But I'm nit sure anymore if the data partition was lost then or not. There's something in my GitHub and search for this post I made here in the forum. At least one person did the recovery successfully I remember.

Stefan

Post Reply