New IT forum Follow us on Twitter
22 May 2012, 10:43:42 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Booting from USB device on a GuruPlug  (Read 4833 times)
Huaaah
Newbie
*
Posts: 17


« on: 12 March 2010, 10:57:47 am »

Hi.

I have just preordered a standard GuruPlug and will be waiting in anticipation :-)

One thing though, which I need answer to is the following:

I can understand that it is possible to boot from a SD-Card (if I had bought the advanced version), but is it also possible to make the standard GuruPlug boot from an USB-device (ext disk or fast Usb-Key)?

The reason I ask is that I would like to have Samba, Squeezecenter and probably more running on the device and I am not sure if there is enough room on the device itself?
Logged
alfon
Newbie
*
Posts: 28


« Reply #1 on: 12 March 2010, 01:40:05 pm »

Dear Huaaah,

a) About using a USB key as boot device: I don't know if it is possible, but I would guess it is, if you are willing to experiment a little. However, you may find it equally easy (probably easier, since there are detailed instructions), to use an SD card instead of a USB key (you don't have to buy a preconfigured plug+bootable USB card, just use the installer to prepare the plug+SD card combo). The instructions for the installer are somewhat flimsy, but on the other hand you have the excellent support of NewIT + the community.

b) I understand that booting off a USB hard disk is not feasible, due to some timing issues. Perhaps your best shot is to boot off an SD but have your filesystem in the hard disk.

c) If you use a USB hard disk, make sure to use one with its own power supply. There have been several reports of plug power supplies dying after a while, and in virtually all cases the plug was also powering a USB hard disk.

Best regards,
Alf
Logged
Huaaah
Newbie
*
Posts: 17


« Reply #2 on: 12 March 2010, 02:35:34 pm »

Hi Alf.

Reg 1) I would love to use a SD card but the Guru Standard does not have a card-reader implemented, that is why I was wondering what else there was for me to do.

Reg 2) Yes my plan is to use the USB disk for all of my backups, music and so forth, I don't know if it would be possible for me to make an install of ex Squeezecenter on the USB-disk, and leave the standard Debian os alone without installing anything on it?!

Reg 3) I will definitely use a HD with external power supply!
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 12 March 2010, 05:38:48 pm »

Reg 2) Yes my plan is to use the USB disk for all of my backups, music and so forth, I don't know if it would be possible for me to make an install of ex Squeezecenter on the USB-disk, and leave the standard Debian os alone without installing anything on it?!

Our Squeezebox Server rootfs (with webmin and samba) is around 400M. Some of that can no doubt be trimmed, but I wouldn't recommend putting this onto NAND, let alone adding more software on top. That's not to say it isn't doable, but I think it will lead to trouble eventually.

You could certainly mount some elements externally; that would help.
Logged
Huaaah
Newbie
*
Posts: 17


« Reply #4 on: 12 March 2010, 06:24:44 pm »

Hmm, well I can see that I would be better of trying to see if I can squeeze 20£ more out of the wife at go for the  advanced version. That way I guess it would be more like "best practice" to get a 8 gb MicroSD card and put another OS on that.

I will contact the sales people and see how this can be done easily.

Thanks for the help so far  Smiley
Logged
alfon
Newbie
*
Posts: 28


« Reply #5 on: 13 March 2010, 12:53:09 am »

Dear Huaaah,

A couple of clarifications:
First of all, I believe that nobody outside Globalscale has seen a production Guruplug, so everything I write in reply to your questions (and probably everything others write) is, at best, an educated guess based on experience from Sheevaplugs (either personal experience, or the experience of others shared through the forums). This may make you feel a little uneasy, but it is something that goes with the territory of picking a bleeding-edge product. On the other hand, The Guruplug is an evolutionary step from the Sheevaplug(s), so you shouldn't worry too much. I am sure you will not regret your choice, and would definitely go for a Guruplug myself if I was buying now.

- The plug's boot process is as follows: bootloader (u-boot) -> kernel -> rootfs

- U-boot always resides in the on-board NAND memory. So do its environment variables.

- Booting off a USB Hard disk (i.e. placing the kernel on the hard disk) is something that, if I understand correctly, noone has managed to do RELIABLY up to now. The reason is that when the bootloader (u-boot) tries to access the hard disk in order to read the kernel, the disk starts spinning - but by the time it is up to speed and can deliver data, the bootloader has given up.

- Booting off a USB stick, on the other hand, should be feasible I BELIEVE (as opposed to "I know"). So if you end up buying the standard guruplug, you should definitely give it a try. On the other hand, if at all possible I would advise you get the Guruplug plus instead. Assuming that the micro-SD port is compatible with the SDHC port in the Sheevaplugs, you will be taking advantage of a large body of established experience. The e-Sata port may also come in handy (I understand that e-Sata external hard disks are significantly faster than USB ones - but then you may have compatibility problems with e-Sata).

- Then again, the kernel can be loaded from the internal NAND memory - it isn't something that changes every day.

- As for the rootFS, it can be loaded from internal NAND memory (a bad choice, both for reasons of wear and volume). It can - I BELIEVE (but I haven't done it yet, so I can't be sure - ask someone who knows more if you plan to rely on this) - be loaded from the external hard disk (either USB or e-Sata - I understand that the kernel, contrary to u-boot, knows about spin-up delays and handles them transparently) - which may be the optimal solution if you plan to have the HD always connected. Or it may be loaded from an external flash device (micro-SD or USB memory stick).

So you see that you have many different choices. Which way you do it is up to you.

Best regards,
Alf
Logged
Huaaah
Newbie
*
Posts: 17


« Reply #6 on: 13 March 2010, 06:21:15 am »


A couple of clarifications:
First of all, I believe that nobody outside Globalscale has seen a production Guruplug, so everything I write in reply to your questions (and probably everything others write) is, at best, an educated guess based on experience from Sheevaplugs (either personal experience, or the experience of others shared through the forums).

Hi well that is all ok by me, but it also make me want to go for the best documented sollution - I would actually like to get this working Smiley


Quote
- The plug's boot process is as follows: bootloader (u-boot) -> kernel -> rootfs

Ah, sorry maybe I should have read a bit ore on the documentation before posting here. Well that means that U-boot act a bit like a traditionall Bios i standard PC's, regarding the boot process, That clarifies it a bit for me.


Quote
- As for the rootFS, it can be loaded from internal NAND memory (a bad choice, both for reasons of wear and volume). It can - I BELIEVE (but I haven't done it yet, so I can't be sure - ask someone who knows more if you plan to rely on this) - be loaded from the external hard disk (either USB or e-Sata - I understand that the kernel, contrary to u-boot, knows about spin-up delays and handles them transparently) - which may be the optimal solution if you plan to have the HD always connected. Or it may be loaded from an external flash device (micro-SD or USB memory stick).

Hmm well that sounds interesting. In that way it should actually be possible to keep the Kernel on the NAND, and somehow point it to the rootFS, which resides somewhere else.
I do think I will go for the "Best practice"/best documented sollution, I guess that it must be the one in which I put Kernel and RootFS on an SD-card?! If I put the kernel and the RootFS on some SD-card, how do one configure the u-boot to look for the kernel on this specifik "disk", does the u-boot have some sort of conf-file, like a standard bios have the traditional interfaces?
Where would you suggest that I read more about this, as you can here, I am quite a Newbie to this  Cry

Anyway, I think I will go for the "Plus" version.

Thanks a lot Alf
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #7 on: 13 March 2010, 10:14:06 am »

I do think I will go for the "Best practice"/best documented sollution, I guess that it must be the one in which I put Kernel and RootFS on an SD-card?! If I put the kernel and the RootFS on some SD-card, how do one configure the u-boot to look for the kernel on this specifik "disk", does the u-boot have some sort of conf-file, like a standard bios have the traditional interfaces?

The U-Boot environment variables control the way the device boots. See here, for instance. The parts most relevant to your question is:

Code:
bootargs_console=console=ttyS0,115200
bootargs_root=root=/dev/mmcblk0p2 rootdelay=5
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)

bootargs_console=console=ttyS0,115200 creates a serial device that one can connect to via the USB miniport
bootargs_root=root=/dev/mmcblk0p2 rootdelay=5 defines the location of the rootfs (in this case the second partition on the SD card)

bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
is a good deal more complicated. The first part (up to and including ext2load mmc 0:1 0x800000 /uImage) prepares environment variables for SD card booting, then attempts to boot from SD card. The second part (starting with bootm 0x00800000) allows the plug to boot from NAND if the SD card boot fails. I think I have identified the right cut-off point between these two segments.

Don't worry about the details of the settings, Whichever way you want to use your plug, there will be others that want to do the same and will share information as to how to make that happen.
Logged
alfon
Newbie
*
Posts: 28


« Reply #8 on: 13 March 2010, 02:19:56 pm »

Dear Huaaah,


Hi well that is all ok by me, but it also make me want to go for the best documented solution - I would actually like to get this working Smiley

Don't worry about that. You will get it working, whichever way you decide to go. The only difference is that if you choose an uncommon solution, you may have to spend some more time figuring out how all the pieces fit together. But then, this time will be well spent. If you choose a more mainstream solution, things will probably magically work without much intervention from you.

I do think I will go for the "Best practice"/best documented sollution, I guess that it must be the one in which I put Kernel and RootFS on an SD-card?! If I put the kernel and the RootFS on some SD-card, how do one configure the u-boot to look for the kernel on this specific "disk", does the u-boot have some sort of conf-file, like a standard bios have the traditional interfaces?

If you put the kernel and rootfs on the micro-SD card (and provided the Guruplug MicroSD slot is compatible with the Sheevaplug SDHC slot), the installer will practically do everything for you.

Where would you suggest that I read more about this, as you can here, I am quite a Newbie to this  Cry

I am a newbie myself, I just started a month or so before you.

I would say the best starting point is: http://www.newit.co.uk/forum/index.php/topic,44.0.html, and the links provided there.

Regarding the u-boot configuration, you should have a look at the first posts in the booting board (http://www.newit.co.uk/forum/index.php/board,9.0.html).

In short, u-boot has a set of environment variables, not unlike those of windows or linux. Those environment variables determine its behaviour. When the plug starts (either after power-up, or after reset), u-boot gives you the chance to abort the booting process (by pressing a key) and exit to the u-boot prompt. From there you can, among other things, examine and set its environment variables.

The second way of setting the u-boot environment is through the installer. The installer is a tool that can be used, among other things, to restore a plug whose contents have been totally messed up. In short this means that it is practically impossible to destroy a plug by software - even if you manage to erase everything, including u-boot, the installer can restore it.

Keep in mind that the instructions in the forum posts may, sometimes, look somewhat intimidating. When you have the plug in hand, things are much easier.

best regards,
Alf
Logged
Huaaah
Newbie
*
Posts: 17


« Reply #9 on: 14 March 2010, 08:36:50 pm »


Hi again.

Thanks to Marcus and Alf for helping me getting to understand how the Plugs actually works.

I have now ordered the Gurulug plus, and will try and take it from there. As Alf says, I guess it will be easier for me to get the full picture when I have the plug in my hand.

Best regards, and thanks again.
Logged
peter a
Full Member
***
Posts: 162


« Reply #10 on: 14 March 2010, 09:22:31 pm »

Hi , I got my plug a couple of months ago and don`t know what I would do without it , so just ordered the Guruplug server.
I just started off slowly and tried not to change the internal memory install so I could use that for recovery.
I started by making a SD card install using :-http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html
Learnt how to add a usb hard drive, but not boot from it.
Then moved from the SD card boot to booting off the hard drive, after because I have the Esata version I wanted to add a sata, but not boot off it, That changed to wanting to boot off it , which means adding support in the kernel .
The only way to play with the plug is with it in your hand , just do little steps , and just keep adding.

And a final point install webmin which is a life saver for a newbee
« Last Edit: 14 March 2010, 09:32:10 pm by peter a » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!