:: Re: [DNG] Boot hangs with usb disk …
Página Inicial
Delete this message
Reply to this message
Autor: richard lucassen
Data:  
Para: dng
Assunto: Re: [DNG] Boot hangs with usb disk active in fstab
On Sat, 13 Jun 2020 08:52:18 +0200
"J. Fahrner via Dng" <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/