[u-boot] bootm command leads to "bad magic number"

[u-boot] bootm command leads to "bad magic number"

Postby François Zeayon » Thu Apr 14, 2016 7:59 pm

Hello there. :)
First of all, thanks for the great work and the huge support.

As my Networkspace 2 couldn't get beyond LaCie first boot page, I look for an alternative software and found this.
I installed FVDW-SL software yesterday and everything seemed OK but, after a reboot, my NAS was unreachable and led blinked red / blue for a while.

I first followed instructions here : Thwarted in attempt to install fvdw-sl-console.
I then followed instructions here : 3TB Cloudbox - does not appear on network. I did this until post http://plugout.net/viewtopic.php?p=22016#p22016 where "bootm" command led to this topic title.

I then checked FVDW-SL console help for "Flash U-Boot" and came here to get support to prevent me bricking my NAS.

That said, could I get some guidance to get this Networkspace 2 working, please ?

Thank you. :)
François Zeayon
Donator VIP
Donator VIP
 
Posts: 13
Joined: Tue Apr 12, 2016 8:04 pm

Re: [u-boot] bootm command leads to "bad magic number"

Postby Jocko » Thu Apr 14, 2016 8:46 pm

François Zeayon wrote:I then checked FVDW-SL console help for "Flash U-Boot" and came here to get support to prevent me bricking my NAS.
Indeed don't do that.

it is not an issue with the bootloader and no flashing is required.

The issue is your disk : the bootloader fails to detect it.

For this point, I'd rather you wait fvdw who is the expert for this.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: [u-boot] bootm command leads to "bad magic number"

Postby fvdw » Thu Apr 14, 2016 9:07 pm

As my Networkspace 2 couldn't get beyond LaCie first boot page, I look for an alternative software and found this.
I installed FVDW-SL software yesterday and everything seemed OK but, after a reboot, my NAS was unreachable and led blinked red / blue for a while.


Please describe more accurate what you did, did you use the fvdw-sl installer or did you install fvdw-sl on another way ?

As Jocko said red/blue flashing of the led means the disk is not recognized by the bootloader. This can mean either because the disk is defective or it has no or wrong partition table.
Defective is not likely because you mentioned you were able to install the firmware.
because you mentioned "bootm command leads to "bad magic number it means when trying to load a kernel from partition 6 this means the loading of the kernel to memory from partition 6 failed. Then bootm command will fail with this error.
Quetion when gave the command disk 0x800000 0:6 did you get output similar to this?
(the Image Name will be different as in this example and also image size)
Code: Select all
Marvell>> disk 0x800000 0:6
disk 0x800000 0:6## Valid EFI partition found ##

Loading from IDE device 0, partition 6: Name: gpt6  Type: U-Boot
   Image Name:   Linux-2.6.39.4
   Created:      2012-12-23  21:59:32 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3123456 Bytes =  3 MB
   Load Address: 00008000
   Entry Point:  00008000
Marvell>>

I would expect that you didn't get this otherwise the bootm command would not have failed



What to do? first step check your harddisk and partition table start the fvdw-sl console on your pc and choose action load standalone kernel (use kirkwood standalone kernel) and log in with the telnet client.
At linux prompt type the commands
Code: Select all
fdisk -l /dev/sda

and
Code: Select all
gdisk -l /dev/sda

And post the output that you get
The second command is needed when you have choosen GPT as partition table when running the fvdw-sl installer when you installed the firmware

If this fails (no output) then you harddisk is probably defective. If it gives output I need to see the result to judge if there is problem.
If it is a normal partition table then we can try to access the disk by mounting a partition
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: [u-boot] bootm command leads to "bad magic number"

Postby François Zeayon » Fri Apr 15, 2016 9:26 pm

Thank you for your interest, gentlemen.

I used fvdw-sl-console, loaded UIMAGE-3142-KIRKWOOD-150-standalone standalone kernel and followed the procedure, with GPT option. This took a while. I ended the procedure with the final "reboot" command and here I am.

I tried another time to load this firmware (as far as I can remember), without installing and, then, fvdw-sl-assistant found the NAS.
I shut down and restarted the NAS to confirm that it was still blinking red / blue and unknown form fvdw-sl-assistant, wich is the case.
I, then, opened this topic. :)
François Zeayon
Donator VIP
Donator VIP
 
Posts: 13
Joined: Tue Apr 12, 2016 8:04 pm

Re: [u-boot] bootm command leads to "bad magic number"

Postby François Zeayon » Fri Apr 15, 2016 10:06 pm

I re-run u-boot console procedure listed beyond the second link wrote in the first post.
Command "disk 0x800000 0:6" gave following output : "disk 0x800000 0:6" (yes, the repetition of the command).

"fdisk -l /dev/sda" gives :
Code: Select all
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
256 heads, 63 sectors/track, 121126 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1      121127   976762583+ ee EFI GPT


"gdisk -l /dev/sda" gives :
Code: Select all
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4062 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096         1052671   512.0 MiB   8300  Linux filesystem
   2         1052672         2101247   512.0 MiB   8300  Linux filesystem
   3         2101248         3149823   512.0 MiB   8200  Linux swap
   4         3149824         3166207   8.0 MiB     8300  Linux filesystem
   5         3166208         4739071   768.0 MiB   8300  Linux filesystem
   6         4739072         4755455   8.0 MiB     8300  Linux filesystem
   7         4755456         5804031   512.0 MiB   8300  Linux filesystem
   8         5804032      1953525134   928.7 GiB   8300  Linux filesystem


Instructions, sir ? :)
François Zeayon
Donator VIP
Donator VIP
 
Posts: 13
Joined: Tue Apr 12, 2016 8:04 pm

Re: [u-boot] bootm command leads to "bad magic number"

Postby fvdw » Sat Apr 16, 2016 8:25 pm

Partition table looks ok and the device should work if the firmware files have been written to the partitions.

Before testing the partitions lets first concentrate on u-boot console. That the console repeats the command you type is normal but you should get after that the output I posted in the example, that it founds a valid partition and the info on kernel loaded. If that output is not coming then no kernel is loaded. Typically the ide bus must be reset before being able to acces the disk. Therefor try this, before giving the disk command give the this command
Code: Select all
ide reset

If the kernel now loads try the bootm command
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: [u-boot] bootm command leads to "bad magic number"

Postby François Zeayon » Sun Apr 17, 2016 8:23 pm

Hello. :)

I did call "ide reset".
Here it goes when I try again tonight :
Code: Select all
>>ide reset
ide reset

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode
  Device 0 @ 0 0:
Model: ST31000520AS                             Firm: CC32     Ser#:             9VX07HTQ
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

Code: Select all
>>setenv bootargs console=ttyS0,115200 netconsole=6666@${ipaddr}/,6666@${serverip}/ root=/dev/sda7 #(with ${ipaddr}=IP of NAS and ${serverip}=IP of PC)
#command repetition

Code: Select all
>>disk 0x800000 0:6
#command repetition
François Zeayon
Donator VIP
Donator VIP
 
Posts: 13
Joined: Tue Apr 12, 2016 8:04 pm

Re: [u-boot] bootm command leads to "bad magic number"

Postby fvdw » Mon Apr 18, 2016 3:29 pm

You should not replace the words ipaddr and serverip by actual ip address. (It are variable names that already have a value. If you replace them by ip numbers you get a command error like command replication
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: [u-boot] bootm command leads to "bad magic number"

Postby François Zeayon » Mon Apr 18, 2016 9:53 pm

Hello. :)

I did that too, with the same result: command replication only. I tried once more tonight.
François Zeayon
Donator VIP
Donator VIP
 
Posts: 13
Joined: Tue Apr 12, 2016 8:04 pm

Re: [u-boot] bootm command leads to "bad magic number"

Postby fvdw » Tue Apr 19, 2016 3:59 pm

Then you must have made a mistake. Ps do not use <cr> in the command line type the total line for setenv command before hitting enter
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 4 guests