WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyCore/RaspberryPi Photo Scanning Project  (Read 16000 times)

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
TinyCore/RaspberryPi Photo Scanning Project
« on: December 28, 2020, 06:41:36 PM »
Hi, I'm digitizing my family's photo collection, and I'm working on a Pi 3B+ (production will be on a 4 or 400).

So far, I have:
'
  • GIMP
  • SANE backend

I worked with MicroCore a couple years ago for a project, where I learned the basics of tce and boot codes.

What I'm still working on:
  • Where to put my boot codes: I read somewhere that it may vary depending on which Pi model I'm running it on.
  • Fine tuning the desktop environment: I grew up on Windows before switching to Linux full time. At the same time, I want to keep things relatively lightweight for GIMP later on.
  • GIMP plugins: Ideally, I would like to scan multiple pictures and have GIMP identify them and separate them out.
  • NFS: I want to save my pictures to an NFS share, but tce isn't being forthcoming here. I believe I saw reference to a package for the x86 architecture though.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #1 on: December 28, 2020, 08:00:10 PM »
Hi Shadow_8472
... NFS: I want to save my pictures to an NFS share, but tce isn't being forthcoming here. I believe I saw reference to a package for the x86 architecture though.
There's a version in the TC9 repo you could try:
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz.info

Fetch the following and place them in your  tce/optional  directory:
Code: [Select]
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz
http://repo.tinycorelinux.net/9.x/armv7/tcz/nfs-utils.tcz.dep
http://repo.tinycorelinux.net/9.x/armv7/tcz/rpcbind.tcz
http://repo.tinycorelinux.net/9.x/armv7/tcz/rpcbind.tcz.dep
http://repo.tinycorelinux.net/9.x/armv7/tcz/libtirpc.tcz

To load it run:
Code: [Select]
tce-load -i nfs-utils
If you want the extension to load when you boot, add the following to your  tce/onboot.lst  file:
Code: [Select]
nfs-utils.tcz

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #2 on: December 28, 2020, 11:32:16 PM »
Thanks! The NFS packages seem to be working, but I'm running into a less novel error a more generic Linux forum/Discord can help me with, though I'll recall it here for completeness' sake.

I copied two /etc/fstab lines by hand for two shares, one with a space in the name (I've had issues with that particular one in the past) and another without. I've checked multiple times for typos:

Quote
<NFS path> <NFS Mountpoint> nfs defaults 0 0

Transcript of error log:
Quote
$ sudo mount -a
mount.nfs: an incorrect mount option was specified
mount: mounting <NFS path> on <NFS Mountpoint> failed: Connection refused

Of note: PiCore is on a subnet: 10.0.1.x run from a custom Wi-Fi to Ethernet router. My laptop was able to access these shares over this subnet, though. I checked because the shares are IP range whitelisted.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #3 on: December 29, 2020, 01:17:29 AM »
Do you need something like:
Code: [Select]
$ sudo mount.nfs -o nfsvers=3 ...

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #4 on: December 29, 2020, 02:20:35 AM »
I won't go claiming I know NFS inside and out, but I want the shares mounted on boot. I've used the exact fstab lines on at least two or three other computers on the local network and wrangled successful results. But I suppose you're right: I should look into if mounting them manually turns up the same issue. I'll work on it tomorrow. Thanks for the idea.

In addition, I forgot to mention in my original post that I'd like to correct an underscan issue. I always get it when running Raspian or Raspberry OS, but I at least know it's possible to fix.

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #5 on: December 29, 2020, 02:58:58 PM »
No good. Manually mounting a share didn't work. I still haven't ruled out version incompatibilities.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #6 on: December 29, 2020, 05:10:46 PM »
Hi Shadow_8472
OK, so you loaded nfs-utils.tcz. Assuming your network is up, you also need to start the nfs client:
Code: [Select]
sudo /usr/local/etc/init.d/nfs-client start
This is the command I use to connect:
Code: [Select]
sudo mount -o v3 192.168.1.30:/home/tc /home/tc/TC4Where:
192.168.1.30  is the machine acting as a NFS server.
/home/tc  is the directory the NFS server is exporting.
/home/tc/TC4  is the local mount point on the NFS client.

If the mount command still fails, post the exact error message.

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #7 on: December 29, 2020, 05:50:58 PM »
I'm in! Turns out I had a trailing / in the fstab mount points, a possibility brought up on a Discord server, though I did get a time out error (the shares are hosted on spinning platter disks).

Code: [Select]
mount: RPC: Timed out
mount: mounting ... failed: Bad file descriptor

This is what happens when I don't use copy/paste.

Should I start other threads for the other issues in my original post, or should I keep it to one thread per project? I don't know what would be polite here.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #8 on: December 29, 2020, 05:57:34 PM »
Hi Shadow_8472
Since the subject is titled  Photo Scanning Project  you might as well continue here.

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #9 on: December 29, 2020, 06:30:10 PM »
I would have liked to edit the original post for a running tally of things I'm still after, but it looks like this forum doesn't support edits, so I'll just rundown my to-do list whenever something major happens.

Complete:
  • PiCore installed
  • GUI elements installed (Tweaking desired)
  • SANE backend installed (Not tested yet)
  • GIMP installed
  • nfs-utils installed

To Do:
  • Boot codes for user and hostname. I'm keeping an eye out for portability complications beteen different Pi versions, namely the Pi 4 and 400.
  • Tweak GUI to something more familiar (I switched from Windows)
  • Fix Underscan Raspberry Pi's tend to get
  • Plugins to scan directly into GIMP

Optional:
  • I'd like to know if I'm working with 32 bits or 64 bits. It looks like the tools I normally use didn't make it in. If 64, I'm considering getting an 8GB RAM Pi 4 to dedicate to this project.
  • Wi-Fi support is not mission critical, but if it's easy and portable --experience with the Pi 400 says it isn't necessarily either-- then it I may throw it in.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #10 on: December 29, 2020, 07:28:11 PM »
Hi Shadow_8472
I would have liked to edit the original post ...
After 30 minutes you can no longer edit your posts.

Quote
Boot codes for user and hostname. I'm keeping an eye out for portability complications beteen different Pi versions, namely the Pi 4 and 400.
Take a look in  /opt/bootsync.sh.  There's probably a command in there that sets the hostname if that's acceptable.
And here's a list of Tinycore boot codes:
http://tinycorelinux.net/faq.html#bootcodes

Quote
I'd like to know if I'm working with 32 bits or 64 bits ...
It's 32 bits.

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #11 on: December 29, 2020, 08:02:56 PM »
...After 30 minutes you can no longer edit your posts...
It's 32 bits.

Thanks for the info. Sad to hear I won't be super-charging with >4GB of RAM. Any idea if 64 bits are in the works?

Hostname has been changed. I'm still not sure how to get bootcodes in so they're respected on all platforms. Using the function keys didn't seem to do anything during boot. I'll keep working on it. I remember saving them to a file somewhere once booted.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #12 on: December 29, 2020, 08:30:56 PM »
Hi Shadow_8472
... Any idea if 64 bits are in the works? ...
Yes, there's  aarch64:
http://tinycorelinux.net/12.x/aarch64/releases/RPi/
This is a list of current extensions:
http://tinycorelinux.net/12.x/aarch64/tcz/
I think it's for ARMv8 and I think it requires a Pi 4. Juanito or Paul_123 should be able to tell you for sure.

Quote
... I'll keep working on it. I remember saving them to a file somewhere once booted.
Mount the first partition (mmcblk0p1). That's where the boot loader and its config files are. According to the  README  file boot
codes are in  /mnt/mmcblk0p1/cmdline.txt (or maybe  /mnt/mmcblk0p1/cmdline3.txt).

Offline Shadow_8472

  • Newbie
  • *
  • Posts: 39
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #13 on: December 29, 2020, 10:36:46 PM »
If I remember correctly, cmdline3.txt was supposed to be for Pi 3 units.

I've found the overscan settings, working with them now... Done. Took a bunch of guesswork and reboots.

The Pi 3 I'm working on for now has an ARM7 architecture, so there's that.

It's accepted my boot code for user name, but now it wants a password I never gave it. Holding CTRL+C while it was Loading extensions... dropped me into root login, though. I'd be curious about what would have happened had I had a root password, though.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TinyCore/RaspberryPi Photo Scanning Project
« Reply #14 on: December 30, 2020, 01:17:37 AM »
I think it's for ARMv8 and I think it requires a Pi 4. Juanito or Paul_123 should be able to tell you for sure.

aarch64 will work with both RPi3 and RPi4, though I'm not sure there's much point with an RPi3.