OESF Portables Forum
Model Specific Forums => Gemini PDA => Gemini PDA - Linux => Topic started by: Varti 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 (https://coshacks.blogspot.it/2018/04/gemini-pda-hackers-guide.html)
Thanks cos!
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
-
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
-
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.
-
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, 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.
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 (https://askubuntu.com/questions/465493/how-can-i-symlink-my-home-folder-from-another-drive)
Varti
-
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.
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 (https://askubuntu.com/questions/465493/how-can-i-symlink-my-home-folder-from-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.
-
https://gist.github.com/kylemanna/6930087 (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
-
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.
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 (https://askubuntu.com/questions/465493/how-can-i-symlink-my-home-folder-from-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.
-
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 (https://github.com/gemian/gemini-keyboard-apps/wiki/Flashing)