Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

Saturday, October 12, 2024

Distrohopping on Librem5

 In continuation to my previous blog-post expressing my excitement/happiness at receiving the librem5, being a distro-hopper (maniacal) in the beginning times of my GNU/Linux journey, I couldnt hold myself. So went ahead prepared an SD card and installed my first distro of choice, Debian GNU/Linux on the librem5. However, the experience was anticlimactic. The stable version did not boot and the weeklies just gave me a "glimpse" of the mobian logo. Yes, there are other methods like "jumpstart", but, I do not want to go that route. I want my librem5 as pristine as possible. It is already running GNU/Linux and lots and lots of users and devs are putting continuous efforts to have the latest and greatest on the device. For now, I will stay with installing alternate GNU/Linux on the SD card. 

Since Mobian GNU/Linux did not boot successfully, I went towards the next effort, Postmarket OS. I am just amazed by the amount of effort put by this team and the long distance which they have already traveled. The tools developed by the team are beautifully documented. It was a joy to go through the documentation. It is like they want every individual to be able to boot Postmarket OS and they want it to do the heavy lifting themselves absolving the user from the initial resistance to free their phones. Kudos to the team and all the users. I just went to the Postmarket page for librem5 and blindly followed the procedure to get PMos on the SD card. It was so straight forward, I just remembered the first book I had bought to learn Redhat Linux 6, my first GNU/Linux installation. GNU/Linux has come a long way and the tools developed by the devs, just for the passion, is unbelievable. In the initial install, I chose the --fde(Full disc encryption) option. However, the device repeatedly asked for the passphrase. I changed the passphrase on the installation (Again thanks to the use-case already available and documented). Now,  PMos went past the passphrase window and stayed at the boot screen. Waited for half an hour, then powered the phone off. By this time, I would have removed and re-inserted by SD card not less than 10 - 20 times. The sim/sd card tray is very flimsy. Be very careful while handling it. Dont worry, I have very nimble hands.

I am a seasoned distro-hopper. I dont give in that easy. On the next day, I flashed PMos, without fde. Now, it booted and landed me onto a text login screen. No keyboard. Luckily, I decided to give the device some time. The device logged me into an empty screen with a wallpaper. Empty screen. Yes, that is what I like to see on any desktop. That is the reason I love window managers. That is the reason I have been on i3 since ... (I have forgot the count). Again, why empty screen? Well, I had chosen the choice of sxmo environment heavily inspired by DWM and i3(sway of course). I had seen few videos of sxmo running on the pinephone. However, the video I had watched was very hardware intensive. That is the actions were performed by a combination of hardware buttons on the device. I hate using hardware buttons on any device. I prefer double tapping the screen to unlock the screen and double tapping the screen again to lock the device. I want the hardware buttons for that rainy day. I want the hardware buttons to get into fastboot. Went to the sxmo website. Mind blown. My God!!. What an idea!? The gesture system is one of the best I have come across. It is the most intuitive gesture system I have come across. Oh, did i just indicate that to boot from the SD card, you just have to power the librem5 with the vol down button held down for at-least 05 seconds. You have to immediately hold down the volume down key after powering up the device. 

Let us continue about sxmo. The sxmo project has a very nicely curated set of apps. The most important contribution from the team are the scripts. The project has exposed many of the phone related activities as hooks for the user to tap into and make scripts to accomplish tasks when triggered by clicking the name of the script or a combination of hardware buttons. The present scripts written by the project devs are readily available from the script menu(swipe diagonally from the top right towards the center of the phone). The menu, when accessed through the documented shortcuts are context sensitive. That is the menu is displayed based on what is available on the screen. If it is a Firefox window, the menu will give an option to open a new window or a new tab, you get the idea... Tiling is a first class citizen on sxmo. It was a joy to see multiple windows stack one below the other. Other Operating systems took years to reach this level of window management. Anyhow, I will write on only "sxmo". Thanks again to all the devs and users making the GNU/Linux stack a reality on phones.

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.

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.

