Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-24-2021, 01:30 PM
|
#1
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
|
To Write, or Not to Write
I made a living for 17 years as a hardware geek. Now I'm looking for help.
The Raspberry Pi 4 boots off sdcard, then usb. I had an ssd with Debian (RPi OS), but the audio kept going and it was unfixable, and the OS is messy (systemd) and basically unsupported. So I inslalled Slarm64 (= Slackware64 compiled for Armv8), familiar and well supported. Results: - sdcard on /dev/mmcblk0 booted the image.
- USB key booted the image when configured for sda instead of mmcblk0.
In each case, they booted directly into X. But my ssd, which has an rsync of the (working) usb key refuses to mount / rw. So I get a string of "Read only filesystem" errors, and X won't boot. I tried the following: - Line 324 of rc.S (/sbin/init's first script run) has the line
Code:
/sbin/mount -f -w /
which I commented out and replaced with
Code:
/sbin/mount -f -o remount,rw /
but that made no change, so I restored the original.
- fsck on the partition which of course was fine.
- When it comes up in level 4, it's trying to boot X on tty1.I pressed Ctrl_C on tty3, logged in as root and tried remounting / with the standard remount line (above). Then I checked as root the output of the 'mount' command, which clearly showed sda2 on / as rw. But 'touch file' in root's homedir resulted in a "Read Only filesystem' error'

- Removed the "errors=remount,ro" from the / mount options in /etc/fstab. No change.
- Checked the usb key again, in case my memory was playing tricks. It boots fine, mounts / rw and X works.
This has been a long battle with a rash of usb/sdcard failures in the middle, so all hardware is new or nearly new.
I even rsync'ed off the 120G of media, repartitioned the drive changing partition size just in case, and rsync'ed the media back. I still had the problem. Now if I boot to runlevel 3, and log in log in as root, I can usually run
Code:
mount -o remount,rw /dev/sda2 /
and then boot X. But the usb key with the identical files boots X straight away. Each appears as sda. Can anyone think of a sane (or insane!) reason why this is going on? I can't change drive caddies atm until I get help, because I'm disabled.
|
|
|
12-25-2021, 04:30 AM
|
#2
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823
Rep: 
|
USB booting from external SSD, (& in some cases, HDD), can often be put down to the chip used in the drive case/converter cable.
Asmedia seem to work, not sure what mine use, but mine all work OK.
I suspect it is the chip being used that is causing your problems.
Maybe going back to booting up on an SDcard & transferring to the root of the drive will work for you(?).
|
|
|
12-25-2021, 05:57 AM
|
#3
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
Original Poster
|
IME, either usb-sata chips pass through commands and data, or they don't. No straining top speed here.
I've ended up at the difference between booting a PC and booting a RazPi. Not helping is the cheapskate nature of the RazPi hardware. I set to runlevel 3 (multiuser console mode) and logged in as root. [BTW, sda2 = /] - At this stage, the 'mount' command shows / as "(ro,noatime,nodiratime,data=writeback,errors=remount,ro)". But the "errors-remount,ro" is not in/etc/fstab

- I issued 'mount -o remount,rw /' and the mount command showed sda2 as rw with the other options
- I tested it, and it was still ro, although showed / as rw.
- cat /proc mounts showed no sda2 and no / mounted

- But sda3, which is on /home, remounts fine and is read/write.
|
|
|
12-26-2021, 04:05 AM
|
#4
|
LQ Guru
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823
Rep: 
|
Personally, I am using either RaspiOS or Devuan, (without problems), so it may be a quirk with the way Slackware boots up.
|
|
|
12-26-2021, 08:18 AM
|
#5
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
Original Poster
|
Yes, it could be the way Slackware boots.
In going through /etc/rc.d/rc.S in the slackware init, I found it singularly useless for doing the needful on the Pi, as it's set up for all sorts of conditions that never occur on the Pi. There's a slavish compatibility to original PC slackware being taken by the 2 teams attempting it atm.
Slackware Arm has a 32bit version but does the DVD type offering, which does the setup via the initial (separately disttributed) initial boot system & initrd and is hugely messy to set up. The 32bit has the nod from Pat to call themselves 'official.' They are compiling a 64bit version, due out this summer.
Slarm64 covers many more Arm SBCs and went straight to 64bit. They do binary images which you just dd on. You get a boot & / partition, but you need to enlarge the /.
Low priority plans are to comment out loads of <expletive> in rc.S and see if that helps. There's loads in that script which doesn't need to be there, and weird things like that from runlevel 3, / is read only.
Code:
mount -o remount,rw /dev/sda2 /
does nothing but
Code:
mount -f -o remount,rw /dev/sda2 /
succeeds, but offers no error. If I put that in rc.S, however, it fails. 
Last edited by business_kid; 12-26-2021 at 08:20 AM.
|
|
|
01-03-2022, 12:22 PM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
Original Poster
|
Well, I'll put a postscript on this and mark it solved.
It's difficult for me to faultfind, because the system uses these tiny fonts scrolling up the screen at speed. Slackware's /etc/inittab looks like this:
Code:
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11/Wayland with SDDM/KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S
# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
[SNIP!]
It may have some BSD influences there. Now rc.S is where / is being mounted, and on my particular SSD, it isn't mounting I tried most things, including peppering rc.S with messages & wait statements and discovered rc.S is not being run from my ssd. No problem on an sdcard.
So I'm going to use sdcards, because I'm fed up playing with it. Reboots are not that regular anyhow. As an invalid, doing stuff gets a lot messier. So I'll burn up one sdcard and look about for decent alternatives.
|
|
|
01-03-2022, 05:37 PM
|
#7
|
Member
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 628
|
You could just run directly off the external SSD and just use latest PI OS. I have a PI 400, and three RPI 4s configured this way and they all run flawlessly. One is using a Samsung T5 500G drive, another a T7 500G, the other two use older SATA SSDs with SATA to USB 3.0 cables. No SD cards needed. Note that older PI-4s need to run the eeprom update so you can boot off external USB drives. To do that prepare an SD card with latest PI OS, then run the 'update' from a command prompt (see url below on how to do that). After that you should be able to just install latest PI OS image on SSD and go without SD card.
https://jamesachambers.com/raspberry...ecovery-guide/
Last edited by rclark; 01-03-2022 at 05:46 PM.
|
|
|
01-04-2022, 03:54 AM
|
#8
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
Original Poster
|
Bullseye?I was using RPi OS.
I get no sound as soon as I update (32 or 64 bit) or after a short time if I don't update. Everything is perfect - firmware, config, etc. Support is non existent. I need sound.
I traced this as far as it not running rc.S in Slarm64. But for love or money, I can't make that happen.
Last edited by business_kid; 01-04-2022 at 03:58 AM.
|
|
|
01-05-2022, 11:39 AM
|
#9
|
Member
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 628
|
Quote:
Bullseye?I was using RPi OS.
|
The latest PI OS is based on latest Debian Bullseye. Bullseye is just the 'name' that give to each released version like Debian Jesse, Stretch, and now Bullseye.
See: https://www.raspberrypi.com/news/ras...bian-bullseye/
|
|
|
01-05-2022, 01:10 PM
|
#10
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413
Original Poster
|
Thank you for pointing that out. No audio here, & no support except well meaning newbies.
|
|
|
All times are GMT -5. The time now is 04:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|