Author Topic: A collection of hints and how-to's for Linux on the Gemini  (Read 4077 times)

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« on: April 12, 2018, 06:33:20 am »
The user cos has posted an useful list of hints for Linux on the Gemini. Included is a shell script which (as documented in the script):

"- Sets a shell for gemini user to allow using terminals and ssh login
 - Resizes the linux filesystem to use full partition space (more space)
 - Update system and install some useful debian packages
 - Sets up ssh server
 - Changes hostname to gemini (from localhost)
 - Enables avahi-daemon for discovery on LAN
 - Changes password for gemini user (for security)"


https://coshacks.blogspot.it/2018/04/gemini...kers-guide.html

Thanks cos!

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #1 on: April 12, 2018, 07:04:26 am »
Regarding the filesystem resizing: the default Linux filesystem size is roughly 8 GB, but the partition size is 32 GB; the script resizes that filesystem in order to use the full partition size.

Varti
« Last Edit: April 12, 2018, 07:33:18 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

salvomic

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #2 on: April 12, 2018, 03:21:04 pm »
Quote from: Varti
Regarding the filesystem resizing: the default Linux filesystem size is roughly 8 GB, but the partition size is 32 GB; the script resizes that filesystem in order to use the full partition size.

Varti

Varti, is there a way a way to store parts of the file system also in a SD card?
Salvo
Gemini, Psion S5 and S5mx, iPhone, iPad, Huawei MediaPad M5, some HP calculators.
Psion Fans Italia moderator

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #3 on: April 12, 2018, 08:42:35 pm »
Quote from: salvomic
Quote from: Varti
Regarding the filesystem resizing: the default Linux filesystem size is roughly 8 GB, but the partition size is 32 GB; the script resizes that filesystem in order to use the full partition size.

Varti

Varti, is there a way a way to store parts of the file system also in a SD card?
Salvo
I have been thinking that I would like to put /home and probably /var/log on the removable storage, but I figure to do it via symlink. less certain is the format for the storage.
« Last Edit: April 12, 2018, 08:43:01 pm by depscribe »
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #4 on: April 12, 2018, 09:56:42 pm »
Quote from: depscribe
I have been thinking that I would like to put /home and probably /var/log on the removable storage, but I figure to do it via symlink. less certain is the format for the storage.

If you are using external storage for /home, .... you would hopefully know what format it is (ext3/ext4)  I would just put it in fstab and let the system do its thing. For /home, I normally create a skeleton structure so that if the card fails to mount, you can still log in and fix it. Mounting the sd card at /home will override what it normally there.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #5 on: April 13, 2018, 03:18:20 am »
Quote from: salvomic
Varti, is there a way a way to store parts of the file system also in a SD card?
As others have already mentioned, it's enough to create a simlink in place of the directory you want to keep on the SD card, e.g.

Code: [Select]
sudo ln -s /mnt/sdcard/home/username /home/username
Though it seems that it is advisable to use bind-mount so that also running servers such as apache or sshd can make use of it:

https://askubuntu.com/questions/465493/how-...m-another-drive

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #6 on: May 03, 2018, 01:05:22 pm »
Quote from: Varti
Quote from: salvomic
Varti, is there a way a way to store parts of the file system also in a SD card?
As others have already mentioned, it's enough to create a simlink in place of the directory you want to keep on the SD card, e.g.

Code: [Select]
sudo ln -s /mnt/sdcard/home/username /home/username
Though it seems that it is advisable to use bind-mount so that also running servers such as apache or sshd can make use of it:

https://askubuntu.com/questions/465493/how-...m-another-drive

Varti
Unless that arises a lot more than I think, the advantage to a symlink is that it's durable -- it survives reboots. (presuming that the volume the link points to is mounted at boot.) I am a little less certain about symlinking /var or /var/log, but if preventing wear from constant writes is an issue, that would certainly be a prime candidate, unless there's a recipe for reducing logging to stuff we're likely to need in normal use.
« Last Edit: May 03, 2018, 01:10:59 pm by depscribe »
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

Beiriannydd

  • Newbie
  • *
  • Posts: 36
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #7 on: May 10, 2018, 12:37:54 pm »
https://gist.github.com/kylemanna/6930087

I found the above link useful for configuring Wifi on the Linux side of things.  Be aware that connman uses /run/connman/resolv.conf which it symlinks over whatever you had there.  Unfortunately LinuxDeploy doesnt remove the symlink or create a /run/connman directory so you'll need to do one or other of those and restart your linux container before name resolution will work in your container again

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #8 on: May 10, 2018, 08:32:54 pm »
Quote from: Varti
Quote from: salvomic
Varti, is there a way a way to store parts of the file system also in a SD card?
As others have already mentioned, it's enough to create a simlink in place of the directory you want to keep on the SD card, e.g.

Code: [Select]
sudo ln -s /mnt/sdcard/home/username /home/username
Though it seems that it is advisable to use bind-mount so that also running servers such as apache or sshd can make use of it:

https://askubuntu.com/questions/465493/how-...m-another-drive

Varti

Though inasmuch as the Linux on Gemini uses systemd, setting a microSD card to automount is not the trivial thing it was back when all we needed to do was edit /etc/fstab, apparently. I'm exploring this now and if there's an easy-ish solution I'll post it here.
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
A collection of hints and how-to's for Linux on the Gemini
« Reply #9 on: May 10, 2018, 10:49:16 pm »
Quote from: Varti
Regarding the filesystem resizing: the default Linux filesystem size is roughly 8 GB, but the partition size is 32 GB; the script resizes that filesystem in order to use the full partition size.

Varti
And Adam Boardman has written replacement scatter files that will let you alter the ratio of Android:Linux partition sizes. I used one that gives the vast majority of space to Linux. You need to d/l before and choose it when you are flashing the machine, though, and then run the script to make full use of the Linux partition.

They're here: https://github.com/gemian/gemini-keyboard-apps/wiki/Flashing
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket