When during boot-up is isolinux/autorun executed? [solved]

Post questions about how to make a customized SystemRescueCd, and if you have problems to install new packages. Please read the handbook first.
tbfh1955
Posts: 6
Joined: 05 Jun 2016, 21:31

When during boot-up is isolinux/autorun executed? [solved]

Postby tbfh1955 » 06 Jun 2016, 00:36

Any help tracing the scripts which control the hand-off to user-mode root would be appreciated.
(would like to eliminate blocking script entries waiting for user to type 'enter' such as the one at the end of autorun)

Thanks for any assistance.

Re: previous question answered.
Should we assume all autorun scripts must start with:
#!<shell_path>
and be chmod 0755?
or, absent that designation, attempted execution under zsh?
thanks in advance for any details.
Updating....
#!/bin/tcsh is ignored in autorun, apparently being copied to a tmp file for execution.
So, presumably I'll have to do it the hard way.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: When during boot-up is isolinux/autorun executed?

Postby gernot » 06 Jun 2016, 04:28

The autorun scripts are executed just before the virtual terminals opens.
The terminals are not full initialized so you get problems with e.g. dialog.
Search the forum for workarounds.
The script is copied to /var/autorun before it is executed.

You can avoid the first keyboard interaction with the ar_nowait bootoption.
If your autorun script touch /etc/ar_nowait then you don't get the prompt after the script is ready.

Gernot

tbfh1955
Posts: 6
Joined: 05 Jun 2016, 21:31

Re: When during boot-up is isolinux/autorun executed?

Postby tbfh1955 » 07 Jun 2016, 23:18

Thanks for that info.

I created two almost identical scripts that simply dump out status info when they run:

In files/root/autorun0 :
echo "blkid..." > ~root/iamroot.dat
blkid >> ~root/iamroot.dat
env >> ~root/iamroot.dat

Also a simple place-holder data file with self identify text content:

files/root/my.data0

In isoroot/autorun :

echo "blkid..." > ~root/isoroot.dat
blkid >> ~root/isoroot.dat
env >> ~root/isoroot.dat

And a my.data in isorooot:

I build squashfs -- assuming the files I've added will be included when the filesystem is un-squashed, and before the autorun processes start. Since all the files have different names & output directions, I would expect to see the following in /root at the end:

autorun
isoroot.dat
my.data
autorun0
iamroot.dat
my.data0

Instead, I find:
/boot/autorun # -- originally in isoroot
/livemnt/boot/autorun # -- originally in isoroot
/livemnt/memory/root/isoroot.dat # -- the output of the isoroot autorun
/root/isoroot.dat # -- same file, different symlink I guess

# -- as for autorun0 & my.data0 (originally in files/squashfs/root)
/root/my.data0
/root/autorun0

# -- and...
/livemnt/squashfs/root/autorun0
/livemnt/squashfs/root/my.data0

Questions (since autorun starts after everything is cached):

1. Why did autorun end up in /livemnt/boot?
(is isoroot really -> /boot?)

2. Why didn't autorun0 get run from /root?

Thanks for any info.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: When during boot-up is isolinux/autorun executed?

Postby gernot » 08 Jun 2016, 04:33

>>Instead, I find:
>>/livemnt/boot/autorun # -- originally in isoroot
Here you see autorun direct on the ISO which is mounted to /livemnt/boot.
This is made to loop mount /livemnt/boot/sysresccd.dat from /livemnt/squashfs/
This is only valid if you dont use "docache" use a mountable boot source.

>>/livemnt/memory/root/isoroot.dat

sysresccd use a layered filesystem.
The content of the directorys /livemnt/squashfs/ and /livemnt/memory are combined and shown as /.
/livemnt/squashfs/ contain the mounted sysrcd.dat squased filesystem.
All write operations are made to /livemnt/memory.

Because of this you see all files in / also in /livemnt/memory or /livemnt/squashfs

autorun work not from /root. autorun is a tool to customize startup without rebuilding of sysrcd.dat.
If you rebuilt sysrcd.dat you can use other options like the normal startup scripts.

Gernot

tbfh1955
Posts: 6
Joined: 05 Jun 2016, 21:31

Re: When during boot-up is isolinux/autorun executed?

Postby tbfh1955 » 08 Jun 2016, 15:26

Thanks Gernot for the prompt reply.

That clears things up -- very helpful.

Ted


Return to “Customization and installing new packages”

Who is online

Users browsing this forum: No registered users and 3 guests