Cubieboard 2: How to have root on SATA

This forum is for supported devices using an ARMv7 Allwinner SoC.

Cubieboard 2: How to have root on SATA

Postby krovetz » Tue Aug 06, 2013 8:32 pm

Installing onto my new Cubieboard 2 was easy. Thanks!

I would like to have my root on an external SATA drive and a fixed mac address. Is it as easy on Cubie 2 as on Cubie 1? On my Cubie 1, I added

extraargs=root=/dev/sda1 rootwait mac_addr=CA:30:5C:2A:FA:29

to uEnv.txt all was well.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Cubieboard 2: How to have root on SATA

Postby WarheadsSE » Tue Aug 06, 2013 8:46 pm

Yup. Exactly the same.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubieboard 2: How to have root on SATA

Postby krovetz » Tue Aug 06, 2013 9:06 pm

The stock uEnv.txt has

$this->bbcode_second_pass_code('', '
machid=0xf35
')

And, that allows me to boot and ssh into the Cubie 2, albeit with a random mac address and root on the sd card. To do a simple test of uEnv setup, I changed this to

$this->bbcode_second_pass_code('', '
machid=0xf35
extraargs=mac_addr=CA:30:5C:2A:FA:29
')

Afterward, it appears the Cubie 2 does not request to dhcp and I cannot ssh into it.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Cubieboard 2: How to have root on SATA

Postby WarheadsSE » Wed Aug 07, 2013 1:42 am

Got serial?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cubieboard 2: How to have root on SATA

Postby krovetz » Tue Aug 13, 2013 10:47 pm

I put the following in /boot/uEnv.txt on my SD card
$this->bbcode_second_pass_code('', '
machid=0xf35
root=/dev/sda1
extraargs=rootfstype=ext4 rootwait mac_addr=DE:82:0E:E3:FE:3E
')
And all works well.
krovetz
 
Posts: 78
Joined: Tue Jun 26, 2012 11:03 pm

Re: Cubieboard 2: How to have root on SATA

Postby eduardoarnoldh » Fri Aug 16, 2013 7:16 pm

Hi. FIrst, I'd like to thank you for the information you provided, after long hours of search I couldn't find any full description of how should mac_addr be added into uEnv.txt.

Secondly, I'd like to describe my first problem: I've tried all possibilities with uEnv.txt but nothing changed. It turned out that uBoot wasn't reading my uEnv.txt. To correct that you can restore the default environment of uBoot. To perform this enter the uBoot console (you must connect via serial) and do:

$this->bbcode_second_pass_code('', '
env default -f -a
saveenv
reset
')

After this, my uEnv file was being read, but still, my MAC address was randomic. I've tried some options: 77:00:77:00:77:00, 69:75:24:DE:76:F6 and other ones, but nothing seemed to work. Then I decided to try the one that krovetz used, and it worked. I'd like to know why only that one worked, it's really awkward. I wondered if there was such a thing as a MAC address validator, but there isn't, as long that you have 12 hexadecimal values it's ok. Could someone explain the reason why this is happening? I'd like an easier to remember MAC Address.
Last edited by eduardoarnoldh on Fri Aug 16, 2013 10:31 pm, edited 1 time in total.
eduardoarnoldh
 
Posts: 7
Joined: Fri Aug 16, 2013 7:03 pm

Re: Cubieboard 2: How to have root on SATA

Postby WebReflection » Fri Aug 16, 2013 9:51 pm

out of curiosity, are you booting from NAND? 'cause that might solve my problems too, no uEnv.txt is read at all, not possible to add modules or even use EDID via NAND.

Thanks and sorry if I didn't really answer your question ... at least I can suggest a link for MAC Address:
http://www.miniwebtool.com/mac-address-generator/

not sure that helps though.

Cheers
WebReflection
 
Posts: 104
Joined: Tue Apr 02, 2013 6:49 pm

Re: Cubieboard 2: How to have root on SATA

Postby eduardoarnoldh » Fri Aug 16, 2013 11:48 pm

No, I'm booting from a SD card. During boot do you see any errors about uEnv not being loaded? You should try to restore the default uBoot environment anyway.

Thanks for the link, but I've already tried this service. Some of them work, others don't. And I'd love to understand why.
eduardoarnoldh
 
Posts: 7
Joined: Fri Aug 16, 2013 7:03 pm

Re: Cubieboard 2: How to have root on SATA

Postby eduardoarnoldh » Sat Aug 17, 2013 12:56 am

I think I've found a solution, when trying to set the IP manually on console, I've discovered that some of the MAC's addresses were invalid for linux. I guess they aren't registred with a vendor or don't obey some other kind of rule. Also, I've discovered that you can make the first byte 00 and use any sequence you want after that.
eduardoarnoldh
 
Posts: 7
Joined: Fri Aug 16, 2013 7:03 pm


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 12 guests