Sunday, January 10, 2016

My tryst with Ian Murdock's Debian GNU/Linux

I bought an assembled computer in the year 2000. The hardware was assembled by friends from my computer science department(I being a Mech engineer). They installed me the "latest" operating system, Win ME. I was also very happy, friends visited my home to see my computer. They wanted to "see" a computer with 128 GB RAM and a blazing fast 650 Mhz processor. Before that I had used DOS to run foxpro programs for my 1st sem engg. The next exposure was using Autocad in my final semester. The computers in the college were old school and "just" enough to run the required app. Played around with my new computer. Heard a heap os mp3s, watched a few movies on vcds, played a few games and thats it. After a month, the only result was that I learnt Autocad with great proficiency. After this, it got boring. Did not touch for around a month later. During this time, while discussing with a friend who had just joined a UNIX course. He did not know that he was learning GNU/Linux, Not his mistake.(At this juncture I did not know anything except Win****. Infact I did not know that there was another operating system). So, let us excuse my friend here and request the reader to excuse me too. Now in the discussion happening what caught my fancy was that my friend was repeatedly telling me that it is a tough nut to crack and one life time is not enough to learn *nix. Let us go back to the day I bought my desktop. I fell short of a 1000 bucks while buying it. So, the shop owner sent the person doing the assembly to my house with my friends to bring back the money. Once the desktop reached my home, All the components were quickly connected, hdd formatted and winME installed. Now, my computer science friends started having a chat with the assembler. The assembler told that he had learnt to install a new OS called Redhat 6 GNU/Linux. This caught the fancy of my computer friends and they asked him to show them the install methodology of Redhat 6 GNU/Linux. All this while I was a mute spectator. I just took care of all my friends with the snacks department. The assembler started the installation and I believe it took an hour or so. Once the installation was over it was late in the night and everybody just went home. My friends told that they would visit me again in the course of the week to "format" back the installation space taken by the GNU/Linux system.

Now, let us come back to the friend who told that *nix was a tough nut to crack. Since all the use case scenarios of win ME was exhausted I thought of venturing into fresh waters. Came back home the same day and booted Redhat GNU/Linux 6. I was dropped to a terminal with a blinking cursor with a black backdrop. I did not know the login ID and password. Immediately requested and begged my father for giving me money to buy a book. Went to the biggest store in Bangalore and bought "Redhat Linux 6 UNLEASHED". Here I came to learn of VI and Emacs editors. Somehow I though emacs was the editor for me. While reading the documentation for emacs I came across the history of GNU and the GPL licenses. I was glued. I just was at awe at the philosophy of "free as in freedom". After that it was learning everyday. I installed nearly all the OSs on my desktop. QNX, Minix and the like. Then Redhat GNU/Linux 7 was released and I recognised that GNU/Linux had arrived. From now on slackware, calderra, Mandrake and many others were tried. But I was always hearing about Debian GNU/Linux while on forums and reading magazines. I tried ubuntu somewhere here and applied for free cd shipping also and I did recieve them. But, somehow, my installations of ubuntu GNU/Linux always was not up to my expectation. There was a sort of "restriction". I cannot tell what it is. But I felt tied. This feeling I did not get while using any other GNU/Linux distros. After trying all the distros, I tried Debian woody. The installation, I thought was similar to slackware. But what caught my fancy was the way the distro was managed. The democratic setup, the clear responsibilities in the social contract, the "release when ready" philosophy, the plethora of packages and the wiki. I loved the distro. Being in India we were not luck in the internet department. I used to eagerly wait for stable releases. I had developed a relationship with a local cd/dvd vendor(Individual) who was selling GNU/Linux cd/dvd on his blog and was charging only for his efforts, true to the RMS philosophy. I would be the first customer for every major release from v 3.0 through 5.0 and I used to buy all the cds dvds not just the first one. While installing, my selction of sofware during installation would make me to swap the cd/dvd many number of times. I loved the release names owing to the fact that I am a huge fan of the toy story franchise.

