--- title: "Linux on a Samsung Tab 2 (7 inches)" date: 2022-12-24T10:02:38-03:00 draft: false tags: ['linux', 'postmarketOS', 'ancient hardware'] --- 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](https://postmarketos.org/), and I decided to give it a try. ## Was my device supported? There is a list of [supported devices](https://wiki.postmarketos.org/wiki/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 1. ### Installing TWRP for getting into Recovery Mode I rebooted my tablet in [Odin mode](https://www.thecustomdroid.com/samsung-galaxy-download-odin-mode-guide/) for downloading [TWRP](https://twrp.me/samsung/samsunggalaxytab270wifi.html) and installing it with [Odin](https://odindownload.com/). Then I restarted my tablet on [recovery mode](https://www.hardreset.info/devices/samsung/samsung-p3110-galaxy-tab-2-70/recovery-mode/) and confirmed that TWRP was running. 1. ### Getting postmarketOS I opened a linux console and installed ```pmbootstrap```, a tool for getting and installing postmarketOS: ```bash $ pip3 install --user pmbootstrap ``` And then I initialize ```pmbootstrap``` ```bash $ 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: ```bash $ pmbootstrap install --android-recovery-zip --recovery-install-partition=data ``` and then: ```bash $ pmbootstrap export ``` Then I copied the generated zip file to an SD card, put the card in my tablet, and rebooted into recovery mode. 1. ### 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.