Linux on a Samsung Tab 2 (7 inches)
When my mother-in-law gave me an old Samsung Tablet, specifically a Samsung Galaxy Tab 2 (7 inches), I was wondering what could I do with that, and the first thing I thought was “What if you install linux on it?”
There is a linux distribution for old tablets and telephones called postmarketOS, and I decided to give it a try.
Was my device supported?
There is a list of supported devices on postmarketOS Wiki, and fortunately I found that my tablet has support (only for the Edge
branch, in community support). That means that I can run linux on my tablet, but there is some features that are not working:
- 3D Acceleration
- GPS
- Cameras
- Sound
So, I decided to use my tablet for making a simple linux server, instead of a more complete desktop environment.
How to install postmarketOS on my tablet
-
Installing TWRP for getting into Recovery Mode
I rebooted my tablet in Odin mode for downloading TWRP and installing it with Odin. Then I restarted my tablet on recovery mode and confirmed that TWRP was running.
-
Getting postmarketOS
I opened a linux console and installed
pmbootstrap
, a tool for getting and installing postmarketOS:$ pip3 install --user pmbootstrap
And then I initialize
pmbootstrap
$ pmbootstrap init
That command make some questions about the channel (edge vs stable), the device manufacturer (samsung) and the model codename (espresso-wifi).
Finally, I typed the magic commands for getting a postmarketOS installer that runs from recovery mode:
$ pmbootstrap install --android-recovery-zip --recovery-install-partition=data
and then:
$ pmbootstrap export
Then I copied the generated zip file to an SD card, put the card in my tablet, and rebooted into recovery mode.
-
Installing from recovery mode
This is the easiest part, after booting into recovery mode we need to select the option “Install from zip file”, select the External SD Card storage, and wait until finishing. This may take a couple of minutes. After that, you can reboot and enjoy Linux on a tablet.