My tryst continued with debian GNU/Linux after I bought a HP laptop. I have always documented my installation experiences on my blog. It continued on to a dell laptop. But, I got a high by installing the powerpc version of Debian Gnu/Linux on the PS3 while it was still supported by the otheros option. The last 15 years of my computing would have not been exciting if not for Debian GNU/Linux. I salute the vision of Ian Murdock. I salute all the developers/users/maintainers of this awesome OS. I always used to get a package for doing any task I wanted to do within the pack of the DVDs. Debian GNU/Linux is a part of my life as much as my friends/my family. I have spent more time on using Debian GNU/Linux systems than any other beside my job. Yes, I am not a pro. I am not a programmer. I am a GNU/Linux enthusiast. I am a fan of Debian GNU/Linux.

I request the force to give Ian Murdock all the peace he needs. His death didnt seem a normal one. I wish his family and friends all the positive force in the universe. This definitely applies to the man who spearheaded the development of the Universal Operating system.

Thanks a lot Ian Murdock. You definitely have left a mark in this universe.

PS: I had succesfully installed Debian GNU/Hurd also. That is one more Hats off to Sri Ian Murdock. Thanks. May the force be with you.

Sunday, August 4, 2013

GNU/Linux on Apple Macbook Air 4.2 (Late 2011) part 1

 Disclaimer: I dont take any responsibility for the damage of your equipment. If you point your ire at me, I will have the last laugh. USE THE INFO AT YOUR OWN RISK.

This post is my continuation of my earlier post where I drooled over the hardware implementation of Macbook air. After that post I have seen all the notebook manufacturers try to make a clone and majority have failed except for the samsung versions which have better connectivity options compared to the Air. But Macbook air is still the king in lightweight laptops. Why do I drool over the Airs being a hardcore freedom software evangelist? Hardware, exquisitely crafted hardware.

Let us get down to freeing the Macbook air from propreitory software it is running. I have chosen Arch GNU/Linux as my GNU OS of choice having read reports of it running beatifully on Mac hardware and not interested in running the Microsoft of the windows world, Ubuntu GNU/Linux.
Coming from Debian GNU/Linux, I saw that the ncurses interface for installing the basic OS is very similar. There was a shocker waiting for me. After downloading the latest x86_64 build, I connected the external DVD drive borrowed from my friend and booted it. What happens, The installer starts and dumps me into a root prompt. Thats it. I have installed slackware GNU/Linux and Debian GNU/Linux with neat installers though still ncurses based.

Time to search the public network. Now I see that the ncurses installer has been done away with. You have to install everything manually. Ofcourse there are lot of tools provided by the Arch GNU/Linux project to make the process simple and straight forward. At this juncture I would like to mention about the Arch WIKI. This is one of the most detailed wiki documentation I have gone through seconded or equalled only by the Gentoo GNU/Linux wiki.The wiki is written beautifully and is very easy to comprehend by anybody with a basic GNU/Linux background. In the process, I chrooted to another GNU/Linux installation for the first time and the raw power of the UNIX philosophy hit me on my face. KUDOS to all the "freeedom" developers.





Here are the links/resources/works/efforts I made use of in liberating my Macbook Air.

http://d.goodlad.net/articles/arch_linux_on_mba_42/

http://blog.billsdon.com/2011/12/triple-boot-13inch-macbook-air-4-2-2011-model/

http://www.billsdon.com/2011/12/install-linux-mint-12-lisa-13inch-macbook-air-4-2-2011-model/

http://plopez.nfshost.com/2011_macbook_air_pure_efi_dual-boot

http://calummacrae.blogspot.in/2012/06/control-freaks-macbook-air-introduction.html

http://maketecheasier.com/install-dual-boot-ubuntu-in-macbook-air/2012/08/27

http://www.linuxbsdos.com/2012/10/10/dual-boot-windows-7-and-ubuntu-12-04-on-a-pc-with-uefi-board-ssd-and-hdd/

The next post will be having all the gory details of installing Arch GNU/Linux on the Macbook air.