ElectroPulse
Posts: 54
Joined: Fri Jan 27, 2012 3:54 am

Re: How Does It Boot?

Fri Jan 27, 2012 4:20 am

Hello, all!

I recently ran across this epic-looking product and am hoping to get my hands on one as soon as they are released (if I make it before they are sold out ) Anyway, I have been interested in Linux for quite some time, but haven"t done a huge amount with it (other than messing around with various distributions trying to get minecraft working faster on my old laptop, as well as making a simple web kiosk distro at work), and I"ve been getting really excited about all the potential things that can be done with this!

Anyway, now to my question: How does it boot? My understanding of computers is that they generally have a BIOS that chooses which storage device to boot from, then the bootloader kicks in and starts the OS. Now, from what I have read it appears that there is no onboard storage... Does it automatically boot from the SD card, or is there indeed some onboard storage? Also, am I correct in assuming that I can have several SD cards and use it for different purposes? (For example, put in one SD card and use it as an HTPC when we want to watch something, then plug in another SD card if I want to play some sidescrollers or something, then plug in another SD card if I want to experiment... And not affect the other uses? This would be ahuge plus to not having onboard storage if it were true...)

Also, on an unrelated note, am I correct in the assumption that SDHC cards will work with this just fine? (not sure why they wouldn"t...). Also, this won"t have powered USB will it? For external HDs, mainly.

Thanks!

Spartan.II.117
Posts: 8
Joined: Wed Nov 30, 2011 7:59 am

Re: How Does It Boot?

Fri Jan 27, 2012 4:37 am

The Raspberry pi does boot directly to the SD Card, it loads the first fat32 partition, and loads a file called kernel.img into memory then starts executing it from it's base address. as to powered USB, the board is capable of supplying 500 milliamps on one port, (but not on each port as the total input supply is 1 Amp) this assumes that you have a large enough input current, otherwise you will need a powered hub.

ElectroPulse
Posts: 54
Joined: Fri Jan 27, 2012 3:54 am

Re: How Does It Boot?

Fri Jan 27, 2012 9:01 pm

Alright, thank you for the response!

So, approximately how much power is required to run an external hard drive? I realize that there is probably no one answer, but a range would be nice. I have a 500gb A-Data external HD, and am wondering if I could run that off of it.

Thanks!

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: How Does It Boot?

Fri Jan 27, 2012 9:23 pm

The USB HDD I have has a 5V power supply as well as a USB connection.  It's always needed the 5v power supply but that can be provided from a second USB connection.

I guess that means the HDD needs about 1A so can't be powered directly from the Pi but can run if it's got it's own PSU.

Chris

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: How Does It Boot?

Fri Jan 27, 2012 9:32 pm

The R-Pi should work fine with SDHC cards, although some are better quality than others and thus better value.  SDXC cards are so far an unknown quantity, so don't bother with those yet.  Using different SD cards for different purposes will be fine.

Attaching a USB HD should be easy enough as well - the requirements will generally be the same as for attaching one to a PC.  However the R-Pi won't boot without the SD card present, since the kernel is loaded from there.  The kernel could however boot from whatever storage is available, including a USB HD.
The key to knowledge is not to rely on people to teach you it.

ElectroPulse
Posts: 54
Joined: Fri Jan 27, 2012 3:54 am

Re: How Does It Boot?

Fri Jan 27, 2012 10:19 pm

Alright, ty for the replies!



Chris Rowland said:


The USB HDD I have has a 5V power supply as well as a USB connection.  It's always needed the 5v power supply but that can be provided from a second USB connection.

I guess that means the HDD needs about 1A so can't be powered directly from the Pi but can run if it's got it's own PSU.

Chris


Hmm... just curious, how are you getting the 1A requirement just from 5v? The RPi is 5v, but it is only 700ma (for the B version).

@Chromatix: When you say that attaching a USB HD should be easy, are you meaning making the RPi use it will be easy? What is the actual electric current pulled by an external HD? I haven't seen any numbers for that...

Chris.Rowland
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm

Re: How Does It Boot?

Fri Jan 27, 2012 10:55 pm

I'm plugging the USB HDD into a laptop.  It doesn't work unless I have the power supply plugged into a second USB port.

AFAIK the USB standard specifies a maximum of 500 mA so that's where I'm getting the 1A from - 2 * 500 mA. I'm running a 20G HDD so how that compares with your 0.5T disk I've no idea.

From what we hear the Pi can supply 700 mA max so I guess that something will need to provide the additional power.  I'd connect the USB HDD to a hub and verify that it works with something else, then connect the hub to a Pi.

But this is all speculation for now.

Chris

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How Does It Boot?

Fri Jan 27, 2012 11:19 pm

A question from left field - but since we are talking about booting...

And, yes, I'm pretty sure the answer at this point is "No", but I'm asking, really, if it would be feasible to shoot for it in some future version of the board.  The question is "How about network (PXE) booting?"  Wouldn't that be cool?

I've used PXE boot in some other arrangements, and find it quite handy.

12+10
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: How Does It Boot?

Fri Jan 27, 2012 11:25 pm

PXE, no.  AFAIK this is x86 specific.

NFS, yes if you really want to.  The kernel still has to be installed locally though, so you might not really gain much.

Better IMO to just keep a stock of SD cards ready for exchange when necessary.  This also means that if the network fails the computers themselves keep running.
The key to knowledge is not to rely on people to teach you it.

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5212
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: How Does It Boot?

Fri Jan 27, 2012 11:35 pm

Eben says you could stick a root partition on an NFS drive, but you'd still need to have your kernel locally. Instead, you could replace your local kernel on the SD card with a bootloader which is network aware, and then load your kernel over the network.
Director of Communications, Raspberry Pi

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How Does It Boot?

Fri Jan 27, 2012 11:39 pm

>PXE, no. AFAIK this is x86 specific.

OK - yeah, I think you're right about that.  However, ...

>NFS, yes if you really want to. The kernel still has to be installed locally though, so you might not really gain much.

I am familiar with another ARM-based Linux box device that can do all network booting, no locally installed kernel.  It has a "Boot ROM" on the machine (which is more or less the equivalent of the "Boot ROM" found on Sun machines [if that means anything to you...]).   But, as I said, no local kernel.  So, it can be done.

None of this should be taken as any sort of "whine" that it *should* be thus on the Rpi, of course.

>Better IMO to just keep a stock of SD cards ready for exchange when necessary. This also means that if the network fails the computers themselves keep running.

Don't assume I have any agenda here.  I'm just saying it would be "cool".  That's all...
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: How Does It Boot?

Sat Jan 28, 2012 12:04 am

There's no boot rom on the Pi... actually, you can assume there's no ROM at all, and think of the FAT partition on the SD as the ROM... a ROM you can read, write, modify...  On that partition are the Pi's firmware (mandatory binary blob, free as in beer not speech), and... something else, typically a Linux kernel pointing to the SD's second partition for its rootfs, but that second bit of code can be other things, such as:

- a Linux kernel looking for its rootfs not on the SD but over the network, on a USB HD/Flash stick, ... , as long as the kernel includes the necessary drivers (USB, network...) to reach the rootfs

- a Linux Kernel chain-loading another Linux Kernel from somewhere else (same restrictions, that second kernel must be reachable)

- an ARM bootloader (different beast than the x86 ones, same funcionnality)

- any OS really, though only Linuxes will have drivers for the accelerated graphics.

User avatar
cheery
Posts: 219
Joined: Wed Jan 25, 2012 9:39 pm

Re: How Does It Boot?

Sat Jan 28, 2012 1:13 pm

I hope you will make something to that binary blob as it is not sustainable in the long run if only unmodified linux can use it.

Dancsa
Posts: 1
Joined: Sat Jan 28, 2012 5:10 pm

Re: How Does It Boot?

Sat Jan 28, 2012 5:27 pm

Hi!

I looking forward to get a R-pi... I could use it for many things (SSH tunel, WOL-client, using with electronics (LED cube,) etc.)  I don't want to use graphical OS on it, CLI is enough for me (In my room, i have no TV, and my monitor doesn't have HDMI).

I thought i would install my own linux to it. Maybe i just get compile the kernel, the basic utils, and an SSH, and let's rock  or Is it posibble, to get an Ubuntu server edition and replace the kernel with the one compiled for arm?

Second: I didn't really undertand the boot process. i put the kernel to the fat partition as kernel.img okay... but how i pass it, where is the "/" filesystem  On my laptop, the GRUB passes it to the kernel. (or is it possible, to put the grub2 on the fat, to load the kernel, from the 2nd partition?)  I'm using linux for some years, and read some howto-s, but i haven't done something like this yet .

0rphu
Posts: 38
Joined: Sun Oct 23, 2011 1:45 pm

Re: How Does It Boot?

Sat Jan 28, 2012 5:56 pm

I think you have the possibility (or necessity?) to define the root device when you are configuring the kernel for ARM. Otherwise you could exchange the actual kernel on the SD card with a suitable bootloader and take it from there. That's what I understood from some of the threads here anyway.

hyena
Posts: 44
Joined: Mon Nov 14, 2011 7:55 pm

Re: How Does It Boot?

Sat Jan 28, 2012 8:13 pm

Is that right that the max input current is "limited" <1A ? (or is that just the PSU that the rpi ppl want to provide ?)  so thats <5W for the device and all its attachments (usb sticks, drives, daughterboards etc) ... seems very low ... last thing ppl will want is to use powered bubs or external powered drives with power bricks all over the place

digital_addict
Posts: 66
Joined: Fri Sep 16, 2011 10:40 pm

Re: How Does It Boot?

Sun Jan 29, 2012 12:22 am

hyena said:


Is that right that the max input current is "limited" <1A ? (or is that just the PSU that the rpi ppl want to provide ?)   ... last thing ppl will want is to use powered bubs or external powered drives with power bricks all over the place


Limited to 1 amp YES, it's fused to stop it from pulling anymore.

The R-Pi does not have any attachments,

It does have either 1 or 2 usb outputs limited by the usb standard to 500ma each. On a Type “B” you will not be able to draw full current on both ports.

Enter the usb hub, this could power the R-Pi type “B” using 2 ports. The psu for the hub does not need to be more than 500ma x No of ports. That's one brick in the wall.

If you think you need more power I'd suggest an old pc power supply, cut off the molex plugs, gives you masses of amps and a large electricity bill.




Return to “General discussion”