LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 12-24-2021, 01:30 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
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:
  1. sdcard on /dev/mmcblk0 booted the image.
  2. 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:
  1. 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.
  2. fsck on the partition which of course was fine.
  3. 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'
  4. Removed the "errors=remount,ro" from the / mount options in /etc/fstab. No change.
  5. 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.
 
Old 12-25-2021, 04:30 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823

Rep: Reputation: Disabled
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(?).
 
Old 12-25-2021, 05:57 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Original Poster
Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
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.
 
Old 12-26-2021, 04:05 AM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: One main distro, & some smaller ones casually.
Posts: 5,823

Rep: Reputation: Disabled
Personally, I am using either RaspiOS or Devuan, (without problems), so it may be a quirk with the way Slackware boots up.
 
Old 12-26-2021, 08:18 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Original Poster
Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
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.
 
Old 01-03-2022, 12:22 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Original Poster
Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
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.
 
Old 01-03-2022, 05:37 PM   #7
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 628

Rep: Reputation: 229Reputation: 229Reputation: 229
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.
 
Old 01-04-2022, 03:54 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Original Poster
Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
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.
 
Old 01-05-2022, 11:39 AM   #9
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 628

Rep: Reputation: 229Reputation: 229Reputation: 229
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/
 
Old 01-05-2022, 01:10 PM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,413

Original Poster
Rep: Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590Reputation: 2590
Thank you for pointing that out. No audio here, & no support except well meaning newbies.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
find files with at least read and write for user but not write for group (on Mac OS X) davedpss Other *NIX 11 09-09-2013 04:19 PM
read/write,write/write lock with smbclient fails swatidas11 Linux - Networking 1 03-10-2010 12:27 PM
bash and delayed write / write is not in sync Marko Hyvärinen Programming 9 06-12-2009 12:12 PM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 09:22 PM
i can't write message to someone..with 'write' doublefailure Linux - General 1 09-19-2002 05:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration