Friday, October 23, 2015

Installing Linux .img files on the Orange Pi PC

http://www.orangepi.org/photo/footer/footer.png
I had to dig around for this information and I did a little trial and error to figure it out but I got a working version of Linux on the $15 Orange Pi - PC.

The first place you need to look is:   Orange Pi Forums - Thread on Installing .img files

Orange Pi PCThis thread will answer 90% of your questions because forum moderator Loboris knows his stuff.

He has good instructions but I am not the most proficient Linux user in the world, so I needed a little extra help. I hope this helps someone else like me that is not proficient at the command line.

I am going to assume you have a  Linux computer with a GUI like Gnome or KDE, LXDE, Etc.

Step 1.
Create a folder on your PC where you can store some files that you will download. I just put my folder on the desktop. I created a folder called opi

Step 2.
Download any of the available distro images (xz archive) from the Mega or GoogleDrive sites Loboris has listed.

You have lots of options: Debian, Arch, OpenSuse, Ubuntu, Fedora, Etc. I downloaded OrangePI_Lubuntu_Vivid.img.xz

Step 3.
Download scriptbin_kernel.tar.gz, it contains the latest Linux kernel (uImage) and script.bin.

Step 4.
Navigate to the folder you created and unpack, unzip, uncompressed, extract or whatever you want to call it BOTH files you just downloaded. Most modern versions of Linux let you right click on a file and extract it. I used the Engrandpa archive manger that come with the Mate desktop but yours may be called Ark, File Roller, Etc.

Step 5.
Open a terminal program like Xterm so we can get to the command line. The first command we need to run is df -h to see what devices are currently mounted.

Step 6.
If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer

Step 7.
Run df -h again. The new device that has appeared is your SD card. The left column gives the device name of your SD card; it will be listed as something like /dev/mmcblk0p1 or /dev/sdd1. The last part (p1 or 1 respectively) is the partition number but you want to write to the whole SD card, not just one partition. Therefore you need to remove that part from the name (getting, for example, /dev/mmcblk0 or /dev/sdd) as the device for the whole SD card. This will be important in step 10.

Step 8.
Now that you've noted what the device name is, you need to unmount the SD card so that files can't be read or written to the SD card while you are copying over the SD image. Run umount /dev/sdd1, replacing sdd1 with whatever your SD card's device name is (including the partition number).

Step 9. - The hard part
In the terminal, write the image to the SD card with the command below, making sure you replace the input file if= argument with the path to your .img file, and the /dev/sdd in the output file of= argument with the right device name. This is very important, as you will lose all data on the hard drive if you provide the wrong device name. Make sure the device name is the name of the whole SD card as described above, not just a partition of it; for example sdd, not sdds1 or sddp1; or mmcblk0, not mmcblk0p1. 

Now for the command:  
sudo dd if=OrangePI_Lubuntu_Vivid.img of=/dev/sdd bs=1M oflag=direct

I ended up using this based on where my files were located and the name of my SD card:

sudo dd if=/home/john/Desktop/opi/OrangePI_Lubuntu_Vivid.img of=/dev/mmcblk0 bs=1M oflag=direct

Go get a cup of tea / coffee and a snack. This could take several minutes.

Step 10. - downhill from here
Run command  sync in the terminal, this will ensure the write cache is flushed and that it is safe to unmount your SD card. You can close the terminal program now.

Step 11.
I used a graphical file manger for the rest of the steps. Open up your graphical file manager and then physically remove the SD card from the computer and then reinstall it in the SD slot. You should see the SD card appear in the graphical file manager. Right click it and mount the SD card. You should see two items now. One partition called BOOT and the other partition called Linux. If you do not see this you may want to remove the SD card and try again.

Step 12.
In the graphical file manger double click on the BOOT partition. When you do, you should see a bunch of files. We are only interested in two files: script.bin and ulmage. Rename both files. I renamed them script.bin.default and ulmage.default

Step 13.
Remember that folder you created on your computer at the beginning of this little project and downloaded the two files to which you extracted? Navigate to that folder.

Step 14. 
Find the file uImage_OPI-2 or uImage_OPI-PLUS (depending on the type of Orange Pi you have ) and rename it to uImage (The Orange Pi-PC use uImage_OPI-2)

Step 15. 
Determine the resolution and refresh rate of the monitor you will connect your Orange Pi to. You may also want to figure out how you will supply the video feed to the monitor. I am using a TV with a resolution of 1080p with a 60Hz refresh rate. I also wanted to use the HDMI cable.

Step 16. 
In the folder you created on your PC, find a script.bin.OPI-XXXX file that best matches your version of Orange Pi and monitor setup. For my Orange Pi PC and the TV I was going to use as a monitor, the best file was script.bin.OPI-PC_1080p60_hdmi. After you find the best file rename it to script.bin

Step 17. 
Copy the the two files you just renamed to ulmage and script.bin and paste them into the BOOT partition. Unmount and safely remove the SD card from your computer.

Step 18. Install the SD Card into the Orange Pi and boot into your new system! The username and password are: orangepi

Step 19.
Resize the Orange Pi partition to fit your SD Card size by using the following command in a terminal: sudo fs_resize After running this command you will be prompted to reboot.

Step 20.
After rebooting it is a good idea to update all system package with the package manger

Step 21.
Have Fun!


http://www.orangepi.org/photo/footer/footer.png

32 comments:

Unknown said...

i want to thank you for the guide, definitely appreciated!!!

Thumos said...

My pleasure, I hope it helped David.

Unknown said...

Is script.bin.OPI-PLUS_1080p60_hdmi correct in step 16, or should it be script.bin.OPI-PC_1080p60_hdmi?

Thumos said...

Justin, if you are using an Orange Pi Plus then use script.bin.OPI-PLUS_1080p60_hdmi. If you are using the orange pi pc then use script.bin.OPI-PC_1080p60_hdmi. Thanks for pointing this out. I will update the post to make it clearer.

noaman said...

What about using AV Cable ?

Diane Plesset, CMKBD, NCIDQ #13029, C.A.P.S. said...

Is there a magic trick to getting the ethernet port to work on my new Orange Pi Plus? I have tried several distos, and it's always "disabled". Not finding the solution, and getting frustrated. Ethernet seems fine when booted to Android...

Unknown said...

Thank you for these great instructions.

I have discovered that the armbian distributions don't come with a boot partition.

Is there a way to get this working?

dosek said...

Need some help
I've got Orang Pi Pc with system OrangePI_Ubuntu_Vivid_Mate. I followed the instruction from this site (i have a windows on my pc, but this isn't a problem with making a SD card with bootable system to Pi), and only one USB port is working. What can i do to change it ?
And second problem
With diffrent systems (raspbian and lubuntu were tested)I don't have problems with that USB's but i'm not able to make a internet connection with USB WiFi. One module is NETGEAR (i know there are some problems with that) and second is on TP-link chipset (somebody told me that is accurate to work with all Pi). Instruction with usiing termnal sudo nano ... did'nt work. Is any solution of that?

XU said...

what if i only have a windows pc

Unknown said...

Windows: Format the card with SDFormatter
Install your .img of choice to the card with Win32DiskImager.
On XP:
R-click on "My Computer", Click "Manage"
Click on "Storage", D-click "DiscManagement(Local)"
R-click on "BOOT(E:)", Click "Open"
This is the folder to change the uImage and script.bin files just as in the directions above.

Unknown said...
This comment has been removed by the author.
Erikur said...

You are a lifesaver. Thank you so much. Everything up and working on my Opi PC

Unknown said...

step 9 fails ... runs successfully but will not mount for step 10. I have tried various IMG files on Windows and Linux .... same results

Anonymous said...

Hi ,

i am facing a problem ,

1. Only 3 cpu cores are working.
2. on reboot shows 4 cores, but when i am starting my java based project, then after 1-2 hours, 1 cpu cores stops,
ans top command shows 3 cpu cores. I am using latest scriptbin_kernel.tar.gz

what is causing this problem.....?

Unknown said...

Where would I find files suitable for the Orange Pi One?

metin cini said...

I started using orange pi plus. I installed OpenSUSE, but the ethernet appears to be eth0 and the internete is not connected. Wirelles have no solution available
thank you.

metin cini said...

OpenSUSE internet connection can not be established. The ethernet lights are on without cables. There is no change when you plug in the cable.

Unknown said...

Thanks you for the tutorial. I used it on an orange pi one.
Here is the configuration:
Operating System : OrangePI_Lubuntu_Vivid.img
For the video : script.bin.OPI-PC_1080p60_hdmi.

I use a computer screen and it works thunder.

Thanks !

Happy Singh said...

New Year is the time for celebrations and joy. People have always celebrated New Year’s Eve with a lot of pomp and showMy SIte

http://www.happynewyearimages-2016.com/2016/10/Happy-New-Year-2017-Status-For-Whatsapp-in-Hindi.html and http://www.happynewyearimages-2016.com/2016/12/happy-new-year-wishes-For-boyfriends.htmland http://www.happynewyearimages-2016.com/2016/12/download-happy-new-year-2017-gif-images.html and http://www.happynewyearimages-2016.com/2017/08/happy-new-year-wishes-in-french.htmlhttp://www.happynewyearimages-2016.com/2016/10/happy-new-year-status-for-whatsapp-in-english.html


ritu verma said...

if you are looking for free picture of bollywood and hollywood than you can visit this site

Bradley Cooper said...

All the lovers are excited because the day of love, Valentine's Day 2018 is near. All have started making plans for this special day to make it more special for their soul mates.


source

Unknown said...

Check out the latest Bollywood ,Hollywood and Tollywood actor and actress wallpaper ,gossip,,video and many more Stuff at Top10Xyz.com

omni verma said...

HSSC has released Recruitment notification to fillOur Site

Romi Sharma said...

Sai Baba is worshipped all around the world by his devotees. His sole was self realization and had no love for expensive things images

Technology worldwide said...

free proxy

Kevin Max said...

I found so many interesting stuff in your blog especially its discussion. Keep doing this wonderful work. For any detail related to Orange Pi , visit KKSB-Cases.

Health is Wealth said...

Wedding Photographer in Bangalore

Unknown said...

Best Candid Wedding Photographers in Bangalore

Health is Wealth said...

Are you looking for affordable data appending services? Delta Infomatix is the right company. Our data experts will help you on data append, email append, Phone number Append, B2B and B2C Contacts. Get a free quote.
http://www.deltainfomatix.com

Data Appending : Go beyond and consider quality & accuracy data; if you want your database to work for you!

Data Integration : Data integration is seamless and hassle-free like never before. Try us and get rid of data redundancy and outdated information.

Demand Generation : Accelerate your brand traction into new markets and cross-sell to your existing customer via our demand generation programs.

Digital Marketing : We can take an all-channel approach with a focus on increasing conversions, repeat traffic and generating greater brand and loyalty online.

List Management : Fortified with a team of seasoned data specialists, we can vouch on quality, correctness, up-to-date & relevancy of data.

Customer Profiling : Our profiling services will help you to achieve most accurate and precise customer data without breaking a sweat.

All Customer Service Number said...

You can learn from the help of our blog on What the Acquisition of Skype May Mean for Microsoft. Click on the following link to read more about "Acquisition of Skype May Mean for Microsoft
"

Unknown said...

I like Orange Pi One boards. It's very reliable. Thanks for sharing!

Unknown said...

Hi, could the links be updated possibly? They no longer work