Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-23 Thread Rod Rodolico
FYI, I had a similar problem booting from a USB drive on an old Debian
machine a long time ago. May have been Wheezy, or ever Sarge.

The problem in my case was that the kernel was taking a while to settle
the USB module, so at the early boot stage, it "knew" it was supposed to
mount the USB drive, but it did not yet know the USB drive. If I
remember correctly, I had to build a custom initrd with a script that
simply forced the load of USB, then waited until it was able to detect
the USB drive in question.

Sorry, it was a long time ago, and I did not write it up as I try to do
now. But, I vaguely remember inserting a script that simply insmod'd the
module(s), then went into a loop which only exited after a certain
amount of time, or if the USB drive was detected. Then, I just let the
regular boot process to continue.

Again, relying on memory, it seems the USB drivers take a finite amount
of time to settle and actually be ready to work, and that time is
variable depending on the device and the system. May be a total wild
goose chase, but the problem you're having sounds similar.

NOTE: it slowed my boot time significantly, but since it was a server,
an additional 15 seconds did not matter so long as it came up. I THINK I
was trying to do a RAID-1 for / from the USB drives, but that may have
been a different time.

Rod

Am 2020-06-12 20:25, schrieb richard lucassen:
> Try to add "nofail" or "noauto":

nofail was a good hint. Now the system boots, but the usb disk is still
not mounted. "mount -a" mounts it without errors after boot.

I see no errors in /var/log/boot and dmesg.

The only messages concerning this drive:

[4.153932] scsi 0:0:0:0: Direct-Access WD   Elements 25A3
 1021 PQ: 0 ANSI: 6
[4.159536] sd 0:0:0:0: [sda] Spinning up disk...
[4.161466] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   22.522458] sd 0:0:0:0: [sda] Very big device. Trying to use READ
CAPACITY(16).
[   22.524863] sd 0:0:0:0: [sda] 19532808192 512-byte logical blocks:
(10.0 TB/9.09 TiB)
[   22.532067] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   22.538598] sd 0:0:0:0: [sda] Write Protect is off
[   22.541988] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[   22.542724] sd 0:0:0:0: [sda] No Caching mode page found
[   22.547320] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   22.554350] sd 0:0:0:0: [sda] Very big device. Trying to use READ
CAPACITY(16).
[   22.983388]  sda: sda1
[   22.984576] sd 0:0:0:0: [sda] Very big device. Trying to use READ
CAPACITY(16).
[   22.989231] sd 0:0:0:0: [sda] Attached SCSI disk
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-15 Thread richard lucassen via Dng
On Mon, 15 Jun 2020 13:15:57 +0100
g4sra via Dng  wrote:

> > No need IMHO, it was the core issue...
> 
> So you have solved the issue, great!

Nope, we found a Quick and Dirty workaround

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-15 Thread g4sra via Dng
On 15/06/2020 12:59, richard lucassen via Dng wrote:
> On Mon, 15 Jun 2020 12:48:16 +0100
> g4sra via Dng  wrote:
> 
 How do you know the mount is failing ?
>>>
>>> It's not mounted after mount command.
>>
>> I have not seen any evidence of that, can you point me to it please.
> 
> No need IMHO, it was the core issue...
> 

So you have solved the issue, great!
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-15 Thread richard lucassen via Dng
On Mon, 15 Jun 2020 12:48:16 +0100
g4sra via Dng  wrote:

> >> How do you know the mount is failing ?
> > 
> > It's not mounted after mount command.
> 
> I have not seen any evidence of that, can you point me to it please.

No need IMHO, it was the core issue...

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-15 Thread g4sra via Dng
On 15/06/2020 05:33, J. Fahrner via Dng wrote:
> Am 2020-06-14 22:54, schrieb g4sra via Dng:
>> How do you know the mount is failing ?
> 
> It's not mounted after mount command.

I have not seen any evidence of that, can you point me to it please.


> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-15 Thread spiralofhope
On Mon, 15 Jun 2020 06:31:40 +0200
"J. Fahrner"  wrote:

It looks to me like your drive is in good health and supports (and
uses) all the good health features.

As the other poster suggested, using another drive to troubleshoot may
still be useful, but your drive appears fundamentally good.


--


optional:


> No self-tests have been logged.  [To run self-tests, use: smartctl -t]

FYI, and I don't think this is important because the other automated
self-checks passed, but if you ever want to do manual testing, you
could do:

A conveyance test is if you move it around a lot (it's USB after all)
and maybe drop it and want to check it quickly. This might not be
supported:
smartctl -t conveyance /dev/xxx

This is quite quick (minutes):
smartctl -t short /dev/xxx

If you have time (probably overnight, and I don't believe USB speed
matters):
smartctl -t long /dev/xxx

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 22:54, schrieb g4sra via Dng:

How do you know the mount is failing ?


It's not mounted after mount command.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-15 05:11, schrieb spiralofhope:

I wonder if there's anything S.M.A.R.T. information can tell you.

There is a spinup time test, and I wonder if perhaps there is SMART
logging within the drive that could reveal a problem with the drive not
spinning up as quickly as it should, and maybe that is causing a
problem (somehow).


=== START OF INFORMATION SECTION ===
Model Family: WDC HGST Ultrastar He10
Device Model: WDC WD100EMAZ-00WJTA0
Serial Number:1EGNK46Z
LU WWN Device Id: 5 000cca 27ec957bf
Firmware Version: 83.H0A83
User Capacity:10.000.831.348.736 bytes [10,0 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate:5400 rpm
Form Factor:  3.5 inches
Device is:In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:Mon Jun 15 06:23:41 2020 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: 
Enabled.
Self-test execution status:  (   0) The previous self-test routine 
completed
without error or no self-test 
has ever

been run.
Total time to complete Offline
data collection:(   93) seconds.
Offline data collection
capabilities:(0x5b) SMART execute Offline immediate.
Auto Offline data collection 
on/off support.
Suspend Offline collection upon 
new

command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test 
supported.

Selective Self-test supported.
SMART capabilities:(0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:(0x01) Error logging supported.
General Purpose Logging 
supported.

Short self-test routine
recommended polling time:(   2) minutes.
Extended self-test routine
recommended polling time:(1159) minutes.
SCT capabilities:  (0x003d) SCT Status supported.
SCT Error Recovery Control 
supported.

SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE  
UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate 0x000b   100   100   016Pre-fail  Always 
  -   0
  2 Throughput_Performance  0x0004   130   130   054Old_age   
Offline  -   110
  3 Spin_Up_Time0x0007   194   194   024Pre-fail  Always 
  -   328 (Average 350)
  4 Start_Stop_Count0x0012   100   100   000Old_age   Always 
  -   394
  5 Reallocated_Sector_Ct   0x0033   100   100   005Pre-fail  Always 
  -   0
  7 Seek_Error_Rate 0x000a   100   100   067Old_age   Always 
  -   0
  8 Seek_Time_Performance   0x0004   128   128   020Old_age   
Offline  -   18
  9 Power_On_Hours  0x0012   100   100   000Old_age   Always 
  -   4610
 10 Spin_Retry_Count0x0012   100   100   060Old_age   Always 
  -   0
 12 Power_Cycle_Count   0x0032   100   100   000Old_age   Always 
  -   393
 22 Helium_Level0x0023   100   100   025Pre-fail  Always 
  -   100
192 Power-Off_Retract_Count 0x0032   100   100   000Old_age   Always 
  -   561
193 Load_Cycle_Count0x0012   100   100   000Old_age   Always 
  -   561
194 Temperature_Celsius 0x0002   180   180   000Old_age   Always 
  -   36 (Min/Max 12/48)
196 Reallocated_Event_Count 0x0032   100   100   000Old_age   Always 
  -   0
197 Current_Pending_Sector  0x0022   100   100   000Old_age   Always 
  -   0
198 Offline_Uncorrectable   0x0008   100   100   000Old_age   
Offline  -   0
199 UDMA_CRC_Error_Count0x000a   200   200   000Old_age   Always 
  -   0


SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No 

Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread spiralofhope
On Fri, 12 Jun 2020 17:01:14 +0200
"J. Fahrner via Dng"  wrote:

> When this disk is active in /etc/fstab the boot process hangs
> forever.

I wonder if there's anything S.M.A.R.T. information can tell you.

There is a spinup time test, and I wonder if perhaps there is SMART
logging within the drive that could reveal a problem with the drive not
spinning up as quickly as it should, and maybe that is causing a
problem (somehow).

Keep in mind that not all USB docks will properly support SMART.

--

This may sound dumb, but does the drive _sound_ different when first
powered with the system, and does the sound change when it is mounted?
Does it sound like it's "waking up" only when you manually mount it?
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread Simon Hobson
J. Fahrner via Dng  wrote:

> I don't see why this parameter is so important. When I read the description, 
> this is the delay for scanning usb devices after power up. But as you can see 
> in the logs, the device is responding and telling its characteristics. Only 
> mounting the filesystem fails.

As I've read the thread, the delay is between querying the USB bus for devices 
and trying to read from them. In your case, the device is been seen on the bus, 
but the mount fails - one possible cause of that is that the USB bridge device 
and/or disk are not ready in time, i.e. that the chippery and/or disk between 
them are not read to read data within 5s (if that's the default) of the devices 
being enumerated.
So changing this parameter is to see if giving a longer time between 
enumerating the devices on the bus (at which point, the chippery and disk 
should initialise and spin up) and actually trying to read form the disk. If it 
does, great; if it doesn't then there's a different problem.

> A smaller disk is no option, since this is my media server at home. It is 
> filled with 66%.

I think the idea was simply to try a smaller disk and see if that works. It's 
all in an effort to narrow down the list of possible causes - e.g. if it still 
won't mount then it being a big disk isn't the problem; if it does mount then 
at least you know it's not the USB chippery in the drive case.
At present, there are a lot of possible causes, which makes fixing the problem 
tricky.


Simon

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 21:49:50 +0200
"J. Fahrner via Dng"  wrote:

> > And an earlier suggestion to copy important things to a smaller disk
> > and use that disk, does that probably solve the issue?
> 
> A smaller disk is no option, since this is my media server at home.
> It is filled with 66%.

I meant just to find out if a smaller disk was mounting correctly.

> My mount scripts seem to work around this problem, so I give up in 
> further investigating what is happening.

Ok, I understand that you get moreorless crazy of this issue.
Fortunately the nofail option brought you a bit further.

HAND

R.

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread g4sra via Dng

-- snip --
> Only mounting the filesystem fails.

How do you know the mount is failing ?

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 21:25, schrieb richard lucassen via Dng:

Ok, I missed that, sorry. Maybe 5 is too low, try 10 or 15 I'd say.


I don't see why this parameter is so important. When I read the 
description, this is the delay for scanning usb devices after power up. 
But as you can see in the logs, the device is responding and telling its 
characteristics. Only mounting the filesystem fails.



And an earlier suggestion to copy important things to a smaller disk
and use that disk, does that probably solve the issue?


A smaller disk is no option, since this is my media server at home. It 
is filled with 66%.


My mount scripts seem to work around this problem, so I give up in 
further investigating what is happening.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 20:48, schrieb richard lucassen:

What happens if you change the content of that script:

#!/bin/dash
echo 5 > /sys/module/usb_storage/parameters/delay_use


For what reason? I had it in /boot/boot.ini and that worked. I looked up 
/sys/module/usb_storage/parameters/delay_use and it was 5. But did not 
change my mount problem.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 20:31:22 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-14 20:07, schrieb d...@d404.nl:
> > It is a kernel parameter not a module parameter. You have to add it
> > to your kernel boot line.
> 
> Ok, I found out how to do that. It's in /boot/boot.ini
> But that made no difference to my problem.
> 
> This is my current setup:
> /etc/fstab has the mount option nofail, so the boot does not hang on 
> mountall.
> 
> I have a additional init script mounthdd:

What happens if you change the content of that script:

#!/bin/dash
echo 5 > /sys/module/usb_storage/parameters/delay_use

in a script /etc/rcS.d/00test.sh, just for test, normally you must set
a link.

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 20:07, schrieb d...@d404.nl:

It is a kernel parameter not a module parameter. You have to add it to
your kernel boot line.


Ok, I found out how to do that. It's in /boot/boot.ini
But that made no difference to my problem.

This is my current setup:
/etc/fstab has the mount option nofail, so the boot does not hang on 
mountall.


I have a additional init script mounthdd:

# Provides:  hdd
...
if mountpoint -q /hdd
then
  echo 'HDD is already mounted'
else
  echo 'HHD is not mounted'
  mount /hdd
  /usr/local/bin/wait4hdd
fi

and the wait4hdd script:

#!/bin/sh
while ! mountpoint -q /hdd
do
  echo "Waiting for hdd"
  sleep 10
  mount /hdd
done

Now the following messages in /var/log/boot:

Thu Jan  1 01:00:18 1970: HHD is not mounted
Thu Jan  1 01:00:18 1970: Waiting for hdd
Sun Jun 14 20:19:24 2020: Waiting for hdd

Success after several tries.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 19:51, schrieb Tomasz Torcz:

  Try files in /sys/module/usb_storage/parameters
Or you can put in kernel command line: usb_storage.parameter=…
as described at
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html


Something is wrong her:

root@Odroid2:~# modprobe usb_storage delay_use=3
root@Odroid2:~# cat /sys/module/usb_storage/parameters/delay_use
5

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread d...@d404.nl
On 14-06-2020 19:46, J. Fahrner via Dng wrote:
> Am 2020-06-14 19:39, schrieb d...@d404.nl:
>> Most likely the usb_storage module is compiled in the kernel.
>
> How can I set its parameters in this case?
> sysctl -a lists nothing about storage or usb. 


From what i am able to find the kernel parameter:

    usb-storage.delay_use=

[UMS] The delay in seconds before a new device is scanned for Logical
Units (default 5).


Grtz.

Nick




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread Tomasz Torcz
On Sun, Jun 14, 2020 at 07:46:57PM +0200, J. Fahrner via Dng wrote:
> Am 2020-06-14 19:39, schrieb d...@d404.nl:
> > Most likely the usb_storage module is compiled in the kernel.
> 
> How can I set its parameters in this case?

  Try files in /sys/module/usb_storage/parameters
Or you can put in kernel command line: usb_storage.parameter=…
as described at
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html

-- 
Tomasz Torcz “God, root, what's the difference?”
to...@pipebreaker.pl   “God is more forgiving.”

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 19:39, schrieb d...@d404.nl:

Most likely the usb_storage module is compiled in the kernel.


How can I set its parameters in this case?
sysctl -a lists nothing about storage or usb.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread d...@d404.nl
On 14-06-2020 19:36, J. Fahrner via Dng wrote:
> Am 2020-06-14 19:30, schrieb richard lucassen:
>> What tells "modinfo g_mass_storage"?
>
> $ sudo modinfo g_mass_storage
> filename:  
> /lib/modules/3.16.82+/kernel/drivers/usb/gadget/g_mass_storage.ko
> license:    GPL
> author: Michal Nazarewicz
> description:    Mass Storage Gadget
> depends:    usb_f_mass_storage,libcomposite
> intree: Y
> vermagic:   3.16.82+ SMP preempt mod_unload aarch64
> parm:   idVendor:USB Vendor ID (ushort)
> parm:   idProduct:USB Product ID (ushort)
> parm:   bcdDevice:USB Device version (BCD) (ushort)
> parm:   iSerialNumber:SerialNumber string (charp)
> parm:   iManufacturer:USB Manufacturer string (charp)
> parm:   iProduct:USB Product string (charp)
> parm:   file:names of backing files or devices (array of charp)
> parm:   ro:true to force read-only (array of bool)
> parm:   removable:true to simulate removable media (array of
> bool)
> parm:   cdrom:true to simulate CD-ROM instead of disk (array
> of bool)
> parm:   nofua:true to ignore SCSI WRITE(10,12) FUA bit (array
> of bool)
> parm:   luns:number of LUNs (uint)
> parm:   stall:false to prevent bulk stalls (bool)
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

g_mass_storage is used in usb otg mode where the system mimicks a usb
gadget. Most likely the usb_storage module is compiled in the kernel.


Grtz.

Nick



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 19:30, schrieb richard lucassen:

What tells "modinfo g_mass_storage"?


$ sudo modinfo g_mass_storage
filename:   
/lib/modules/3.16.82+/kernel/drivers/usb/gadget/g_mass_storage.ko

license:GPL
author: Michal Nazarewicz
description:Mass Storage Gadget
depends:usb_f_mass_storage,libcomposite
intree: Y
vermagic:   3.16.82+ SMP preempt mod_unload aarch64
parm:   idVendor:USB Vendor ID (ushort)
parm:   idProduct:USB Product ID (ushort)
parm:   bcdDevice:USB Device version (BCD) (ushort)
parm:   iSerialNumber:SerialNumber string (charp)
parm:   iManufacturer:USB Manufacturer string (charp)
parm:   iProduct:USB Product string (charp)
parm:   file:names of backing files or devices (array of charp)
parm:   ro:true to force read-only (array of bool)
parm:   removable:true to simulate removable media (array of 
bool)
parm:   cdrom:true to simulate CD-ROM instead of disk (array of 
bool)
parm:   nofua:true to ignore SCSI WRITE(10,12) FUA bit (array of 
bool)

parm:   luns:number of LUNs (uint)
parm:   stall:false to prevent bulk stalls (bool)
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 19:11:38 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-14 19:07, schrieb J. Fahrner via Dng:
> > modinfo: ERROR: Module usb_storage not found.
> 
> Maybe they have their own drivers for usb?
> 
> # find /lib/modules/3.16.82+/kernel/drivers -name '*storage*'
> /lib/modules/3.16.82+/kernel/drivers/usb/gadget/g_mass_storage.ko
> /lib/modules/3.16.82+/kernel/drivers/usb/gadget/usb_f_mass_storage.ko

$ find /lib/modules/5.6.0-2-amd64/kernel/drivers -name '*storage*'
/lib/modules/5.6.0-2-amd64/kernel/drivers/usb/storage
/lib/modules/5.6.0-2-amd64/kernel/drivers/usb/storage/usb-storage.ko
/lib/modules/5.6.0-2-amd64/kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko

Or the module is built in the kernel.
What tells "modinfo g_mass_storage"? If it's the same module as
usb_storage having the same parameters, then:

echo "options g_mass_storage delay_use=5" > \
  /etc/modprobe.d/g_mass_storage.conf

It's a pretty old kernel, if it doesn't work and the module is built
in, one thing you might try is to put:

#!/bin/dash
echo 5 > /sys/module/usb_storage/parameters/delay_use

in a script /etc/rcS.d/00test.sh

HTH

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 19:07, schrieb J. Fahrner via Dng:

modinfo: ERROR: Module usb_storage not found.


Maybe they have their own drivers for usb?

# find /lib/modules/3.16.82+/kernel/drivers -name '*storage*'
/lib/modules/3.16.82+/kernel/drivers/usb/gadget/g_mass_storage.ko
/lib/modules/3.16.82+/kernel/drivers/usb/gadget/usb_f_mass_storage.ko
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 19:05, schrieb richard lucassen:

That's rather strange. From "modinfo usb_storage":

parm: delay_use:seconds to delay before using a new device (uint)

And what happens if you load the module in advance?:

echo "usb_storage" >> /etc/modules


modinfo: ERROR: Module usb_storage not found.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 18:38:48 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-14 17:25, schrieb richard lucassen via Dng:
> > echo "options usb_storage delay_use=5" > 
> > /etc/modprobe.d/usb_storage.conf
> 
> seems not to work.
> 
> After boot:
> 
> cat /sys/module/usb_storage/parameters/delay_use
> 1

That's rather strange. From "modinfo usb_storage":

parm: delay_use:seconds to delay before using a new device (uint)

And what happens if you load the module in advance?:

echo "usb_storage" >> /etc/modules



-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 17:25, schrieb richard lucassen via Dng:
echo "options usb_storage delay_use=5" > 
/etc/modprobe.d/usb_storage.conf


seems not to work.

After boot:

cat /sys/module/usb_storage/parameters/delay_use
1
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 17:24:01 +0200
richard lucassen via Dng  wrote:

Oops:

echo "options usb_storage delay_use=5" /etc/modprobe.d/usb_storage.conf

must be:

echo "options usb_storage delay_use=5" > /etc/modprobe.d/usb_storage.conf

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 14:12:21 +0200
"J. Fahrner via Dng"  wrote:

> Very big device. Trying to use READ CAPACITY

You may try this:

echo "options usb_storage delay_use=5" /etc/modprobe.d/usb_storage.conf

https://bbs.archlinux.org/viewtopic.php?id=125831

R.

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread Tito via Dng


On 6/14/20 4:44 PM, J. Fahrner via Dng wrote:
> Am 2020-06-14 15:09, schrieb Dr. Nikolaus Klepp:
>> Anno domini 2020 Sun, 14 Jun 14:12:21 +0200
>>  J. Fahrner via Dng scripsit:
>>> [   22.579214] sd 0:0:0:0: [sda] Attached SCSI disk
>>> [ 1145.246051] EXT4-fs (sda1): mounted filesystem with ordered data
>>
>> I see this on RPi, too, just the delay is smaller (~ 30 secs) - but
>> that's anoying, too.
> 
> That was my manual mount. The automatic mount did not happen.
Hi,
you could try to stick at various boot stages a little program like this:

__
#include 
#include 
#include 
#include 
#include 

int main(int argc, char ** argv)
{
/* Eventually adjust the args to your liking */
if (mount("/dev/sda1", "/hdd", "ext4", 0, NULL) == -1) {
fprintf(stderr, "%s: %s\n", "mymount", strerror(errno));
syslog(LOG_ERR, "%s", strerror(errno));
} else {
fprintf(stderr, "%s: %s\n", "mymount", strerror(errno));
syslog(LOG_INFO, "%s", strerror(errno));
}
return 0;
}
__

Compile with:
gcc -Wall mymount.c -o mymount

This will log error or success to syslog with some hopefully meaningful 
messages:

Jun 14 17:03:13 devuan kernel: EXT4-fs (sdm1): mounted filesystem with ordered 
data mode. Opts: (null)
Jun 14 17:03:13 devuan mymount: mymount: Success

Hope this helps.

Ciao,
Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 15:09, schrieb Dr. Nikolaus Klepp:

Anno domini 2020 Sun, 14 Jun 14:12:21 +0200
 J. Fahrner via Dng scripsit:

[   22.579214] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1145.246051] EXT4-fs (sda1): mounted filesystem with ordered data


I see this on RPi, too, just the delay is smaller (~ 30 secs) - but
that's anoying, too.


That was my manual mount. The automatic mount did not happen.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread Dr. Nikolaus Klepp
Anno domini 2020 Sun, 14 Jun 14:12:21 +0200
 J. Fahrner via Dng scripsit:
> [   22.579214] sd 0:0:0:0: [sda] Attached SCSI disk
> [ 1145.246051] EXT4-fs (sda1): mounted filesystem with ordered data

I see this on RPi, too, just the delay is smaller (~ 30 secs) - but that's 
anoying, too.

Nik

-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 13:32, schrieb richard lucassen via Dng:

It's weird. What does "dmesg" tell?

dmesg > /tmp/dmesg

and look if there are any messages there


[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 3.16.82+ (root@odroid-stretch64) (gcc 
version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP PREEMPT Tue Mar 
17 18:33:26 CET 2020

[0.00] CPU: AArch64 Processor [410fd034] revision 4
[0.00] cma: CMA: reserved 8 MiB at 7f80
[0.00] On node 0 totalpages: 520192
[0.00]   Normal zone: 7112 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 520192 pages, LIFO batch:31
[0.00] psci: probing for conduit method from DT.
[0.00] psci: Using PSCI v0.1 Function IDs from DT
[0.00] PERCPU: Embedded 12 pages/cpu s19712 r8192 d21248 u49152
[0.00] pcpu-alloc: s19712 r8192 d21248 u49152 alloc=12*4096
[0.00] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  
Total pages: 513080
[0.00] Kernel command line: 
root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro 
consoleblank=0 console=ttyS0,115200n8 console=tty0 no_console_suspend 
hdmitx=cecf  hdmimode=1080p60hz m_bpp=32 vout= fsck.repair=yes 
elevator=noop disablehpd=true  max_freq=1536 maxcpus=4 
monitor_onoff=false disableuhs=false mmc_removable=true 
usbmulticam=false usbhid.quirks=0x0eef:0x0005:0x0004 net.ifnames=0

[0.00] logo: get hdmimode: 1080p60hz
[0.00] dvfs [get_max_freq] - max_freq : 153600
[0.00] PID hash table entries: 4096 (order: 3, 32768 bytes)
[0.00] Dentry cache hash table entries: 262144 (order: 9, 
2097152 bytes)
[0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 
bytes)
[0.00] Memory: 2018152K/2080768K available (8530K kernel code, 
906K rwdata, 3120K rodata, 923K init, 4119K bss, 62616K reserved)

[0.00] Virtual kernel memory layout:
   vmalloc : 0xff80 - 0xffbb   
(245759 MB)
   vmemmap : 0xffbc - 0xffbc01c0   ( 
   28 MB)
   modules : 0xffbffc00 - 0xffc0   ( 
   64 MB)
   memory  : 0xffc0 - 0xffc08000   ( 
 2048 MB)
 .init : 0xffc001be2000 - 0xffc001cc8d00   ( 
  924 kB)
 .text : 0xffc00108 - 0xffc001be1804   ( 
11655 kB)
 .data : 0xffc001cc9000 - 0xffc001dabbb0   ( 
  907 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, 
Nodes=1

[0.00] Preemptible hierarchical RCU implementation.
[0.00] NR_IRQS:64 nr_irqs:64 0
[0.06] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps 
every 2147483648000ns
[0.26] mclk->mux_reg =ff802990,mclk->reg 
=ff80a994
[0.72] local timer MESON TIMER-G mclk->mux_reg 
=ff802990,mclk->reg =ff80c998
[0.95] local timer MESON TIMER-H mclk->mux_reg 
=ff802990,mclk->reg =ff80e99c
[0.000116] local timer MESON TIMER-I mclk->mux_reg 
=ff802990,mclk->reg =ff8109a0

[0.000127] Switching to timer-based delay loop
[0.000358] Console: colour dummy device 80x25
[0.000676] console [tty0] enabled
[0.003001] allocated 8388608 bytes of page_cgroup
[0.003011] please try 'cgroup_disable=memory' option if you don't 
want memory cgroups
[0.003028] Calibrating delay loop (skipped), value calculated using 
timer frequency.. 2.00 BogoMIPS (lpj=1)

[0.003046] pid_max: default: 32768 minimum: 301
[0.003104] Security Framework initialized
[0.003131] AppArmor: AppArmor initialized
[0.003164] Mount-cache hash table entries: 4096 (order: 3, 32768 
bytes)
[0.003176] Mountpoint-cache hash table entries: 4096 (order: 3, 
32768 bytes)

[0.003649] Initializing cgroup subsys memory
[0.003724] Initializing cgroup subsys devices
[0.003749] Initializing cgroup subsys freezer
[0.003764] Initializing cgroup subsys net_cls
[0.003781] Initializing cgroup subsys blkio
[0.003797] Initializing cgroup subsys perf_event
[0.003809] Initializing cgroup subsys net_prio
[0.003833] Initializing cgroup subsys hugetlb
[0.003844] Initializing cgroup subsys debug
[0.003896] ftrace: allocating 30664 entries in 120 pages
[0.030888] hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 
counters available

[0.071902] Meson chip version = RevC (1F:C - 0:0)
[0.090840] CPU1: Booted secondary processor
[0.110817] CPU2: Booted secondary processor
[0.130814] CPU3: Booted secondary processor
[0.130856] Brought up 4 CPUs
[0.130889] SMP: Total of 4 processors activated.
[0.131354] devtmpfs: initialized
[

Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 13:23, schrieb Dr. Nikolaus Klepp:

Are you 100% absolutely sure your board is not stuck at the bootloader
stage before the kernel is started?


Yes. It responds to ping, so network is running.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 13:03:13 +0200
"J. Fahrner"  wrote:

> But if I do it interactively with "sudo mount /hdd" the drive gets 
> mounted and the waiting daemons are started.
> 
> I'm very confused...

When you mount it interactively the path is different and maybe it's
waiting for some input.

Try to add to the script:

PATH=${PATH}:/sbin:/usr/sbin

and

mount /dev/disk/ /mnt/mountpoint http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 13:03:13 +0200
"J. Fahrner"  wrote:

> But if I do it interactively with "sudo mount /hdd" the drive gets 
> mounted and the waiting daemons are started.
> 
> I'm very confused...

It's weird. What does "dmesg" tell?

dmesg > /tmp/dmesg

and look if there are any messages there

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread Dr. Nikolaus Klepp
Anno domini 2020 Sun, 14 Jun 13:03:13 +0200
 J. Fahrner via Dng scripsit:
> Am 2020-06-14 10:11, schrieb richard lucassen:
> > Did you format the disk with a newer system than the system you run it
> > on? So, I wonder what happens if you remove the huge_file option
> 
> I don't remember on which system I formatted that drive.
> After playing around the problem is very strange. It's not the 
> huge_files option.
> 
> With the "nofail" option in fstab the boot does not hang and I can 
> experiment a little bit.
> 
> I made a init script "mounthdd" which mounts the drive if it is not 
> already mounted, and execute it at several stages. Sometimes the mount 
> is successful, sometimes not. If I mount the drive interactively with 
> "sudo mount /hdd" I have 100% success. But if it's executed in 
> background, it mostly fails.
> 
> Next I wrote a little script "wait4hdd"
> 
> #!/bin/sh
> while ! mountpoint -q /hdd
> do
>sleep 10
> done
> 
> and inserted it in the init scripts for daemons that need the disk.
> Result: they are waiting endless.
> 
> Next I added a cronjob for root:
> */10 * * * * mountpoint -q /hdd || mount /hdd
> 
> That tries to mount the drive every 10 minutes if not already mounted.
> No success.
> 
> But if I do it interactively with "sudo mount /hdd" the drive gets 
> mounted and the waiting daemons are started.
> 
> I'm very confused...
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 

Are you 100% absolutely sure your board is not stuck at the bootloader stage 
before the kernel is started?


-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-14 10:11, schrieb richard lucassen:

Did you format the disk with a newer system than the system you run it
on? So, I wonder what happens if you remove the huge_file option


I don't remember on which system I formatted that drive.
After playing around the problem is very strange. It's not the 
huge_files option.


With the "nofail" option in fstab the boot does not hang and I can 
experiment a little bit.


I made a init script "mounthdd" which mounts the drive if it is not 
already mounted, and execute it at several stages. Sometimes the mount 
is successful, sometimes not. If I mount the drive interactively with 
"sudo mount /hdd" I have 100% success. But if it's executed in 
background, it mostly fails.


Next I wrote a little script "wait4hdd"

#!/bin/sh
while ! mountpoint -q /hdd
do
  sleep 10
done

and inserted it in the init scripts for daemons that need the disk.
Result: they are waiting endless.

Next I added a cronjob for root:
*/10 * * * * mountpoint -q /hdd || mount /hdd

That tries to mount the drive every 10 minutes if not already mounted.
No success.

But if I do it interactively with "sudo mount /hdd" the drive gets 
mounted and the waiting daemons are started.


I'm very confused...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread richard lucassen via Dng
On Sun, 14 Jun 2020 08:21:51 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-13 22:10, schrieb richard lucassen via Dng:
> > I have no idea. But mountall is in runlevel S, not 2. What if you
> > mount it explicitely in a temporary script
> > called /etc/rcS.d/99mount.sh ? That
> > is before runlevel 2 starts.
> 
> Looks like it has something to do with huge_file support:
> https://forums.gentoo.org/viewtopic-t-905312-start-0.html

Yes, I already ran into such an issue a few years ago. I mounted a disk
created ext4 with a newer Debian on a machine running an older Debian
and it would not mount (at all). I looked it up in a script I made and
for me it was the metadata_csum option that was inserted by the newer
Debian and the old one did not support this. So the trick was to format
the disk without that option:

-- 8< -

mkfs.ext4 -O '^metadata_csum' /dev/mmcblk0p3 https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-14 Thread J. Fahrner via Dng

Am 2020-06-13 22:10, schrieb richard lucassen via Dng:

I have no idea. But mountall is in runlevel S, not 2. What if you mount
it explicitely in a temporary script called /etc/rcS.d/99mount.sh ? 
That

is before runlevel 2 starts.


Looks like it has something to do with huge_file support:
https://forums.gentoo.org/viewtopic-t-905312-start-0.html
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 21:09:06 +0200
"J. Fahrner"  wrote:

> > No, but I asked you why not create the root filesystem on that disk.
> 
> If "mount -a" does not work in runlevel 2, why should it work in boot 
> stage 1?

I have no idea. But mountall is in runlevel S, not 2. What if you mount
it explicitely in a temporary script called /etc/rcS.d/99mount.sh ? That
is before runlevel 2 starts.

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 21:05, schrieb richard lucassen:

No, but I asked you why not create the root filesystem on that disk.


If "mount -a" does not work in runlevel 2, why should it work in boot 
stage 1?

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 21:07:37 +0200
richard lucassen via Dng  wrote:

> No, maybe it has got something to do with these "big disk" messages.
> Wouldn't it be an idea to copy a part of that dist to a "not such a
> big disk" and see what happens? 

s/dist/disk/ 


-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 20:28:03 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-13 20:18, schrieb richard lucassen via Dng:
> > That was the "rootwait" parameter as I said somewhere. Used for USB
> > and MMC disks.
> 
> "The rootwait kernel parameter only affects the first stage of boot, 
> while the kernel is waiting for its initial root device"
> 
> https://stackoverflow.com/questions/14806294/linux-kernel-parameter-rootwait-being-ignored#14806347
> 
> That has nothing to do with my problem.

No, maybe it has got something to do with these "big disk" messages.
Wouldn't it be an idea to copy a part of that dist to a "not such a
big disk" and see what happens? 

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 20:28:03 +0200
"J. Fahrner via Dng"  wrote:

> "The rootwait kernel parameter only affects the first stage of boot, 
> while the kernel is waiting for its initial root device"
> 
> https://stackoverflow.com/questions/14806294/linux-kernel-parameter-rootwait-being-ignored#14806347
> 
> That has nothing to do with my problem.

No, but I asked you why not create the root filesystem on that disk. I
have several Orange Pi's using a USB disk as root device. That works
perfectly well. Also on PCEngine's Apu, see its lilo config:

image=/boot/vmlinuz-4.9.223
label=4.9.223
read-only
append="rootwait root=/dev/sda3 console=ttyS0,115200n8"

R.

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 20:18, schrieb richard lucassen via Dng:

That was the "rootwait" parameter as I said somewhere. Used for USB and
MMC disks.


"The rootwait kernel parameter only affects the first stage of boot, 
while the kernel is waiting for its initial root device"


https://stackoverflow.com/questions/14806294/linux-kernel-parameter-rootwait-being-ignored#14806347

That has nothing to do with my problem.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 16:50:29 +0200
Didier Kryn  wrote:

>     I had a problem around 15 years ago booting a Powerpc SBC with
> rootfs on a USB disk and without initramfs. around 15 years ago. Even
> though the disk was powered on its own, it didn't start spinning
> before the driver started it. I solved it by adding a delay to the
> kernel before mounting the rootfs - there was a parameter for that.
> 
>     Maybe it's just enough to add such a delay before trying to mount
> your USB disk.

That was the "rootwait" parameter as I said somewhere. Used for USB and
MMC disks.

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Didier Kryn
Le 13/06/2020 à 10:53, J. Fahrner via Dng a écrit :
> Am 2020-06-13 10:31, schrieb richard lucassen:
>> The nofail means that it wil mount automatically, but if the disk
>> is absent it won't give errors. But it does not wait for the device!
>
> The disk has itś own power supply and is always connected. I think
> there is something missing at the boot stage (driver?).
>
>> ok, I assume it's u-boot? In that case you can easily try to boot from
>> another disk. But apparently you do not have access to the device?
>
> I don't know the boot process. I think it's like a Raspberry Pi. There
> is a little FAT partion and a EXT4 root partition on emmc. Since it is
> headless, I only can access it through ssh. When it does not boot I
> have to open it, remove the emmc card, insert it into an adapter and
> reverse my changes on pc.This is very elaborate. So I need a
> straightforward method to isolate the problem. 


    I had a problem around 15 years ago booting a Powerpc SBC with
rootfs on a USB disk and without initramfs. around 15 years ago. Even
though the disk was powered on its own, it didn't start spinning before
the driver started it. I solved it by adding a delay to the kernel
before mounting the rootfs - there was a parameter for that.

    Maybe it's just enough to add such a delay before trying to mount
your USB disk.

        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Florian Zieboll
On June 13, 2020 3:00:37 PM GMT+02:00, "J. Fahrner via Dng" 
 wrote:

> AFTER boot a "mount -a" waits until the disk is ready and mounts it 
> without any failure. I don't see why this should not be the same during 
> boot. I suspect it has more to do with disc size, see the warnings in 
> dmesg.


A (somewhat hackish) workaround might be to try with the "_netdev" option in 
the fstab!?

libre Grüße,
Florian

-- 

[message sent otg]

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 14:19, schrieb Tito via Dng:

maybe rather than trying to mount the disk earlier, you could try
to spin it up so that it mounts when mountall is run.


AFTER boot a "mount -a" waits until the disk is ready and mounts it 
without any failure. I don't see why this should not be the same during 
boot. I suspect it has more to do with disc size, see the warnings in 
dmesg.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Tito via Dng


On 6/13/20 9:49 AM, richard lucassen via Dng wrote:
> On Sat, 13 Jun 2020 08:52:18 +0200
> "J. Fahrner via Dng"  wrote:
> 
>> Am 2020-06-13 08:25, schrieb J. Fahrner via Dng:
>>> nofail was a good hint. Now the system boots, but the usb disk is
>>> still not mounted. "mount -a" mounts it without errors after boot.
>>
>> What is the best way to run "mount -a" before any initscripts in 
>> runlevel 2?
>>
>> There is a script /etc/init.d/mountall.sh, but this only runs in 
>> runlevel S. Whats the purpose of this script?
> 
> /etc/rcS.d/ contains scripts that run before any other runlevel. That's
> why "mountall" is there.
> 
>> The script provides "mountall". Can I make daemons that need the 
>> external disk dependend on "mountall".
> 
> What is on that disk? Why not make that disk the root filesystem and
> pass "rootwait" to the kernel?
> 
> Anyhow, you may try this:
> 
> 
> #/bin/dash
> 
> ### BEGIN INIT INFO
> # Provides:  disk
> # Required-Start:
> # Required-Stop:
> # Default-Start: S
> # Default-Stop:
> # Short-Description: prepare disk at boot time
> ### END INIT INFO
> 
> case $1 in
> 
> start)
>   # Edit this:
>   /bin/mount /dev/disk /mnt/mountpoint
> ;;
> 
> esac
> 
> 
> 
> put this in /etc/init.d/mount-disk.sh
> run: update-rc.d mount-disk.sh defaults
> 
> and check if there is a link in /etc/rcS.d/ called S00mount-disk.sh
> 
> Just a guess. Not tested of course.
> 
> My 2cts,
> 
> R.
> 

Hi,
maybe rather than trying to mount the disk earlier, you could try 
to spin it up so that it mounts when mountall is run.

From 
https://unix.stackexchange.com/questions/10930/what-command-do-i-use-to-spin-up-a-power-up-in-standby-drive:

 Drives supporting the "Power-up in Standby" feature are supposed 
to spin up as soon as they get
 a command that requires reading the disk.

 like dd if=/dev/hdX of=/dev/null count=512

 
 #/bin/dash
 
 ### BEGIN INIT INFO
 # Provides:  disk
 # Required-Start:
 # Required-Stop:
 # Default-Start: S
 # Default-Stop:
 # Short-Description: prepare disk at boot time
 ### END INIT INFO
 
 case $1 in
 
 start)
   # Edit this:
   /bin/dd if=/dev/disk of=/dev/null count=512
 ;;
 
 esac


eventually you could make this an udev/eudev rule 
to be run when the drive is detected.

Untested, just my 2 cents,

Tito
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Antony Stone
On Friday 12 June 2020 at 17:01:14, J. Fahrner via Dng wrote:

> I'm running Devuan Beowulf on an Odroid C2 mini computer.

> I cannot attach a monitor because I have no suitable cable.

> Any ideas how to debug this problem?

I think my initial approach would be to just buy an HDMI cable - especially 
given the inconvenience of taking the SD card out, moutning on another 
machine, adjusting, replacing, and retrying...


Antony.

-- 
I want to build a machine that will be proud of me.

 - Danny Hillis, creator of The Connection Machine

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread d...@d404.nl
On 13-06-2020 10:53, J. Fahrner via Dng wrote:
> Am 2020-06-13 10:31, schrieb richard lucassen:
>> The nofail means that it wil mount automatically, but if the disk
>> is absent it won't give errors. But it does not wait for the device!
>
> The disk has itś own power supply and is always connected. I think
> there is something missing at the boot stage (driver?).
>
>> ok, I assume it's u-boot? In that case you can easily try to boot from
>> another disk. But apparently you do not have access to the device?
>
> I don't know the boot process. I think it's like a Raspberry Pi. There
> is a little FAT partion and a EXT4 root partition on emmc. Since it is
> headless, I only can access it through ssh. When it does not boot I
> have to open it, remove the emmc card, insert it into an adapter and
> reverse my changes on pc.This is very elaborate. So I need a
> straightforward method to isolate the problem.
> ___ 


I did have a similar problem with a Raspberry Pi caused by fsck taking
to long to end. If you can add a keyboard giving a CTL D it maybe continues.

Because i only do have data on it I entered a mount in rc.local.

But maybe if you fsck the drive on another system?


Grtz.

Nick




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Dr. Nikolaus Klepp
Anno domini 2020 Sat, 13 Jun 10:53:51 +0200
 J. Fahrner via Dng scripsit:
> Am 2020-06-13 10:31, schrieb richard lucassen:
> > The nofail means that it wil mount automatically, but if the disk
> > is absent it won't give errors. But it does not wait for the device!
> 
> The disk has itś own power supply and is always connected. I think there 
> is something missing at the boot stage (driver?).
> 
> > ok, I assume it's u-boot? In that case you can easily try to boot from
> > another disk. But apparently you do not have access to the device?
> 
> I don't know the boot process. I think it's like a Raspberry Pi. There 
> is a little FAT partion and a EXT4 root partition on emmc. Since it is 
> headless, I only can access it through ssh. When it does not boot I have 
> to open it, remove the emmc card, insert it into an adapter and reverse 
> my changes on pc.This is very elaborate. So I need a straightforward 
> method to isolate the problem.

Don't you have access to a serial port on the device so that you can observe 
the boot process? Maybe it's stuck at the bootloader stage.

Nik

> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> 



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 10:31, schrieb richard lucassen:

The nofail means that it wil mount automatically, but if the disk
is absent it won't give errors. But it does not wait for the device!


The disk has itś own power supply and is always connected. I think there 
is something missing at the boot stage (driver?).



ok, I assume it's u-boot? In that case you can easily try to boot from
another disk. But apparently you do not have access to the device?


I don't know the boot process. I think it's like a Raspberry Pi. There 
is a little FAT partion and a EXT4 root partition on emmc. Since it is 
headless, I only can access it through ssh. When it does not boot I have 
to open it, remove the emmc card, insert it into an adapter and reverse 
my changes on pc.This is very elaborate. So I need a straightforward 
method to isolate the problem.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 10:20:46 +0200
"J. Fahrner via Dng"  wrote:

> Thats exactly what I'm expecting, waiting indefinitely. The same as 
> mounting in fstab without nofail option.

The nofail means that it wil mount automatically, but if the disk
is absent it won't give errors. But it does not wait for the device! 

> I can't experiment here. If it does not boot I have to remove the
> emmc card and undo the change on my pc.

ok, I assume it's u-boot? In that case you can easily try to boot from
another disk. But apparently you do not have access to the device?

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 10:05, schrieb richard lucassen via Dng:

That is why there is a rootwait option:

rootwait[KNL] Wait (indefinitely) for root device to show up.
Useful for devices that are detected asynchronously (e.g. USB and MMC
devices).


Thats exactly what I'm expecting, waiting indefinitely. The same as 
mounting in fstab without nofail option.


I can't experiment here. If it does not boot I have to remove the emmc 
card and undo the change on my pc.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 09:55:54 +0200
"J. Fahrner"  wrote:

> Am 2020-06-13 09:49, schrieb richard lucassen:
> > What is on that disk? Why not make that disk the root filesystem and
> > pass "rootwait" to the kernel?
> 
> I'm afraid that won't work either. If there are problems mounting the 
> disk at this early stage, even the root filesystem will not mount.

That is why there is a rootwait option:

rootwait[KNL] Wait (indefinitely) for root device to show up.
Useful for devices that are detected asynchronously (e.g. USB and MMC
devices).

It waits for the USB HDD to spin up.

R.

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 09:49, schrieb richard lucassen:

What is on that disk? Why not make that disk the root filesystem and
pass "rootwait" to the kernel?


I'm afraid that won't work either. If there are problems mounting the 
disk at this early stage, even the root filesystem will not mount.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread richard lucassen via Dng
On Sat, 13 Jun 2020 08:52:18 +0200
"J. Fahrner via Dng"  wrote:

> Am 2020-06-13 08:25, schrieb J. Fahrner via Dng:
> > nofail was a good hint. Now the system boots, but the usb disk is
> > still not mounted. "mount -a" mounts it without errors after boot.
> 
> What is the best way to run "mount -a" before any initscripts in 
> runlevel 2?
> 
> There is a script /etc/init.d/mountall.sh, but this only runs in 
> runlevel S. Whats the purpose of this script?

/etc/rcS.d/ contains scripts that run before any other runlevel. That's
why "mountall" is there.

> The script provides "mountall". Can I make daemons that need the 
> external disk dependend on "mountall".

What is on that disk? Why not make that disk the root filesystem and
pass "rootwait" to the kernel?

Anyhow, you may try this:


#/bin/dash

### BEGIN INIT INFO
# Provides:  disk
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: prepare disk at boot time
### END INIT INFO

case $1 in

start)
  # Edit this:
  /bin/mount /dev/disk /mnt/mountpoint
;;

esac



put this in /etc/init.d/mount-disk.sh
run: update-rc.d mount-disk.sh defaults

and check if there is a link in /etc/rcS.d/ called S00mount-disk.sh

Just a guess. Not tested of course.

My 2cts,

R.

-- 
richard lucassen
http://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Didier Kryn
Le 13/06/2020 à 09:31, J. Fahrner via Dng a écrit :
> Am 2020-06-13 09:24, schrieb Didier Kryn:
>>     AFAIU defaults is a placeholder for when there's no option to pass.
>> Therefore, if you specify nofail or noauto, defaults isn't needed.
>
> According to the man page of mount:
>
> defaults
>   Use the default options: rw, suid, dev, exec, auto,
> nouser, and async.
>
> So defaults is only a shortcut for rw,suid,dev,exec,auto,nouser,async. 


    This raises the question of  the very meaning of the word "default" (~:

    Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 09:24, schrieb Didier Kryn:

    AFAIU defaults is a placeholder for when there's no option to pass.
Therefore, if you specify nofail or noauto, defaults isn't needed.


According to the man page of mount:

defaults
  Use the default options: rw, suid, dev, exec, auto, 
nouser, and async.


So defaults is only a shortcut for rw,suid,dev,exec,auto,nouser,async.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread Didier Kryn
Le 12/06/2020 à 20:25, richard lucassen via Dng a écrit :
> On Fri, 12 Jun 2020 17:01:14 +0200
> "J. Fahrner via Dng"  wrote:
>
>> Any ideas how to debug this problem?
>>
>> This is the fstab entry:
>>
>> LABEL=Elements /hdd ext4 defaults  0 2
> Try to add "nofail" or "noauto":
>
> LABEL=Elements /hdd ext4 defaults,nofail  0 2
>
> LABEL=Elements /hdd ext4 defaults,noauto  0 2
>
> Just to see if it comes up.
>
> Just my 2 cts,
>
> R.
>
    AFAIU defaults is a placeholder for when there's no option to pass.
Therefore, if you specify nofail or noauto, defaults isn't needed.

        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-13 08:25, schrieb J. Fahrner via Dng:

nofail was a good hint. Now the system boots, but the usb disk is
still not mounted. "mount -a" mounts it without errors after boot.


What is the best way to run "mount -a" before any initscripts in 
runlevel 2?


There is a script /etc/init.d/mountall.sh, but this only runs in 
runlevel S. Whats the purpose of this script?
The script provides "mountall". Can I make daemons that need the 
external disk dependend on "mountall".

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-13 Thread J. Fahrner via Dng

Am 2020-06-12 20:25, schrieb richard lucassen:

Try to add "nofail" or "noauto":


nofail was a good hint. Now the system boots, but the usb disk is still 
not mounted. "mount -a" mounts it without errors after boot.


I see no errors in /var/log/boot and dmesg.

The only messages concerning this drive:

[4.153932] scsi 0:0:0:0: Direct-Access WD   Elements 25A3
1021 PQ: 0 ANSI: 6

[4.159536] sd 0:0:0:0: [sda] Spinning up disk...
[4.161466] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   22.522458] sd 0:0:0:0: [sda] Very big device. Trying to use READ 
CAPACITY(16).
[   22.524863] sd 0:0:0:0: [sda] 19532808192 512-byte logical blocks: 
(10.0 TB/9.09 TiB)

[   22.532067] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   22.538598] sd 0:0:0:0: [sda] Write Protect is off
[   22.541988] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[   22.542724] sd 0:0:0:0: [sda] No Caching mode page found
[   22.547320] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   22.554350] sd 0:0:0:0: [sda] Very big device. Trying to use READ 
CAPACITY(16).

[   22.983388]  sda: sda1
[   22.984576] sd 0:0:0:0: [sda] Very big device. Trying to use READ 
CAPACITY(16).

[   22.989231] sd 0:0:0:0: [sda] Attached SCSI disk
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread richard lucassen via Dng
On Fri, 12 Jun 2020 17:01:14 +0200
"J. Fahrner via Dng"  wrote:

> Any ideas how to debug this problem?
> 
> This is the fstab entry:
> 
> LABEL=Elements /hdd ext4 defaults  0 2

Try to add "nofail" or "noauto":

LABEL=Elements /hdd ext4 defaults,nofail  0 2

LABEL=Elements /hdd ext4 defaults,noauto  0 2

Just to see if it comes up.

Just my 2 cts,

R.

-- 
richard lucassen
https://contact.xaq.nl/
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread tempforever
J. Fahrner via Dng wrote:
> Hi,
> I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's
> internal flash disk is limited, I run it with an external usb drive
> attached.
> When this disk is active in /etc/fstab the boot process hangs forever. I
> can ping it, so networking is started, but I cannot login, because sshd
> is not running. Since this is a headless system, I cannot see boot
> messages to find out where it hangs. I cannot attach a monitor because I
> have no suitable cable.
> 
> Any ideas how to debug this problem?
> 
> This is the fstab entry:
> 
> LABEL=Elements /hdd ext4 defaults  0 2
> 
> Booting with this entry commented out works fine, and I can mount the
> disk as normal after boot. But this way many daemons are missing its
> data and have to be restarted after mount.
> 
> Jochen

Is it possible on that computer to boot USB instead of internal flash
disk?  This seems like the easiest solution to me, if it is doable.

I had a similar problem on a Raspberry Pi 3B+, booting from microsd it
would fail to complete startup with USB drive in fstab.  I found out I
could just remove the microsd and boot from USB.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread g4sra via Dng
On 12/06/2020 16:01, J. Fahrner via Dng wrote:
> Hi,
> I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's internal 
> flash disk is limited, I run it with an external usb drive attached.
> When this disk is active in /etc/fstab the boot process hangs forever. I can 
> ping it, so networking is started, but I cannot login, because sshd is not 
> running. Since this is a headless system, I cannot see boot messages to find 
> out where it hangs. I cannot attach a monitor because I have no suitable 
> cable.

Odroid C2 has serial capability, set up a serial console and monitor\login from 
a laptop and USB to 3v3 Serial adapter such as a DKU-5 or CA-42 etc.

> 
> Any ideas how to debug this problem?
> 
> This is the fstab entry:
> 
> LABEL=Elements /hdd ext4 defaults  0 2
> 
> Booting with this entry commented out works fine, and I can mount the disk as 
> normal after boot. But this way many daemons are missing its data and have to 
> be restarted after mount.
> 
> Jochen



> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread g4sra via Dng
On 12/06/2020 16:01, J. Fahrner via Dng wrote:
> Hi,
Hi, I know *nothing* about Odroid

> I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's internal 
> flash disk is limited, I run it with an external usb drive attached.
> When this disk is active in /etc/fstab the boot process hangs forever. I can 
> ping it, so networking is started, but I cannot login, because sshd is not 
> running. Since this is a headless system, I cannot see boot messages to find 
> out where it hangs. I cannot attach a monitor because I have no suitable 
> cable.
> 
> Any ideas how to debug this problem?
I would inspect services which start after networking but before ssh.
A udev rule can easily hang a boot as the calls often block.
I would then try only starting essential services (reduce the runlevel if 
possible, only networking & ssh).

> 
> This is the fstab entry:
> 
> LABEL=Elements /hdd ext4 defaults  0 2
I would replace the LABEL statement with the partition id (/dev/hdd1 ?), 
parsing label's and uuid's can occasionally trip up. 

> 
> Booting with this entry commented out works fine, and I can mount the disk as 
> normal after boot. But this way many daemons are missing its data and have to 
> be restarted after mount.
Restarting a service as a root login is not the same as starting a service at 
boot.
Any one of these services may be hanging the boot but not hang from a root 
login (commonly root's environment, e.g. $PATH masks an issue).

This advice is worth exactly what you paid for it, good luck.

> 
> Jochen
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread d...@d404.nl
On 12-06-2020 17:01, J. Fahrner via Dng wrote:
> Hi,
> I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's
> internal flash disk is limited, I run it with an external usb drive
> attached.
> When this disk is active in /etc/fstab the boot process hangs forever.
> I can ping it, so networking is started, but I cannot login, because
> sshd is not running. Since this is a headless system, I cannot see
> boot messages to find out where it hangs. I cannot attach a monitor
> because I have no suitable cable.
>
> Any ideas how to debug this problem?
>
> This is the fstab entry:
>
> LABEL=Elements /hdd ext4 defaults  0 2
>
> Booting with this entry commented out works fine, and I can mount the
> disk as normal after boot. But this way many daemons are missing its
> data and have to be restarted after mount.
>
> Jochen 


Because with usb chances are that you have more than one labeled with
the same name I mount a (partition on a) usb drive by his UUID.

Grtz.

Nick




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread Ian Zimmerman
On 2020-06-12 17:01, J. Fahrner via Dng wrote:

> I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's
> internal flash disk is limited, I run it with an external usb drive
> attached.  When this disk is active in /etc/fstab the boot process
> hangs forever.

Distribution kernel or your own build?

initramfs or no?

-- 
Ian
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Boot hangs with usb disk active in fstab

2020-06-12 Thread J. Fahrner via Dng

Hi,
I'm running Devuan Beowulf on an Odroid C2 mini computer. Since it's 
internal flash disk is limited, I run it with an external usb drive 
attached.
When this disk is active in /etc/fstab the boot process hangs forever. I 
can ping it, so networking is started, but I cannot login, because sshd 
is not running. Since this is a headless system, I cannot see boot 
messages to find out where it hangs. I cannot attach a monitor because I 
have no suitable cable.


Any ideas how to debug this problem?

This is the fstab entry:

LABEL=Elements /hdd ext4 defaults  0 2

Booting with this entry commented out works fine, and I can mount the 
disk as normal after boot. But this way many daemons are missing its 
data and have to be restarted after mount.


Jochen
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng