My musings regarding GNU/Linux, FreeBSD, OpenBSD and GNU/Minix. Generally these are my comments towards topics related to "Free as in Freedom" software and tips for installing and configuring Debian GNU/Linux, Arch GNU/Linux, FreeBSD, OpenBSD on laptops and other generics. My deepest gratitude to all the devs and users keeping the whole FLOSS philosophy working. You can follow me on the fediverse through Mastodon. @srinicame
Showing posts with label raspberry. Show all posts
Showing posts with label raspberry. Show all posts
Saturday, January 14, 2023
Sunday, June 7, 2020
raspberry pi os 64 bit on the raspberry pi 4(4 GB)
Disclaimer: I am not responsible for any damage to your pi for following any of the instruction below. These instructions are what I have used on my pi. There might be no gurantee that it might work on yours. You have been warned.
So, now you know that there is a 64 bit beta OS for the raspberry pi. I dont know about you, but from the day I bought the pi 4 I always wanted to run the 64 bit version of any Gnu/Linux distro. I tried many flavors. I tried ubuntu, manjaro and gentoo. I rolled back to the 32 bit raspbian because it was a complete and highly optimized OS for the rpi 4. But I was sad that though the board supports 64 bit OS, we were holding back on its capabilities. The problem as always while distro-hopping is that you have to re-start majority of your configuration and app installs. So, things in the home directory can be moved easily, but other tiny optimizations we do, we forget it. This process has to start afresh. It is not an easy thing to do. The rpi does not fly in terms of computing power.
Anyhow, we are now holding the efforts of the rpi foundation in releasing a 64 bit OS with a more beefy pi with 8 GB. That will be happy news for people running servers on their pis. For us desktop users, the 4GB version will be fine for a certain amount of time. That is a very subjective line. Let us not dwell more on it. It is indeed time to laud the efforts of the rpi foundation for supporting pis from the first generation to the present with OS updates across the devices. I would like to take this opportunity to congratulate and thank the rpi foundation and the numerous contributors, beta testers and users for bringing the 64 bit OS to our favorite pi.
Thanks is also for bringing the USB boot support. This make the rpi application more universal. I had a pi 4 which had the sd card slot damaged. I taped the sd card in the slot with much difficulty and then flashed the latest bootloader. There we have it, the pi is now alive again. Thanks again to every person involved.
To start off with the USB boot support.
1. Download the latest 64 bit beta raspberry pi OS(raspbian is now renamed to this)
2. Install it on your spare sd card(8GB min is recommended)
3. Boot your rpi from this sd card
4. You now get a taste of your new rpi os 64 bit
5. Go through the setup and it will automatically upgrade all the packages.
6. reboot
7. sudo apt-get update
8. sudo apt-get upgrade
9. sudo rpi-update ---Now, be careful here. This installs the bleeding edge kernel an other bleeding edge blobs. This is also a disclaimer regarding any damage to you pi after this. You are on your own. I have done it and many others as well and have not faced any issues.
10. reboot
11. sudo apt-get update
12. sudo apt-get upgrade
13. reboot
14. sudo nvim /etc/default/rpi-eeprom-update
and change the "critical" to "beta"
15. reboot
16. cd /lib/firmware/raspberrypi/bootloader/beta/
17. check the latest files starting with pieeprom-
18. Now run
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/latest-file from step 17
19. poweroff
20. Repeat step 1 and 2 with your ssd
23. unmount the ssd and re-connect again
24. Now the boot partition which is a fat partition will get mounted or you have to mount it on your GNU/Linux.
25. Open the file config.txt and edit the file with the following information regarding the overclocking of your pi(A disclaimer again here. This overclock has been safe on my pi with a fan connected and with heat sinks on the processor and the graphics unit. I am not responsible for any damage to you pi)
over_voltage=6
arm_freq=2140
arm_freq_min=400
gpu_freq=750
26. If you had slower ssd speeds previously dont forget to enter the quirks into the file cmdline.txt
27. Connect your ssd to your usb3 port of the pi and remove the sd card.
28. Power on the pi
29. If your boot is painfully slow then you should refer to this post. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=245931
Enjoy the fruits of freedom software and its ethos. Dont forget to spread the ethics of freedom software and this may not include the price you paid for the software.
So, now you know that there is a 64 bit beta OS for the raspberry pi. I dont know about you, but from the day I bought the pi 4 I always wanted to run the 64 bit version of any Gnu/Linux distro. I tried many flavors. I tried ubuntu, manjaro and gentoo. I rolled back to the 32 bit raspbian because it was a complete and highly optimized OS for the rpi 4. But I was sad that though the board supports 64 bit OS, we were holding back on its capabilities. The problem as always while distro-hopping is that you have to re-start majority of your configuration and app installs. So, things in the home directory can be moved easily, but other tiny optimizations we do, we forget it. This process has to start afresh. It is not an easy thing to do. The rpi does not fly in terms of computing power.
Anyhow, we are now holding the efforts of the rpi foundation in releasing a 64 bit OS with a more beefy pi with 8 GB. That will be happy news for people running servers on their pis. For us desktop users, the 4GB version will be fine for a certain amount of time. That is a very subjective line. Let us not dwell more on it. It is indeed time to laud the efforts of the rpi foundation for supporting pis from the first generation to the present with OS updates across the devices. I would like to take this opportunity to congratulate and thank the rpi foundation and the numerous contributors, beta testers and users for bringing the 64 bit OS to our favorite pi.
Thanks is also for bringing the USB boot support. This make the rpi application more universal. I had a pi 4 which had the sd card slot damaged. I taped the sd card in the slot with much difficulty and then flashed the latest bootloader. There we have it, the pi is now alive again. Thanks again to every person involved.
To start off with the USB boot support.
1. Download the latest 64 bit beta raspberry pi OS(raspbian is now renamed to this)
2. Install it on your spare sd card(8GB min is recommended)
3. Boot your rpi from this sd card
4. You now get a taste of your new rpi os 64 bit
5. Go through the setup and it will automatically upgrade all the packages.
6. reboot
7. sudo apt-get update
8. sudo apt-get upgrade
9. sudo rpi-update ---Now, be careful here. This installs the bleeding edge kernel an other bleeding edge blobs. This is also a disclaimer regarding any damage to you pi after this. You are on your own. I have done it and many others as well and have not faced any issues.
10. reboot
11. sudo apt-get update
12. sudo apt-get upgrade
13. reboot
14. sudo nvim /etc/default/rpi-eeprom-update
and change the "critical" to "beta"
15. reboot
16. cd /lib/firmware/raspberrypi/bootloader/beta/
17. check the latest files starting with pieeprom-
18. Now run
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/latest-file from step 17
19. poweroff
20. Repeat step 1 and 2 with your ssd
23. unmount the ssd and re-connect again
24. Now the boot partition which is a fat partition will get mounted or you have to mount it on your GNU/Linux.
25. Open the file config.txt and edit the file with the following information regarding the overclocking of your pi(A disclaimer again here. This overclock has been safe on my pi with a fan connected and with heat sinks on the processor and the graphics unit. I am not responsible for any damage to you pi)
over_voltage=6
arm_freq=2140
arm_freq_min=400
gpu_freq=750
26. If you had slower ssd speeds previously dont forget to enter the quirks into the file cmdline.txt
27. Connect your ssd to your usb3 port of the pi and remove the sd card.
28. Power on the pi
29. If your boot is painfully slow then you should refer to this post. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=245931
Enjoy the fruits of freedom software and its ethos. Dont forget to spread the ethics of freedom software and this may not include the price you paid for the software.
Sunday, October 6, 2019
So near to a Desktop..............Raspberry Pi 4
Its been a long time since I wrote anything technical. This particular piece has been long overdue. The public network is full of ideas of what not can be achieved with a raspberry pi. After owning the original pi and surprising plenty of people with its capability to output videos at full HD, You know, I was eagerly awaiting a pi with 4k capabilities. Many people were surprised at the announcement of the rpi 4 and its capabilities. I for one thought that the maker and I have a connection. But, yes, the connection lost lots of packages between. So, what have we got in terms of what I really wanted
1. 4k desktop(I don't know which monitor gets the capability at 60Hz. My monitor defaults to 30Hz whatever I try. I think we are talking about the latest HDMI standards)
2. 4k movie playback is still patchy. I think it will get better with the foundation/users/developers hacking away at it
3. USB 3.0 support is a major leap(We will discuss below how, this is a radical decision)
4. USB C charging is also welcome with more power headed its way(But not enough)
The best OS to run on a rpi4 is no doubt raspbian. Yes, it is still a 32 bit OS. But, wait, the foundation is supporting all the pi's dating back to the first one. Kudos to the team.There are plenty of options for running 64 bit OS developed by groups and hobbyist OS enthusiasts. They are limited by the quirks in the hardware and its hardware acceleration. The memory limit issues have been resolved. Now it is only about video output performance to be bought on par with the 32 bit raspbian. As we are speaking there is a thread testing out a 64bit kernel with 32 bit userland. For running the latest Firefox, a 64 bit kernel is now a prime requirement and the rpi hackers are getting there. Tried all of them out there. They all have certain polish out there. They run faster, they are stable enough. But, video output performance has not reached the 32 bit raspbian level. I always came back to raspbian by restoring the backup.
The foundation was little brave this time and touted the rpi 4 as a desktop replacement. That claim, is very gutsy. If your desktop requirement is to run a browser and not wanting to watch High Def videos multitasking with office suites, then, the rpi 4 is good enough. Oh, oh, wait. Before telling me otherwise, I do agree that ou can improve the performance and extract more juice out of the pi by investing a little more of your time an accessories. To bring the performance of the rpi 4 to a desktop level, you would require
1. A heat sink with fan(money) This is a necessary investment. Your rpi 4 runs very hot. It has to be cooled down or else you will feel the throttling. Even opening one single application raises the temperature to the max.
2. An sd card with highest transfer rate possible with corruption resistance(I came up with that)(money money)
3. Buy the original usb c charger. There have been reports that the rpi4 is picky when it comes to usb c chargers(money money money)
With the above items, and a little bit of overclocking and some software optimizations the rpi 4 is definitely nearing a desktop feature set.
A real desktop will definitely demand storage space. Here the usb ports come into play. The two usb 3.0 ports are a god send. Just connect your external HDD's and you have the storage capability of a desktop. A good desktop also has Bluetooth connectivity and 3.5mm jack connectivity. You are completely covered here. A good desktop of course has to have a keyboard and mouse connected. Your are covered here also with the two usb 2.0 ports. So you have to connect more usb devices, like another external HDD. Your Pi will die here. Now, it is time to invest in a powered usb hub(money X 4). Be careful here and buy a good one and check the power distribution among the ports in the hub.
A monitor. What is a desktop without a monitor. You definitely will have an old monitor lying in the attic. It is time to brush it off and connect it to the pi. Oh, you are far ahead and have a 4k monitor a 4k tv, rpi has you covered. The pi is very picky when it comes to supporting 4k. You might be out of luck for older ones. Buy a good hdmi cable. Or, better buy the official one. The desktop feels snappy. Choose your apps properly. Prefer functionality over eye candy. In this way you can get more out of your pi. Yeah, I heard you. You can always get a "mini" desktop from various vendors. But, I would like to stop you here. Will it be as hackable as the pi. Will it have the whole world building things for it. Will you be able to search the public network for issues and resolutions. Will you get to run Debian GNU/Linux as well as the pi can run. Will it be credit card sized. Will you enjoy it. Will it give you joy.......
Now, coming to the most costliest investment to extract more from your pi. The ssd. This is a must. The loading of applications from the sd card is pathetically slow. Opening word processors/modern web browsers will be slow(When I say slow, I meant in comparison with a desktop with the latest desktop processors from the big guys). I recommend strongly to invest in an ssd. All of a sudden, the rpi 4 becomes a "real" candidate for desktop space. Suddenly the pi feels snappier. It boots faster. The copying, installing, upgrading are faster. Applications load faster. The UI is very responsive. I can go on. It is highly recommended to go for a ssd on immediately buying the rpi 4. What would be the size? Well, you have been running your pi from an 8 bit card(Yes, even now that is enough). I dont think you get an ssd less than 32 GB. So go for the minimum sized ssd, if you are hard pressed for money otherwise, go the full monty and go for a bigger drive with enough space for all your data. It is upto you. But buy an ssd. Though I am stressing the requirement of an ssd, it is important that you appreciate its requirement. I suggest you run your pi from an sd card and then after a couple of months upgrade for an ssd. Then you will appreciate what I am talking about here and also why I spent a paragraph in influencing you to upgrade to an ssd. If you are seeing degraded performance after installing on a ssd, go here
Well, I observed that the post is not well balanced. It is like a non uniform graph, jumping about on the sheet. If you are reading it, you are definitely a fan of the rpi. So read on.
The public network is floating with optimizations available for the rpi 4. There are plenty of posts which help you to extract the last atom of juice from you rpi. Here are my recommendations. If you have any more feel free to share with me. Thanks in advance for all those efforts. Let me brief about my setup
1. rpi 4, 4GB
2. 4TB spinning HDD and a 1TB spinning HDD
3. 4 Port(USB 3.0) powered hub for connecting the above HDDs to the pi
4. Official charger for the rpi 4(This cant supply power to the second hdd)
5. 4K 32" monitor
6. Logitech wireless keyboard(K 400) with both keyboard and a touchpad. You will love this setup if you are invested in window managers. More on this later in the post
7. 8GB sd card
8. 128GB SSD connected to the USB 3.0 Port
9. A transparent case
10. Copper heat sinks for the main processor and the graphic processor
11. Fan
I have flashed the fully featured raspbian on the 8GB sd card. I then followed this excellent post to move the root file system to an SSD. Huge thanks to the OP and all the users/devs contributing o this huge thread. Dont use the option of using the method of device names like /dev/sda1 use the other option of specifying the id of the partitions for better compatibility and allowing the dirty job of allocating the device names to the OS by giving it a free hand and not doling out names which would make your device not bootable. If you are sure you are not going to connect any other disk then go ahead and do the first method. I suggest the partition id method.
Now it is time to disable the services which you don't want. There are plenty of posts and lots of directions in the raspberry pi forums for this. The sky is the limit and every user has his own requirements so go ahead and treat yourselves.
The default xfce4 desktop is quite good. That is if you are fan of traditional desktop environments. If you are a power user, then I would suggest you to shift to window managers. As their name they just manage windows. That is exactly what majority of us do when we fire up the desktop. For all other configurations we have the terminal. In my opinion, the most lightest terminal I have used to date has been urxvt. When I started searching for window managers and at last settling for i3, I was shocked to see that the majority of the configuration files shared by users on the public network mentioned urxvt as their terminal emulator. Once I started using it and configured it to my hearts content, any other terminal is bloated. When I fire up the rofi launcher and choose lxterminal, the hourglass is displayed for a brief amount of time. With an urxvt session, it is instantaneous. It is pure bliss. And when you are getting this response on a pi, it is a festival of sort whenever i fire up this emulator. I adore all the devs involved in this project. My favourite colour scheme is the solarized one and urxvt looks fabulous with this. Making it full screen without any borders and menus is........
The next piece of software I would like to talk is about youtube-dl. For all the command line junkies. This is a god send. Coupled with the unix philosophy of chaining the output of several commands, you have a miracle at your finger tips. Just combine it with omxplayer and you have a fantastic streaming solution. Did I tip my hat to the devs? Yes. Now, coming down to omxplayer. This is a quintessential piece of scripting to extract the maximum out of the video sub system of the pi. I am astonished at the video capabilities of the pi. All credit to the omxplayer devs. I do agree there might be some proprietary magic here. But, the foundation is working towards producing a good FLOSS representation of the graphics driver. All my best wishes for the team. Youtube does frequently defeat the purpose of youtube-dl but the devs have always found ways around it. I love you guys.
As always, all the ideas and optimizations mentioned here have been culled from all over the public network. If any credit is due, please drop a line and it will be acknowledged.
1. 4k desktop(I don't know which monitor gets the capability at 60Hz. My monitor defaults to 30Hz whatever I try. I think we are talking about the latest HDMI standards)
2. 4k movie playback is still patchy. I think it will get better with the foundation/users/developers hacking away at it
3. USB 3.0 support is a major leap(We will discuss below how, this is a radical decision)
4. USB C charging is also welcome with more power headed its way(But not enough)
The best OS to run on a rpi4 is no doubt raspbian. Yes, it is still a 32 bit OS. But, wait, the foundation is supporting all the pi's dating back to the first one. Kudos to the team.There are plenty of options for running 64 bit OS developed by groups and hobbyist OS enthusiasts. They are limited by the quirks in the hardware and its hardware acceleration. The memory limit issues have been resolved. Now it is only about video output performance to be bought on par with the 32 bit raspbian. As we are speaking there is a thread testing out a 64bit kernel with 32 bit userland. For running the latest Firefox, a 64 bit kernel is now a prime requirement and the rpi hackers are getting there. Tried all of them out there. They all have certain polish out there. They run faster, they are stable enough. But, video output performance has not reached the 32 bit raspbian level. I always came back to raspbian by restoring the backup.
The foundation was little brave this time and touted the rpi 4 as a desktop replacement. That claim, is very gutsy. If your desktop requirement is to run a browser and not wanting to watch High Def videos multitasking with office suites, then, the rpi 4 is good enough. Oh, oh, wait. Before telling me otherwise, I do agree that ou can improve the performance and extract more juice out of the pi by investing a little more of your time an accessories. To bring the performance of the rpi 4 to a desktop level, you would require
1. A heat sink with fan(money) This is a necessary investment. Your rpi 4 runs very hot. It has to be cooled down or else you will feel the throttling. Even opening one single application raises the temperature to the max.
2. An sd card with highest transfer rate possible with corruption resistance(I came up with that)(money money)
3. Buy the original usb c charger. There have been reports that the rpi4 is picky when it comes to usb c chargers(money money money)
With the above items, and a little bit of overclocking and some software optimizations the rpi 4 is definitely nearing a desktop feature set.
A real desktop will definitely demand storage space. Here the usb ports come into play. The two usb 3.0 ports are a god send. Just connect your external HDD's and you have the storage capability of a desktop. A good desktop also has Bluetooth connectivity and 3.5mm jack connectivity. You are completely covered here. A good desktop of course has to have a keyboard and mouse connected. Your are covered here also with the two usb 2.0 ports. So you have to connect more usb devices, like another external HDD. Your Pi will die here. Now, it is time to invest in a powered usb hub(money X 4). Be careful here and buy a good one and check the power distribution among the ports in the hub.
A monitor. What is a desktop without a monitor. You definitely will have an old monitor lying in the attic. It is time to brush it off and connect it to the pi. Oh, you are far ahead and have a 4k monitor a 4k tv, rpi has you covered. The pi is very picky when it comes to supporting 4k. You might be out of luck for older ones. Buy a good hdmi cable. Or, better buy the official one. The desktop feels snappy. Choose your apps properly. Prefer functionality over eye candy. In this way you can get more out of your pi. Yeah, I heard you. You can always get a "mini" desktop from various vendors. But, I would like to stop you here. Will it be as hackable as the pi. Will it have the whole world building things for it. Will you be able to search the public network for issues and resolutions. Will you get to run Debian GNU/Linux as well as the pi can run. Will it be credit card sized. Will you enjoy it. Will it give you joy.......
Now, coming to the most costliest investment to extract more from your pi. The ssd. This is a must. The loading of applications from the sd card is pathetically slow. Opening word processors/modern web browsers will be slow(When I say slow, I meant in comparison with a desktop with the latest desktop processors from the big guys). I recommend strongly to invest in an ssd. All of a sudden, the rpi 4 becomes a "real" candidate for desktop space. Suddenly the pi feels snappier. It boots faster. The copying, installing, upgrading are faster. Applications load faster. The UI is very responsive. I can go on. It is highly recommended to go for a ssd on immediately buying the rpi 4. What would be the size? Well, you have been running your pi from an 8 bit card(Yes, even now that is enough). I dont think you get an ssd less than 32 GB. So go for the minimum sized ssd, if you are hard pressed for money otherwise, go the full monty and go for a bigger drive with enough space for all your data. It is upto you. But buy an ssd. Though I am stressing the requirement of an ssd, it is important that you appreciate its requirement. I suggest you run your pi from an sd card and then after a couple of months upgrade for an ssd. Then you will appreciate what I am talking about here and also why I spent a paragraph in influencing you to upgrade to an ssd. If you are seeing degraded performance after installing on a ssd, go here
Well, I observed that the post is not well balanced. It is like a non uniform graph, jumping about on the sheet. If you are reading it, you are definitely a fan of the rpi. So read on.
The public network is floating with optimizations available for the rpi 4. There are plenty of posts which help you to extract the last atom of juice from you rpi. Here are my recommendations. If you have any more feel free to share with me. Thanks in advance for all those efforts. Let me brief about my setup
1. rpi 4, 4GB
2. 4TB spinning HDD and a 1TB spinning HDD
3. 4 Port(USB 3.0) powered hub for connecting the above HDDs to the pi
4. Official charger for the rpi 4(This cant supply power to the second hdd)
5. 4K 32" monitor
6. Logitech wireless keyboard(K 400) with both keyboard and a touchpad. You will love this setup if you are invested in window managers. More on this later in the post
7. 8GB sd card
8. 128GB SSD connected to the USB 3.0 Port
9. A transparent case
10. Copper heat sinks for the main processor and the graphic processor
11. Fan
I have flashed the fully featured raspbian on the 8GB sd card. I then followed this excellent post to move the root file system to an SSD. Huge thanks to the OP and all the users/devs contributing o this huge thread. Dont use the option of using the method of device names like /dev/sda1 use the other option of specifying the id of the partitions for better compatibility and allowing the dirty job of allocating the device names to the OS by giving it a free hand and not doling out names which would make your device not bootable. If you are sure you are not going to connect any other disk then go ahead and do the first method. I suggest the partition id method.
Now it is time to disable the services which you don't want. There are plenty of posts and lots of directions in the raspberry pi forums for this. The sky is the limit and every user has his own requirements so go ahead and treat yourselves.
The default xfce4 desktop is quite good. That is if you are fan of traditional desktop environments. If you are a power user, then I would suggest you to shift to window managers. As their name they just manage windows. That is exactly what majority of us do when we fire up the desktop. For all other configurations we have the terminal. In my opinion, the most lightest terminal I have used to date has been urxvt. When I started searching for window managers and at last settling for i3, I was shocked to see that the majority of the configuration files shared by users on the public network mentioned urxvt as their terminal emulator. Once I started using it and configured it to my hearts content, any other terminal is bloated. When I fire up the rofi launcher and choose lxterminal, the hourglass is displayed for a brief amount of time. With an urxvt session, it is instantaneous. It is pure bliss. And when you are getting this response on a pi, it is a festival of sort whenever i fire up this emulator. I adore all the devs involved in this project. My favourite colour scheme is the solarized one and urxvt looks fabulous with this. Making it full screen without any borders and menus is........
The next piece of software I would like to talk is about youtube-dl. For all the command line junkies. This is a god send. Coupled with the unix philosophy of chaining the output of several commands, you have a miracle at your finger tips. Just combine it with omxplayer and you have a fantastic streaming solution. Did I tip my hat to the devs? Yes. Now, coming down to omxplayer. This is a quintessential piece of scripting to extract the maximum out of the video sub system of the pi. I am astonished at the video capabilities of the pi. All credit to the omxplayer devs. I do agree there might be some proprietary magic here. But, the foundation is working towards producing a good FLOSS representation of the graphics driver. All my best wishes for the team. Youtube does frequently defeat the purpose of youtube-dl but the devs have always found ways around it. I love you guys.
As always, all the ideas and optimizations mentioned here have been culled from all over the public network. If any credit is due, please drop a line and it will be acknowledged.
Subscribe to:
Posts (Atom)