Welcome! Log In Create A New Profile

Advanced

Boot Debian from SATA (GoFlex Net)

Posted by baafie 
Boot Debian from SATA (GoFlex Net)
March 26, 2012 03:20PM
Hi, using Jeff's modified script (http://dev.shyd.de/dockstar/dockstar.debian-squeeze.sh) I have successfully installed Debian on my drive. It is now booting from USB. However, I would like to connect the drive directly to the SATA port. When I plug it in, though, the device does not boot (blinks briefly green, then orange).

Does anyone know how to enable booting from SATA?
Re: Boot Debian from SATA (GoFlex Net)
March 26, 2012 08:11PM
Yes, you'll have to read the forum threads that document how to do it. Google doozan SATA boot goflex net, for starters.


Did you actually clone the USB rootfs and other partitions to the SATA drive already?

Did you enable and set up netconsole already?

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 03:24PM
Quote

Did you actually clone the USB rootfs and other partitions to the SATA drive already?
Yes.

Quote

Did you enable and set up netconsole already?

I have tried to follow the instructions from http://forum.doozan.com/read.php?3,14,14 but the first command fails with:
Too few good blocks within range
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 03:32PM
Yes, I've got the same problem w/ mine - the flash is a weak batch from the supplier...

I had to turn on netconsole w/ a console/serial cable. :^\

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 03:41PM
Running a serial cable means opening the device and soldering, right? Not really my cup of tea.

If I could restore the device to factory settings I could send it back to the supplier and get a new one to see if my luck improves.
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 03:54PM
Well, I didn't solder. The header pins are already populated. You just need to attach the leads to the 3 pins.

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 04:36PM
At any rate: if I connect to the serial console, will I be able to use setenv to enable SATA support? I am assuming
setenv arcNumber 3089
is the primary thing I am missing; I already have Varkey's GoFlex kernel running.
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 05:24PM
hmmm... I'm not sure what the docs say... that arcNumber value looks correct to me, but personally, I use a arcNumber value of 2678, since that is the one for Sheevaplug eSATA (closest thing to GoFlex in mainline linux), but if the docs say 3089 and you are using a GoFlex kernel, then I guess follow the docs.

(the replacement uboot for the current ones will have 2678[machid Sheevaplug eSATA] as the default fall-back, instead of 2097[machid Sheevaplug], since it is much closer to the GFN and can by default boot from SATA.

Using 2678, the only advantage to using the GoFlex Net kernel is the LED behavior (which certainly is a good thing). Varkey and others did a good job sorting the LED behavior out.

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 05:32PM
I think my question was unclear.

On my GoFlex, inside Debian, fw_setenv fails because of "Too few good blocks within range". Why would the result be any different when I execute the same command from the serial console?
Re: Boot Debian from SATA (GoFlex Net)
March 27, 2012 11:40PM
While booted in Linux it will be the same from ssh, telnet or serial console.

The difference is that you can interact with the bootloader (uboot) and change variables there without seeing that error. Knock on wood. I've never seen the problem from the uboot side. It might still show up here or there... It is also possible that a subpage problem is what is causing the chained original bootloader to hang.

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
April 01, 2012 07:58AM
Having succeeded in gaining access to NAND, I decided to switch to UBIT. This works well for USB, but booting SATA doesn't:
U-Boot 2010.09 (Feb 16 2011 - 18:42:02)
UBIT v0.6 by Jeff Doozan and Peter Carmichael

[cut out USB setup. -baafie]

Reset IDE: Bus 0: not available  Bus 1: OK 
  Device 1: Model: <�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<�<� Firm: <�<�<�<� Ser#: <�<�<�<�<�<�<�<�<�<�
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 495943.5 MB = 484.3 GB (1015692426 x 512)
IDE read: device 1 not ready
IDE read: device 1 not ready
** Bad partition 1 **
** Bad partition 1 **
No Powersaving mode 7F
Error (no IRQ) dev 0 blk 0: status 0x7f
** Can't read from device 0 **

** Unable to use ide 0:1 for fatload **
No Powersaving mode 7F
Error (no IRQ) dev 0 blk 0: status 0x7f
** Can't read from device 0 **

** Unable to use ide 0:1 for fatload **
** Bad partition 1 **
** Bad partition 1 **
IDE read: device 1 not ready
** Can't read from device 1 **

** Unable to use ide 1:1 for fatload **
IDE read: device 1 not ready
** Can't read from device 1 **

** Unable to use ide 1:1 for fatload **
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:ramdisk", error -19
Error reading superblock on volume 'ubi:ramdisk'!
UBIFS not mounted, use ubifs mount to mount volume first!
Marvell>> ide reset
ide reset

Reset IDE: Bus 0: not available  Bus 1: ............................................................** Timeout **

Any ideas?
Re: Boot Debian from SATA (GoFlex Net)
April 01, 2012 04:59PM
I have just booted into the SATA drive using a kernel image downloaded via tftp. I am concluding, then, that there is nothing wrong with any of the bits of hardware involved (SATA disk, mainboard/SATA port, ...). I believe that this is a uBoot issue.

I am thinking of trying a more recent uBoot (it is my understanding they can be tested, without permanent NAND writes, from e.g. a tftp source). Davygravy, do you happen to have cooked up just such a uBoot image that would be compatible with my GoFlex Net?
Re: Boot Debian from SATA (GoFlex Net)
April 02, 2012 04:55PM
There are two way of doing this. One is with a UART uboot. It requires wiki.scottn.us/goflex:uartboot. This will work on the GoFlex net.

The other is chainloading a regular uboot kwb file, tftp-ing it into memory, and the executing it. It is not reliable in many cases.

=====================================================
Re: Boot Debian from SATA (GoFlex Net)
April 17, 2012 03:06AM
Here is how I installed and booted Debian just yesterday on a SATA disk:
  1. Installed a recent uBoot (it says it is too old so I followed the instruction here: http://jeff.doozan.com/debian/uboot/) and a rescue system as described here: http://forum.doozan.com/read.php?4,3896
  2. Booted the rescue system and plugged in the SATA drive
  3. Partitioned the SATA drive (/dev/sda1 2GB ext2, system; /dev/sda2 512MB swap; /dev/sda3 XXXGB ext3, data)
  4. Created the filesystems
  5. Mounted /dev/sda1 under /mnt and changed into the directory
  6. Installed Debian as described here: http://jeff.doozan.com/debian/
  7. Set the uBoot environment to boot from SATA as described here: http://www.varkey.in/2011/06/boot-debian-from-sata-seagate-goflex-net/
I followed the complete instruction but I think the kernel is already SATA capable and you only need to set the environment like this:

fw_setenv sata_boot 'ide reset; mw 0x800000 0 1; ext2load ide 0:1 0x800000 /boot/uImage; if ext2load ide 0:1 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi'
fw_setenv sata_bootcmd 'run usb_set_bootargs; run sata_boot'
fw_setenv bootcmd 'usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run sata_bootcmd; run rescue_bootcmd; run pogo_bootcmd; reset'
Re: Boot Debian from SATA (GoFlex Net)
April 21, 2012 09:34PM
HellG, I've recently rolled a new kernel 3.3.2, though it requires the update to U-Boot. See Linux 3.3.2 kernel available.

=====================================================
deX
Re: Boot Debian from SATA (GoFlex Net)
May 27, 2012 11:00AM
Hey baaf, did you finally get this running?

I get the same message.

~# /usr/sbin/fw_setenv arcNumber 3089
Too few good blocks within range

The Flex drive doesn't get detected. I've the serial cable, but not sure if it will make any difference.
Re: Boot Debian from SATA (GoFlex Net)
May 27, 2012 11:52AM
Baafie pinpointed the problem for us... the delay for the mtd driver needed adjustment.

The newer kernel link to in my sig has his patch incorporated.

=====================================================
deX
Re: Boot Debian from SATA (GoFlex Net)
May 27, 2012 01:24PM
Thanks for replying, davygravy.

I'm not sure how to go about it though. I never got through creating the Rescue/Nand write thingy, coz i would get Bad erase block readings.

So basically I can only boot if I've the usb with the debian image attached.
The orange led keeps blinking without the usb.

Please correct me if I got this wrong.

1) Update the U-Boot given in your sig (uboot.goflexnet-IDEpatched-arcNumOK.kwb) using TFTP. I've tried this earlier with the older uBoot, so it shouldn't be a problem.
2) Reboot
3)Copy linux-image-3.3.2-kirkwood-dg_1.1_armel.deb to the root of the usb.
4)Install it
dpkg -i linux-image-3.3.2-kirkwood-dg_1.1_armel.deb
5)Then..
cd /boot
mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 -n Linux-3.3.2 -d vmlinuz-3.3.2-kirkwood-dg uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.3.2-kirkwood-dg -d initrd.img-3.3.2-kirkwood-dg uInitrd
6) Reboot..

Any help will be much appreciated...
Re: Boot Debian from SATA (GoFlex Net)
May 27, 2012 01:48PM
Yes, to me, it looks right.

The only thing is that I'd do one more bit after flashing uboot, before rebooting... double check that your Netconsole settings are still in effect. (sometimes I do this by issuing printenv while in uboot and confirming that they are all still just like you want them to be, then saveenv. It has been suggested to me that it is possible that updating uboot might whack the env settings in NAND, and if so, saving them before rebooting/reseting might help.

(or perhaps you are using serial?)

ahha... don't forget to set your arcNumber

=====================================================
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: