How to run Bananian from HDD

15 6704
I'm have a complete image of Bananian on a SanDisk Extreme Pro 8GB SD card. It boots fine so I wrote the same Bananian image to my HDD then changed the uEnv.txt file:

bootargs=console=ttyS0,115200 console=tty0 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1680x1050p60 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait
aload_script=fatload mmc 0 0x43000000 script.bin;
aload_kernel=fatload mmc 0 0x48000000 uImage; bootm 0x48000000;
uenvcmd=run aload_script aload_kernel

I also change the screen resolution to 1680x1050p60. This works fine though.

I let it boot up fully then shut it down and plugged the HDD into my laptop to expand the partition to use the full space on the HDD. Then I connected it back up to the Banana Pi and it booted up fine. I logged in and checked the space with df -h and comfirmed I had about 600GB of space.

So that all works. Now I want to use a small crappy SD card for the Banana since it doesn't need to hold the OS. I tried copying the 20MB FAT16 partition from my functional 8GB SD card to a small useless 32MB SD card I have. But when I tried to boot up with this small SD card it wont boot. I repeated those steps on a 1GB, and a 2GB SD card thinking it might have been the card, but no luck with any of them.

What does the Banana Pi need as a minimum to boot on the SD card if the root file system is on the HDD? Is the FAT16 partition in the Bananian image not enough? Does it require something from the ext4 parition because I could make a small ext4 parition with what it needs but I don't know what it's missing. Just before you ask, I definatly checked the uEnv.txt on the little 32MB SD card and it said root=/dev/sda2.
Did you toggle the partion as bootable with (g)parted? If not try that.

Edited by Kiwi__Power at Fri Dec 12, 2014 22:45
hvdwolf replied at Fri Dec 12, 2014 16:13
Did you toggle the partion as bootable with (g)parted? If not try that.

Good idea. Didn't work though. I flagged as boot and that didn't work, I labelled it boot as well and that didn't work either

I just had another look at the working 8GB Sandisk Extreme on GParted and it has no labels or flags and it works for some reason. The only difference between the to is the little 32MB card (and same with the 1GB and 2GB SD cards I tried) is I have left out the ext4 root file system because that is not needed it's on the external drive. So I don't know why it's fussed about it not being on the flash drive as well?

If I didn't want to put that SD card back in my camera where it belongs I'd leave it in there. But it's a huge waste when only 20MB of it is actually being used on a 8GB 45MB/s SD card. The only reason it's there in the first place is all my other cards are 1, 2 and 16GB and a 2GB SD card cannot fit a 2GB image -_-

Edited by mattrix at Fri Dec 12, 2014 23:39

Did some tests.

Will have a little tiny image you can burn shortly which will just have boot partion
Might come in handy for some others as well.

Give me 30mins

Edited by Kiwi__Power at Fri Dec 12, 2014 23:43
mattrix replied at Fri Dec 12, 2014 22:47
So, you have tried just using dd in linux to copy the good sd card and then write this to the other  ...

I used GParted to copy the FAT16 partition to the smaller SD card. Ok not exactly. I only have 1 SD card port on my laptop (using Mint 17.1). So I copied the FAT16 parition from the big 8GB to a USB flash drive. Then took out the 8GB and plugged in the 32MB (and others later) and copied the FAT16 partition from the USB flash drive to the SD card.

That wouldn't cause any problems though right? A copy of a copy is still a copy, I hope

I'll give dd a go, I've never used that before.

Try this:!TQJRVYjT!M1 ... H3HNOiTLYF3cYRuXnuc
(Burn using Win32 Disc Imager)

It is about 25MB in size so should fit on nearly any SD card.

It's setup to boot /dev/sda1 so you will need to change this after burning (just via windows).

When I run, it juts sites on "waiting for /dev/sda1" but that's because I haven't got the root setup yet.

Edited by mattrix at Sat Dec 13, 2014 00:34

Going to make another image just of the rootfs, so we may be able to easily just copy / burn this to a device (harddrive, pendrive) etc

Just tested - all working

I wrote the normal Bananian image straight to a USB drive using Win32 Disc Imager.
This was a bit slow writing for some reason (about 4MB/s)

Anyway, changed the boot device to /dev/sda2 on the small image I created and it booted up fine.

Obviously it's sda2 as sda1 on the USB drive will be the boot partion (that's not used).

I was thinking of creating an image with only the root partion, but this seems not required as just burning the normal image works fine.
Not really a big deal that there's 25MB wasted on that partion that isn't used.

Worst case, I could delete it with gparted and then change it to sda1.

I wonder if we could get the SD card boot partion just to point to the USB boot partion...

This way, only the USB stick needs to be updated, and the small SD card would never need to be touched.

Well I'm one green LED closer to getting it booted! Your image gets the green light but even with it set to sda2 it doesn't boot -_- There must be other settings in there that are not the same. So I'll use the partition that your image created because it got the green light but I'll select all and overwrite the files with files from the 8GB SD card and hopefully that HDD will start seeking around the disk and it'll live!

I knew it wouldn't be that easy -_- files are all identical yet.. it won't boot. What else could go wrong?

Do you see anything on the screen?

You have to log in before you can reply Login | Sign Up

Points Rules