You are not logged in.
Hello:
Working on my RPi3B+ hardware setup I have come across a few things for which I am still trying to wrap my head around.
Evidently ARM is not x86 and ARM64 is not x86_64.
One of the things that I'm not getting is the configuration of things related to the GPIO pins.
It seems that most if not all the settings for the GPIO pins rely on systemd, which Raspbian uses.
Another thing I have come across is the fact that vcgencmd is not in the image I've installed and cannot be installed from the repository.
And there's probably more I will be finding out about as I make progress with my installation/configuration.
Is there a way of getting around all this or will I end up having to use Raspbian in my RPi3B+?
Thanks in advance,
A.
Hello:
... only one swap partition (or swapfile) the priority has no importance.
Yes, I had read about that.
But then I asked myself about the swap priority beng -2 in particular this image (Devuan ascii ARM64) and thought that is was because there was another one somewhere.
ie: a swapfile somewhere in the SD Card, which I do not use save for reading the rootfs.
Then I concluded (as I mention above) that is was due to the use of an SD Card.
... choose the priority if you have more swap partitions (or swapfiles).
I have only one.
... the UUID is right ...
Yes, that's checked.
... change the priority of swap it is the swappiness of the system you should mess with (in /etc/sysctl.conf).
I recall having used that at some time with my workstation which has 8Gb RAM.
... wait until the system is otherwise behaving well.
Quite so ...
I need to get my VGA/HDMI adaptor (stuck somewhere in the mail delivery pipe) and set up the desktop/coffee roasting software.
That will be the test and then I'll be able to adjust swap accordingly.
Have a nice day
You too ... =-)
Thanks for your input.
Cheers,
A.
Hello:
... recreate the "swap signature" ...
Unfortunately that didn't work and somewhere along the line the partition's UUID got changed.
The RPi is originally intended to be used with an SD Card, but I share the opinion that SD Cards were not really intended for the type of use an RPi gives it but for use in cameras and such devices large ie: files written once, read many times over and once moved, eventually deleted.
Hence a swap file/partition being set with a priority of -2.
But I have not seen this swap priority setting in any other Linux installs/images.
So I have to conclude that it is being set as the default value somewhere.
Which begs the question: where is it set?
Any ideas?
My guess is that it is in one of the init files (?), I'll have to look around.
In any case, I found a way to permanently set the swap priority here.
This is how:
1. check the swap partition/file exists:
root@rpidevuan:/home/groucho# free
total used free shared buff/cache available
Mem: 887604 36952 794780 1292 55872 835068
Swap: 3145724 0 3145724
root@rpidevuan:/home/groucho#
2. check to see where it is mounted
root@rpidevuan:/home/groucho# blkid
--- snip ---
/dev/sda7: UUID="fd8f0765-c88e-43d1-8b8d-9b734fb6322a" TYPE="swap" PARTUUID="d34db33f-07"
root@rpidevuan:/home/groucho#
3. turn it off
root@rpidevuan:/home/groucho# swapoff /dev/sda7
4. check that it is off
root@rpidevuan:/home/groucho# swapon -s
root@rpidevuan:/home/groucho#
5. make a backup copy of your /etc/fstab
root@rpidevuan:/home/groucho# cp -p /etc/fstab /etc/fstab.bak
root@rpidevuan:/home/groucho#
6. edit /etc/fstab and add pri=X in place of defaults, with X being the desired value and reboot.
7. check the result
root@rpidevuan:/home/groucho# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 3145724 0 1
root@rpidevuan:/home/groucho#
root@rpidevuan:/home/groucho# free
total used free shared buff/cache available
Mem: 887604 37884 793036 1292 56684 834100
Swap: 3145724 0 3145724
root@rpidevuan:/home/groucho#
I opted for a value of 1 but I'll have to check and see how it behaves once I finish my installation and get the coffee roasting software working.
Cheers,
A.
Hello:
... it goes deep..
... $HOME/.config directory.
Quite so.
As a precautionary measure, I only used the appimage version but it also writes to $HOME/.config.
So, after using it I'd just exit the application and delete the config file it wrote.
I used it last night without any issue and this morning, for unknown reasons, the application would not start.
So I deleted everything etcher related from my system, downloaded the appimage version and tried again.
No dice.
It won't start.
I have not run any system updates/upgrades since the last time I used it, so I really don't think this could be due to some system glitch/incompatibility.
So I'm back to (and will stay with) the well known and trusty dd.
If there's anything I should look into, please advise.
Thanks in advance,
A.
Hello:
If you find a very low power harddrive ...
I came across a drive made an PATA model by Transcend.
Could be used with any old USB to 2.5" IDE adaptor.
The specs are these:
2.5" PATA SSD
TS32GPSD330
---
Capacities vary from 32Gb to 128Gb
---
DC +5V 0.3A <-------- This
https://www.transcend-info.com/Embedded/Products/No-836
I don't know if their SATA SSD drives have the same power spec.
https://www.transcend-info.com/Search.aspx?q=sata+2.5
Cheers,
A.
Hello:
... use halt -p, that should close files & unmount before ...
Like I mentioned I use sudo shutdown -h now.
If I do sudo halt -p it will have (it has) the same effect I describe in my OP (as far as I know) as they are mostly the same.
ie: shutdown -h = shutdown --halt
... microSDHC card to boot from plus a HDD as / ...
Yes, that is exactly what I am doing.
... has the bootfs on a 2.0Gb SD card and the rest of the system on a 40Gb IDE HDD ...
Thanks a lot for your input.
Cheers,
A.
Hello:
I'm currently in the process of setting up the hardware for a Raspberry Pi 3B+ that has the bootfs on a 2.0Gb SD card and the rest of the system on a 40Gb IDE HDD on a USB2.0 controller.
Works just fine (for the moment and only on SSH) and won't know how my coffee roasting software will do till I receive a presently stuck-in-the-mail HDMI-VGA adaptor for the 15" LCD screen I will use.
The previous HDD I used went south after a short stint as a RPi HDD and I was wondering if the way the RPi shuts down had anything to do with it.
ie: when I do sudo shutdown -h now, I notice that power to the HDD is cut out within three maybe four seconds but the amber LED on the board keeps flashing for another five to seven seconds.
Now, I would not have noticed this sequence had it not been for the short high pitched screech/whine of the drive coming to a halt.
I used these drives quite a bit to make backups and move image files between MS systems (mostly W98, NT4,W2000) and don't recall (it was long ago) that drive whine on disconnect, but maybe I've just forgotten. (?)
It won't much be of a problem if yet another resucitated HDD gives up the ghost but I'd hate that it were for something that could be avoided.
eg: spin down the drive before cutting off power to the USB port instead of directly cutting off power to the USB port?
I say this because I think the RPi was not designed to work with HDDs and I have the idea that the HDD is being handled like a SD card.
But then I don't think SD cards were designed for HDD duty but to be used in cameras and similar equipment where files are large and usually stay put to be read multiple times once generated, so it would seem that the RPi / SD card match is not a good one either.
Any ideas on how to do this?
Thanks in advance,
A.
Hello:
... the etc/fstab file for extra spaces.
Wrote the Devuan ascii *.img files to the SD card and another 40Gb HDD, then made the modifications mentioned in my OP.
You can see the instructions in a video here.
Changed the size of the swap partition, was a bit overboard.
Will try with 3.0Gb and see how it goes when I run the coffee roasting software as 1Gb RAM is rather tight.
groucho@devuan:~$ cat /etc/fstab
# <file system> <mount point> <type> <options> <dump><pass>
# bootfs
# was /dev/mmcblk0p1
UUID=EEA4-304A /boot vfat defaults 0 1
# root on HDD - was /dev/sda2
UUID=589c7999-62be-47ac-8847-32b62fd9fdc9 / ext4 defaults,noatime 0 1
# /var/log on HDD - was /dev/sda5
UUID=80f008d9-7f6e-49d2-8df7-d370a02be5df /var/log ext4 defaults,noatime 0 1
# /home on HDD - was /dev/sda6
UUID=58b362ef-c02d-45c0-8085-dc3996a7d947 /home ext4 defaults,noatime 0 2
# /swap - was /dev/sda7
UUID=5535c86a-ff6f-46d2-a53b-bad0f38d23fc none swap defaults 0 0
## blkid as of 20200505
# 2.0Gb SD card
# /dev/mmcblk0: PTUUID="ac806f8a" PTTYPE="dos"
# /dev/mmcblk0p1: SEC_TYPE="msdos" UUID="EEA4-304A" TYPE="vfat" PARTUUID="ac806f8a-01"
# /dev/mmcblk0p2: UUID="589c7999-62be-47ac-8847-32b62fd9fdc9" TYPE="ext4" PARTUUID="ac806f8a-02"
#
# 40Gb HDD
# /dev/sda1: SEC_TYPE="msdos" UUID="EEA4-304A" TYPE="vfat" PARTUUID="d34db33f-01"
# /dev/sda2: UUID="589c7999-62be-47ac-8847-32b62fd9fdc9" TYPE="ext4" PARTUUID="d34db33f-02"
# /dev/sda5: LABEL="log" UUID="80f008d9-7f6e-49d2-8df7-d370a02be5df" TYPE="ext4" PARTUUID="d34db33f-05"
# /dev/sda6: LABEL="home" UUID="58b362ef-c02d-45c0-8085-dc3996a7d947" TYPE="ext4" PARTUUID="d34db33f-06"
# /dev/sda7: LABEL="swap" UUID="5535c86a-ff6f-46d2-a53b-bad0f38d23fc" TYPE="swap" PARTUUID="d34db33f-07"
groucho@devuan:~$
I have found it to be a good idea to keep a (dated and commented) output of blkid in the /etc/fstab file.
Keeps everything on the same page when needing to edit or check it.
root@devuan:/home/groucho# findmnt --verify --verbose
/boot
[ ] target exists
[ ] UUID=EEA4-304A translated to /dev/sda1
[ ] source /dev/sda1 exists
[ ] FS type is vfat
/
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=589c7999-62be-47ac-8847-32b62fd9fdc9 translated to /dev/sda2
[ ] source /dev/sda2 exists
[ ] FS type is ext4
/var/log
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=80f008d9-7f6e-49d2-8df7-d370a02be5df translated to /dev/sda5
[ ] source /dev/sda5 exists
[ ] FS type is ext4
/home
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=58b362ef-c02d-45c0-8085-dc3996a7d947 translated to /dev/sda6
[ ] source /dev/sda6 exists
[ ] FS type is ext4
none
[ ] UUID=5535c86a-ff6f-46d2-a53b-bad0f38d23fc translated to /dev/sda7
[ ] source /dev/sda7 exists
[ ] FS type is swap
Success, no errors or warnings detected
root@devuan:/home/groucho#
The warnings issued by findmnt --verify --verbose were permission related.
Must be run as root or without the --verbose modifier.
Had nothing to do with update-initramfs -u. 8^7
root@devuan:/home/groucho# fdisk -l
--- snip ---
Disk /dev/mmcblk0: 1.9 GiB, 1990197248 bytes, 3887104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xac806f8a
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 264191 262144 128M c W95 FAT32 (LBA)
/dev/mmcblk0p2 264192 3872767 3608576 1.7G 83 Linux
Disk /dev/sda: 37.3 GiB, 40060403712 bytes, 78242976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd34db33f
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA)
/dev/sda2 264192 14942207 14678016 7G 83 Linux
/dev/sda3 14942208 78241791 63299584 30.2G 5 Extended
/dev/sda5 14944256 17041407 2097152 1G 83 Linux
/dev/sda6 17043456 71948287 54904832 26.2G 83 Linux
/dev/sda7 71950336 78241791 6291456 3G 82 Linux swap / Solaris
root@devuan:/home/groucho#
root@devuan:/home/groucho# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 3145724 0 -2
root@devuan:/home/groucho#
root@devuan:/home/groucho# swapon -a
root@devuan:/home/groucho#
As for the swapon -a parse error, it remains a mystery.
When confronted by something like that again, maybe the MS way is better.
ie: delete and rewrite the line. 8^°
Now to finish the install and do some housekeeping (host name, user, sudoers.d, etc.)
I have another doubt I must address but will do so in a different thread.
Thanks a lot to everyone who helped out with this.
Cheers,
A.
Hello:
Sector 2048 is the optimal start point for a correctly-aligned drive.
Right ...
Then I'll only have to doble check (I had checked) the etc/fstab file for extra spaces.
I may finish setting up Devuan ascii on the other 40Gb HDD drive in a while, if not tomorrow.
Thanks for your input,
A.
Hello:
this is line 9, you have a space after 'defaults', should be "defaults,noatime"
Quite so ...
Very sharp! 8^D
Can't look at it now as the drive is toast.
But I'll check that the next install is properly written (maybe tonight) and report back.
Thanks a lot for your input.
Cheers,
A.
Hello:
... looks fine to me.
Looks fine to me also.
Compared it to my other /etc/fstab files and found no issue.
findmnt --verify --verbose
Here it is:
groucho@rpidevuan:~$ findmnt --verify --verbose
findmnt: /etc/fstab: parse error at line 9 -- ignored
/boot
[ ] target exists
[ ] UUID=EEA4-304A translated to /dev/sda1
[ ] source /dev/sda1 exists
[W] cannot detect on-disk filesystem type
/home
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=d25be223-0f7a-4394-a555-636340a965b5 translated to /dev/sda5
[ ] source /dev/sda5 exists
[W] cannot detect on-disk filesystem type
/var/log
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=2a7f1d75-8347-465b-8452-4f1ca299405b translated to /dev/sda6
[ ] source /dev/sda6 exists
[W] cannot detect on-disk filesystem type
none
[ ] UUID=1d1727d2-e296-48fb-a6cc-1207cfd6b7be translated to /dev/sda7
[ ] source /dev/sda7 exists
[W] cannot detect on-disk filesystem type
1 parse error, 0 errors, 4 warnings
groucho@rpidevuan:~$
Nice. =-)
I'll write to my cheat-sheet.
1 parse error, 0 errors, 4 warnings --> all in /dev/sda.
I just now remembered something I had not done: update-initramfs -u.
Done.
Ran findmnt --verify --verbose again:
root@rpidevuan:/home/groucho# findmnt --verify --verbose
findmnt: /etc/fstab: parse error at line 9 -- ignored
/boot
[ ] target exists
[ ] UUID=EEA4-304A translated to /dev/sda1
[ ] source /dev/sda1 exists
[ ] FS type is vfat
/home
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=d25be223-0f7a-4394-a555-636340a965b5 translated to /dev/sda5
[ ] source /dev/sda5 exists
[ ] FS type is ext4
/var/log
[ ] target exists
[ ] VFS options: noatime
[ ] UUID=2a7f1d75-8347-465b-8452-4f1ca299405b translated to /dev/sda6
[ ] source /dev/sda6 exists
[ ] FS type is ext4
none
[ ] UUID=1d1727d2-e296-48fb-a6cc-1207cfd6b7be translated to /dev/sda7
[ ] source /dev/sda7 exists
[ ] FS type is swap
1 parse error, 0 errors, 0 warnings
The warnings are gone (must always remember update-initramfs -u)
But the parse error subsists.
Could this be related to the start of /dev/sda?
ie:
root@rpidevuan:/home/groucho# fdisk -l
--- snip ---
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA) <------------ this
/dev/sda2 264192 4458495 4194304 2G 83 Linux
/dev/sda3 4458496 78241791 73783296 35.2G 5 Extended
/dev/sda5 4460544 65658879 61198336 29.2G 83 Linux
/dev/sda6 65660928 67758079 2097152 1G 83 Linux
/dev/sda7 67760128 78241791 10481664 5G 82 Linux swap / Solaris
root@rpidevuan:/home/groucho#
... default value, swapon(8) claims the default is -1 but it's always -2 when I try to create a fresh swap partition.
... appear to have a swap partition ...
Yes I have.
For some reason I confused them, fixed.
But this will have to wait for a while.
My old HDD just gave up the ghost, shutting down/spinning up so often was probably too much for it's weary heads (ca. 2004).
It's chirping and won't spin up. =^°
But I have another one in the drawer.
Will come back to the thread once I've set the RPi up again.
Thanks for your input.
Cheers,
A.
Hello:
I finally managed to install the Devuan ascii image on my RPi3B+ and boot it from an 40Gb HDD.
dd'd the image to a 2.0Gb SD card and a 40Gb USB2.0 HDD thus generating twin images.
It boots from the bootfs on the 2.0Gb SD card with the rest of the system on the HDD.
I think I understand how it works, not too clear though.
As the images are identical, the second partition on the SD card has the same UUID as the second partiton on the HDD.
Editing the /etc/fstab file does the rest.
Once I checked it was working properly, I used gparted from my workstation to resize the root partition on the HDD to 2.0Gb and set up /home, /var/log and swap.
This is what fdisk -l and blkid show:
root@rpidevuan:/home/groucho# fdisk -l
--- snip ---
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 264191 262144 128M c W95 FAT32 (LBA)
/dev/mmcblk0p2 264192 3872767 3608576 1.7G 83 Linux
Disk /dev/sda: 37.3 GiB, 40060403712 bytes, 78242976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xac806f8a
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 264191 262144 128M c W95 FAT32 (LBA)
/dev/sda2 264192 4458495 4194304 2G 83 Linux
/dev/sda3 4458496 78241791 73783296 35.2G 5 Extended
/dev/sda5 4460544 65658879 61198336 29.2G 83 Linux
/dev/sda6 65660928 67758079 2097152 1G 83 Linux
/dev/sda7 67760128 78241791 10481664 5G 82 Linux swap / Solaris
root@rpidevuan:/home/groucho# blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" UUID="EEA4-304A" TYPE="vfat" PARTUUID="d34db33f-01"
/dev/mmcblk0p2: UUID="589c7999-62be-47ac-8847-32b62fd9fdc9" TYPE="ext4" PARTUUID="d34db33f-02"
/dev/sda1: SEC_TYPE="msdos" UUID="EEA4-304A" TYPE="vfat" PARTUUID="ac806f8a-01"
/dev/sda2: LABEL="root" UUID="589c7999-62be-47ac-8847-32b62fd9fdc9" TYPE="ext4" PARTUUID="ac806f8a-02"
/dev/sda5: LABEL="home" UUID="d25be223-0f7a-4394-a555-636340a965b5" TYPE="ext4" PARTUUID="ac806f8a-05"
/dev/sda6: LABEL="log" UUID="2a7f1d75-8347-465b-8452-4f1ca299405b" TYPE="ext4" PARTUUID="ac806f8a-06"
/dev/sda7: LABEL="swap" UUID="1d1727d2-e296-48fb-a6cc-1207cfd6b7be" TYPE="swap" PARTUUID="ac806f8a-07"
/dev/mmcblk0: PTUUID="d34db33f" PTTYPE="dos"
... and /etc/fstab:
groucho@rpidevuan:~$ cat /etc/fstab
## <file system> <mount point> <type> <options> <dump><pass>
##
## bootfs on SD Card
# was /dev/mmcblk0p1 /boot vfat defaults 0 1
UUID=EEA4-304A /boot vfat defaults 0 1
## root on HDD /dev/sda2
UUID=589c7999-62be-47ac-8847-32b62fd9fdc9 / ext4 defaults, noatime 0 1
## /home on HDD /dev/sda5
UUID=d25be223-0f7a-4394-a555-636340a965b5 /home ext4 defaults,noatime 0 2
## /var/log on HDD /dev/sda6
UUID=2a7f1d75-8347-465b-8452-4f1ca299405b /var/log ext4 defaults,noatime 0 2
## /swap on HDD dev/sda7
UUID=1d1727d2-e296-48fb-a6cc-1207cfd6b7be none swap defaults 0 0
When setting the swap partition, I got this:
root@rpidevuan:/home/groucho# swapon -a
swapon: /etc/fstab: parse error at line 9 -- ignored
root@rpidevuan:/home/groucho#
But when I check it I get this:
root@rpidevuan:/home/groucho# free
total used free shared buff/cache available
Mem: 887604 33616 795512 1276 58476 838168
Swap: 5240828 0 5240828
root@rpidevuan:/home/groucho# swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 5240828 0 -2
root@rpidevuan:/home/groucho#
I used cat -v to parse the /etc/fstab file but I get no errors.
Line 9 is this one:
UUID=1d1727d2-e296-48fb-a6cc-1207cfd6b7be none swap defaults 0 0
Q1:
Any idea as to what is wrong with line 9?
Q2:
Why does the swap file partition have priority -2?
root@rpidevuan:/home/groucho# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda7 partition 5240828 0 -2
root@rpidevuan:/home/groucho#
I only have one swap file partition and I don't see the system mounting anything on the SD card:
root@rpidevuan:/home/groucho# mount
/dev/sda2 on / type ext4 (rw,relatime,block_validity,delalloc,nojournal_checksum,norecovery,barrier,user_xattr,acl)
devtmpfs on /dev type devtmpfs (rw,relatime,size=438328k,nr_inodes=109582,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=88764k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1225680k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda5 on /home type ext4 (rw,noatime,data=ordered)
/dev/sda6 on /var/log type ext4 (rw,noatime,data=ordered)
root@rpidevuan:/home/groucho#
I have the feeling that I am missing something.
Is this set somewhere else?
Thanks in advance.
Cheers,
A.
Hello:
... the following line in all your ~/.zshrc (or ~/.bashrc perhaps)
function title() { echo -n "\033]0;$1\007"; }
and then use
$ title Bendigo
to change the terminal title.
Changing the prompt (PS1) is another option ...
Thanks to both. =-)
I'll have a look at how these wotk.
In the meanwhile I'll have to be extra carefull.
Cheers,
A.
Hello:
Those who are more savvy than I am in command line work and SSL'ing into other installations probably have been through this.
I am slowly learning to use ssh, which I find quite entertaining but more than once I've 'almost' goofed up and done something in the local terminal instead of the other terminal I had open to a Raspberry Pi also running Devuan ascii.
Is there a way to eg: when I open a ssh connection, have the terminal automatically show something that would differentiate it from a local one.
eg: the title bar or font colours.
I've looked at the terminal configuration settings but found nothing.
Thanks in advance,
A.
Hello:
... not related to the power-supply-USB-problem; it was for seeing whats inside '/proc/config.gz' !
Yes, I know.
What I meant to say was that what I thought was an issue ie: usb-storage.ko not being present was not the problem as it was part of the kernel.
The problem actually being a power supply one.
Thanks for your input.
Cheers,
A.
Hello:
... a
modprobe configs
...
No ...
Here it is:
groucho@rpidevuan:~$ sudo modprobe configs
groucho@rpidevuan:~$
But the issue has been solved.
Problem was a PS thing, long cable with voltage drop.
See my previous post.
Cheers,
A.
Hello:
The important thing is that ...
... it dawned on me that I was being obtuse. =^ 7
After thinking about it a while longer I realised that I had missed an obvious test.
The charger I have seems to be well built, relabeled for local sale so I don't know who makes it.
It is not a switching PS, just 220V Chinese made design, good quality plastic and not at all shoddy like some I others have seen.
But like I mentioned, it is obviously made for the smartphone market.
And one thing that many of these chargers have in common is the rather long cable.
This one in particular has a ~1.00 meter cable hard wired from the charger to the mini USB plug.
On the charger's back, an additional three illuminated USB ports can be found.
Suspecting a voltage drop on the charger's cable I ran one last test.
Raspberry Pi
RPi plugged into charger's USB1 <----- using a different/shorter cable instead of the PS hard wired one.
Drive plugged into RPi's USB1
Power plugged into RPi's USB2
Result: works
So there it is ...
Not the RPi or the charger but the long cable causing a voltage drop.
Conclusion
The RPi on can run a HDD with a 700mA draw (using two USB ports) provided the charger is working properly.
I have not added anything else yet (keyboard, mouse, HDMI cable) but I still have two free USB ports on the charger.
This charger was evidently hindered by the long/small gauge cable.
I'll see if I can figure out how to take it apart without destroying the case to eliminate/shorten the long cable by 60% or replace it with a heavier gauge USB cable.
An example ...
Yes, I have seen that disk start up can be 1.5 to 2.0 x the stated draw on the label.
Usually not advertised in the brochure unless expensive server stuff for IBM, Sun, Dell.
The USB 2.0 Specification ...
Have a look at the link to the RPi power stats.
I've read that the RPi does not follow the power spec too closely if at all.
... Global limitation of 600mA ...
The RPi3+ has a default 600mA global but can be used at 1200mA global with the proper setting in the /boot/config.txt file.
... hard drive that is very very low power ...
The Kingston 120Gb SSD I have my workstation's system on draws 1.0A.
... find a very low power harddrive ...
I once heard of a Western Digital HDD specially made for the RPi.
It had a USB3.0 port instead of the usual SATA but it seems to have been discontinued.
All the 2.5" SATA drives I have come across have a peak draw of 1.0A.
I'm set on using these Samsung HDD because they are just 40Gb and are just short of indestructible.
I used them for years to back up my office/maintenance files and as my storage needs grew, ended up in a drawer.
Now I can use them again as they are perfect for the use I'll give the RPi.
Thanks a lot for your input.
Cheers,
A.
Hello again:
... seems to be compiled in the kernel.
... couldn't check '/proc/config.gz' because its not present.
I see ...
... disk is 2.5"?
Yes.
On your reply, I decided that it would be be a good idea to step back a bit and look at this from the hardware side.
So I ran some additional tests.
All tests are with machines running Devuan ascii 2.0
32-bit version on a netbook / 64-bit version on a WS and the RPi3B+
There are various testing stages:
Stage 1
Netbook
Drive plugged into USB1
Power plugged into USB2
Result: works as expected, properly detected and accesible.
Stage 2
Workstation
Drive plugged into USB1
Power plugged into USB2
Result: works as expected, properly detected and accesible.
Stage 3
Raspberry Pi
Drive plugged into USB1
Power plugged into USB2
Result: does not work
Stage 3-1
Raspberry Pi
Drive plugged into USB1
Power plugged into netbooks' USB1
Result: does not work
Stage 3-2
Raspberry Pi
Drive plugged into USB1
Power plugged into workstation's USB1
Result: does not work
Stage 3-3
Raspberry Pi
Drive plugged into USB1
Power plugged into PS USB charging port
Result: works 8^o!
Great, problem solved but ...
This drive draws ~700mA and probably uses a bit more to start up.
The USB ports in both the netbook and the workstation obviously provide enough power.
ie: Port USB1 + Port USB2 in each machine provide enough power for the drive
Now, if the drive does not work when using power from the workstation/netbook USB ports, it begs the question:
How much power are/voltage the RPi's USB ports providing then?
Obviously less than the 500mA that they should be.
The red light stays on, no indication of a power issue.
The RPi's power supply (says) it is rated at 5.0v 5100mA max, more than the usual 2500/3000mA.
By default, the RPi USB ports are rated at a max global of 600mA but a line in the /boot/config.txt file sets it to 1200mA max.
max_usb_current=1
... could be the same problem I have ...
Don't know if it is the same but it is definitely (like you said) a power supply problem.
I think that the PS I have can probably manage the stated 5100mA but not at a stable 5.0V.
Which is why the drive won't spin.
I think it is a smartphone type charger and those are not necessarily made to put out rock stable 5.0v as they are used to charge 3.8 volt Li-ion/Li-iPo batteries.
I'll have to look for something else.
Thank you very much for you input, you have been most helpful.
Kudos, you had it right from the start. ;^ )
Now I can see about installing the image in the SDD.
Cheers,
A.
Hello tux:
... experiment in the rpi3 with a flash pen drive ...
Let's see:
groucho@rpidevuan:~$ dmesg
[ 1562.439264] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[ 1562.647134] usb 1-1.3: New USB device found, idVendor=0951, idProduct=1665
[ 1562.647349] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1562.647541] usb 1-1.3: Product: DataTraveler 2.0
[ 1562.647665] usb 1-1.3: Manufacturer: Kingston
[ 1562.647782] usb 1-1.3: SerialNumber: 50E549C693551F61991E1D42
[ 1562.649518] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 1562.653027] scsi host0: usb-storage 1-1.3:1.0
[ 1563.699699] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 0000 PQ: 0 ANSI: 4
[ 1563.701152] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1563.703372] sd 0:0:0:0: [sda] 15151168 512-byte logical blocks: (7.76 GB/7.22 GiB)
[ 1563.705501] sd 0:0:0:0: [sda] Write Protect is off
[ 1563.705667] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 1563.707595] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1563.718191] sda: sda1 sda2
[ 1563.726191] sd 0:0:0:0: [sda] Attached SCSI removable disk
groucho@rpidevuan:~$
root@rpidevuan:/home/groucho# sg_map -sd
/dev/sg0 /dev/sda
root@rpidevuan:/home/groucho#
... just in case, to check if it works..
It does.
... sort that out, maybe (if the config is present in the kernel)
groucho@rpidevuan:~$ zgrep -Ei "_USB_STORAGE|_BLK_DEV_SD" /proc/config.gz
gzip: /proc/config.gz: No such file or directory
groucho@rpidevuan:~$
... need that module.
Quite so.
... test with a usb pendrive
See above.
What to do now?
Thanks a lot for your help.
Cheers,
A.
Hello:
... suspect of a power supply problem.
I don't think so.
In my Devuan ascii workstation ...
groucho@devuan:~$ uname -a
Linux devuan 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux
groucho@devuan:~$
groucho@devuan:~$ lsmod | grep -i usb
usb_storage 73728 2 uas
usbserial 49152 1 pl2303
usbhid 53248 0
hid 122880 2 hid_generic,usbhid
usbcore 253952 10 usbhid,usb_storage,ehci_hcd,uhci_hcd,usbserial,xhci_pci,uas,pl2303,xhci_hcd,ehci_pci
scsi_mod 225280 11 aic7xxx,sd_mod,usb_storage,scsi_transport_sas,mptscsih,libata,scsi_transport_spi,uas,sr_mod,sg,mptsas
usb_common 16384 1 usbcore
groucho@devuan:~$
... when I plug the drive in, I get this:
groucho@devuan:~$ sudo dmesg -C
groucho@devuan:~$ sudo dmesg
[ 497.160012] usb 4-6: new high-speed USB device number 6 using ehci-pci
[ 497.313765] usb 4-6: New USB device found, idVendor=05e3, idProduct=0702
[ 497.313769] usb 4-6: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[ 497.313772] usb 4-6: Product: TS0MHDENC
[ 497.313775] usb 4-6: Manufacturer: Transcend
[ 497.314304] usb-storage 4-6:1.0: USB Mass Storage device detected
[ 497.314372] usb-storage 4-6:1.0: Quirks match for vid 05e3 pid 0702: 520
[ 497.314424] scsi host8: usb-storage 4-6:1.0
[ 498.339040] scsi 8:0:0:0: Direct-Access SAMSUNG MP0402H 0811 PQ: 0 ANSI: 0
[ 498.339464] sd 8:0:0:0: Attached scsi generic sg6 type 0
[ 498.340280] sd 8:0:0:0: [sdf] 78242976 512-byte logical blocks: (40.1 GB/37.3 GiB)
[ 498.341520] sd 8:0:0:0: [sdf] Test WP failed, assume Write Enabled
[ 498.342771] sd 8:0:0:0: [sdf] Cache data unavailable
[ 498.342776] sd 8:0:0:0: [sdf] Assuming drive cache: write through
[ 498.355294] sdf: sdf1
[ 498.359398] sd 8:0:0:0: [sdf] Attached SCSI disk
groucho@devuan:~$
... when I attach a 2.5" disk, I see it ...
I see it as /dev/sg6:
groucho@devuan:~$ sudo sg_map -sd
/dev/sg0
/dev/sg1 /dev/sda
/dev/sg2 /dev/sdb
/dev/sg3 /dev/sdc
/dev/sg4 /dev/sdd
/dev/sg5 /dev/sde
/dev/sg6 /dev/sdf <--- here it is
groucho@devuan:~$
... also 'sg_scan -i' ...
I also see it there:
groucho@devuan:~$ sudo sg_scan -i
/dev/sg0: scsi1 channel=0 id=0 lun=0 [em]
TSSTcorp CDDVDW SH-222AB SB00 [rmb=1 cmdq=0 pqual=0 pdev=0x5]
/dev/sg1: scsi5 channel=0 id=0 lun=0 [em]
ATA KINGSTON SV300S3 BBF0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg2: scsi7 channel=0 id=0 lun=0
IBM-ESXS VPBA073C3ETS11 N A496 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg3: scsi7 channel=0 id=1 lun=0
SEAGATE ST3300555SS T107 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg4: scsi7 channel=0 id=2 lun=0
IBM-ESXS GNA073C3ESTT0Z N BH0D [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg5: scsi7 channel=0 id=3 lun=0
ATA SEAGATE ST32500N 3AZQ [rmb=0 cmdq=1 pqual=0 pdev=0x0]
/dev/sg6: scsi8 channel=0 id=0 lun=0 [em]
SAMSUNG MP0402H 0811 [rmb=0 cmdq=0 pqual=0 pdev=0x0] <---- here it is
groucho@devuan:~$
So I think we can rule out any power supply related issues.
The Transcend TS0MHDENC controller (05e3 pid 0702: 520) has ID 05e3:0702 and uses the GL811E chip made by Genesys Logic, which is supported in the Debian kernel through the usb-storage module.
Si it would seem that the problem is that the needed module is not part of the image.
Is there a way to load it or a driver?
Thanks a lot for your input.
Cheers,
A.
Hello:
... insert the drives ...
... with the 5v ...
... what you get with 'dmesg' ?
I have to check again, see below.
... the module was not compiled ....
Yes, I think you're right.
Support was not compiled into the kernel.
modinfo usb-storage
It confirms that usb-storage is not in the system:
groucho@rpidevuan:~$ sudo modinfo usb-stotage
[sudo] password for groucho:
modinfo: ERROR: Module usb-stotage not found.
groucho@rpidevuan:~$ find /lib/modules -name \*usb-storage\*.ko
groucho@rpidevuan:~$
This si a config for sub-storage, on kernel 5.4.x:
[
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_REALTEK=m
CONFIG_REALTEK_AUTOPM=y
CONFIG_USB_STORAGE_DATAFAB=m
CONFIG_USB_STORAGE_FREECOM=m
CONFIG_USB_STORAGE_ISD200=m
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_STORAGE_SDDR09=m
CONFIG_USB_STORAGE_SDDR55=m
CONFIG_USB_STORAGE_JUMPSHOT=m
CONFIG_USB_STORAGE_ALAUDA=m
CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
CONFIG_USB_STORAGE_ENE_UB6250=m
CONFIG_USB_UAS=m
... the SCSI sg driver..
It is part of sg3_utils
Just installed it.
--- snip ---
The following NEW packages will be installed:
libsgutils2-2 sg3-utils
--- snip ---
Added it to /etc/modules and rebooted:
groucho@rpidevuan:~$ lsmod
Module Size Used by
ipv6 516096 24
sg 36864 0
brcmfmac 274432 0
brcmutil 16384 1 brcmfmac
sha256_generic 20480 0
cfg80211 741376 1 brcmfmac
rfkill 32768 1 cfg80211
snd_bcm2835 40960 0
snd_pcm 126976 1 snd_bcm2835
snd_timer 36864 1 snd_pcm
snd 90112 3 snd_timer,snd_bcm2835,snd_pcm
sdhci_iproc 16384 0
vchiq 352256 1 snd_bcm2835
uio_pdrv_genirq 16384 0
uio 24576 1 uio_pdrv_genirq
groucho@rpidevuan:~$
This is dmesg with the sg module loaded:
groucho@rpidevuan:~$ dmesg | grep -i "error\|warning\|fail\|segfault\|fatal"
[ 0.812942] Error: Driver 'sdhost-bcm2835' is already registered, aborting...
[ 2.421514] random: 3 urandom warning(s) missed due to ratelimiting
[ 2.846463] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 2.852017] cfg80211: failed to load regulatory.db
groucho@rpidevuan:~$
groucho@rpidevuan:~$ dmesg | grep -i usb
[ 0.104319] usbcore: registered new interface driver usbfs
[ 0.104417] usbcore: registered new interface driver hub
[ 0.104568] usbcore: registered new device driver usb
[ 0.303073] usbcore: registered new interface driver lan78xx
[ 0.305142] usbcore: registered new interface driver smsc95xx
[ 0.770854] dwc_otg 3f980000.usb: DWC OTG Controller
[ 0.772811] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 0.774815] dwc_otg 3f980000.usb: irq 9, io mem 0x00000000
[ 0.780952] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.782967] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.784977] usb usb1: Product: DWC OTG Controller
[ 0.786941] usb usb1: Manufacturer: Linux 4.16.14-v8+ dwc_otg_hcd
[ 0.788925] usb usb1: SerialNumber: 3f980000.usb
[ 0.791621] hub 1-0:1.0: USB hub found
[ 0.796676] usbcore: registered new interface driver usb-storage
[ 0.823327] usbcore: registered new interface driver usbhid
[ 0.825439] usbhid: USB HID core driver
[ 1.203380] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.394850] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[ 1.397220] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.400429] hub 1-1:1.0: USB hub found
[ 1.687369] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.777885] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[ 1.780230] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.783450] hub 1-1.1:1.0: USB hub found
[ 2.663363] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg
[ 2.754116] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[ 2.756640] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.971360] usbcore: registered new interface driver brcmfmac
groucho@rpidevuan:~$
No USB related errors and drive not detected/recognised.
ie: idVendor=05e3, idProduct=0702
Thanks in advance,
A.
Hello:
There are there arm64 devuan images for rpi3
Yes, I have installed the one I pointed out in my OP.
groucho@rpidevuan:~$ uname -a
Linux rpidevuan 4.16.14-v8+ #1 SMP PREEMPT Tue Jun 5 18:50:10 CEST 2018 aarch64 GNU/Linux
groucho@rpidevuan:~$
Till I get my cable/adaptor, I have managed to learn some SSH and am working on my RPi ascii from my Devuan ascii workstation.
Reminds me of my long gone DOS 5.0 days.
But ...
I need to have the usb-storage module loaded so as to be able to use my external usb drives with the RPi, but it seems that it's not part of the image.
groucho@rpidevuan:~$ lsmod | grep usb
groucho@rpidevuan:~$
groucho@rpidevuan:~$ lsmod
Module Size Used by
sg 36864 0
ipv6 516096 24
brcmfmac 274432 0
brcmutil 16384 1 brcmfmac
sha256_generic 20480 0
cfg80211 741376 1 brcmfmac
rfkill 32768 1 cfg80211
snd_bcm2835 40960 0
snd_pcm 126976 1 snd_bcm2835
snd_timer 36864 1 snd_pcm
snd 90112 3 snd_timer,snd_bcm2835,snd_pcm
sdhci_iproc 16384 0
vchiq 352256 1 snd_bcm2835
uio_pdrv_genirq 16384 0
uio 24576 1 uio_pdrv_genirq
groucho@rpidevuan:~$
And seems that it cannot/will not be installed.
root@rpidevuan:/home/groucho# modprobe usb-storage
root@rpidevuan:/home/groucho# lsmod | grep usb
root@rpidevuan:/home/groucho# lsmod
Module Size Used by
sg 36864 0
ipv6 516096 24
brcmfmac 274432 0
brcmutil 16384 1 brcmfmac
sha256_generic 20480 0
cfg80211 741376 1 brcmfmac
rfkill 32768 1 cfg80211
snd_bcm2835 40960 0
snd_pcm 126976 1 snd_bcm2835
snd_timer 36864 1 snd_pcm
snd 90112 3 snd_timer,snd_bcm2835,snd_pcm
sdhci_iproc 16384 0
vchiq 352256 1 snd_bcm2835
uio_pdrv_genirq 16384 0
uio 24576 1 uio_pdrv_genirq
root@rpidevuan:/home/groucho#
Is there a way around this problem?
Edit:
I have been running some tests.
1.
The drives draw 700mA and work perfectly well in both my workstation and netbook running Devuan ascii but only using the provided power cable.
ie: a second USB cable to give +5.00v through an ad hoc plug. I have two of them and both exhibit the same behaviour.
2.
The drives' controller chipset is identified by lsusb as ID 05e3:0702 Genesys Logic, Inc. USB 2.0 IDE Adapter [GL811E], which is supported by the kernel using the usb-storage module. I guess it makes sense that they are not recognised as the needed module is not present. (?)
3.
My two other external HDDs (USB3.0) work without issue on the RPi3B+3 but the controllers use another chipset identified as ID 043e:70f5 LG Electronics USA, Inc. External HDD.
They are 500Gb USB3, not much sense to use them with my RPi.
Thanks in advance.
A.
Hello:
... alpine linux has ready images for raspi3 ...
While looking around for information regarding Alpine Linux, I came across this.
Alpine Raspberry PI
This is a system install of Alpine linux for Raspberry Pi 3B, 3B+ and 4 image ready to burn to an SD card via balenaEtcher
(there's no need to gunzip image).
The image automatically setup and configures:
root user [pwd: raspberry]
pi user [pwd: raspberry]
ethernet
wifi (edit wpa_supplicant.conf in the boot partition, on first boot it will be copied)
bluetooth
avahi
swap
openssh server
root partition auto-expand on first boot
I'll give it a try as it seems to be quite straightforward.
Cheers,
A.
Hello:
... could not tell you differences in the images hosted ...
I see.
... spend a some time educating yourself ...
Indeed ...
That's what I am doing with/in Devuan, where I arrived after a few years of going through a few of the mainline Linux distributions, both *.deb and *.rpm based.
But I have to draw a line somewhere as I am not a software chap, more a hardware one.
Tech support helped me make a living when my degree in architecture would not.
Reasonably well educated (for what I needed) in *.bat files, I'm still struggling with understanding bash scripts and the language, so the idea of even attempting to tackle a sdk is remote.
... images for raspi3 and instructions to create said images with a persistent installation.
Thanks for the heads up.
I'll have a look at them.
... for systemd free ...
... alpine linux might trump devuan ...
Thanks, but I am set on staying with Devuan the same way I was set on staying with Debian till systemd reared its head.
I always say that it reminds me of the registry virus inside Windows OSs, with which I dealt for quite a long time.
Thanks a lot for your input.
Cheers,
A.
Hello:
... should have pointed the link to the correct sdk ...
No problem.
From what I have read, it's well over my head at the moment.
... try the arm-sdk tommorow when i have some spare time up my sleeve.
Thanks.
No hurry.
The local postal service is usually quite lacking and the CV quarantine has only made things worse.
As a result, the whole of my RPi3B+ kit has been stuck for almost a week at the city's mail distribution centre.
All three packages.
This will build you a image for use on a rpi3
That would be great.
Thanks a lot.
Q: Would this one be different than the one available here?
ie:
devuan_ascii_2.0.0_arm64_raspi3.img.xz 06-Jun-2018 11:28 153M
If it is more or less the same, I would not want you to bother if that *.img works just as well.
I have been reading some posts here regarding Devuan ascii on the RPi+B+ and it seems that (save the image files) there's no other option at the moment.
We'll just have to wait and see if there's interest in generating an installer.
In the meantime we have parazyd's great work uploading the RPi images.
All Devuan/RPi users owe him a big Thank You.
My RPi3B+ will be (almost) exclusively dedicated to running a 64-bit coffee roasting application (Artisan-Scope v2.12) for which 32-bit support was ended at v1.1.
My Asus 2Gb 1000HE (Atom N280) struggles with it and although the souce is available, it would not make sense to build a v2.12 32-bit as it would probably run much slower than v1.1.
Only maintenance, networking or WiFi printing, some basic image viewer + basic OpenBox would be installed so that all the RPi's remaining resources go to running the roasting software.
I'll most probably have to use the Raspbian downloaded from raspberripi.org, put up with systemd and see how to streamline it as much as possible till someone builds an ARM64 installer.
Thanks a lot for your input.
Cheers,
A.