LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 04-17-2017, 03:06 PM   #1
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Rep: Reputation: Disabled
Location of Bootup Scripts


During bootup two scripts are run, according to the on-screen messages:
/scripts/init-bottom
/scripts/local-bottom

After booting, there is no /scripts directory to be found.

How can I access those scripts for study/editing? I haven't a clue.
 
Old 04-17-2017, 04:41 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
What is the output of the commands

locate init-bottom

locate local-bottom
 
Old 04-19-2017, 03:27 AM   #3
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Interesting study! Gets into the concept of initrd/initramfs (as that #2 locate will show)
(Here's something I found, tho obscure & NOT very related; &a LQthread: ^f run_scripts /scripts/init-bottom And a couple wiki's about how this fs 'goes away' via switch/pivot_root, tho initrd is optional, as in LFS! Also, mll is on my 'to-do' list )

Let us know what you 'find' (which distro?)

Last edited by Jjanel; 04-19-2017 at 05:04 AM.
 
1 members found this post helpful.
Old 04-19-2017, 04:01 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Further to the previous answers, /etc/initramfs-tools/scripts/init-bottom and local-bottom are directories in which scripts can be stored to be executed during the initramfs stage of system startup.

There is some information on these directories in man initramfs-tools

On my system, Linux Mint 18.1, both directories are empty.
 
2 members found this post helpful.
Old 04-19-2017, 01:26 PM   #5
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
No surprise here, as noted by other posters:

Code:
xxx@Hound:~$ sudo locate local-bottom
/etc/initramfs-tools/scripts/local-bottom
/usr/share/initramfs-tools/scripts/local-bottom
/usr/share/initramfs-tools/scripts/local-bottom/cryptopensc
/usr/share/initramfs-tools/scripts/local-bottom/lupin_setup
/usr/share/initramfs-tools/scripts/local-bottom/ntfs_3g

xxx@Hound:~$ sudo locate init-bottom
/etc/initramfs-tools/scripts/init-bottom
/usr/share/initramfs-tools/scripts/init-bottom
/usr/share/initramfs-tools/scripts/init-bottom/plymouth
/usr/share/initramfs-tools/scripts/init-bottom/udev
All there are empty directories. There are no files of that name:

Code:
xxx@Hound:~$ sudo find / -type f -name init-bottom
xxx@Hound:~$ sudo find / -type f -name local-bottom
show nothing.

So, I'm still in the dark as to what's in those files. Which brings me to a larger point. Where is there a detailed description of the boot process for Mint (Desktop: Cinnamon 2.8.8 Distro: Linux Mint 17.3 Rosa)? My Slackware experience isn't helping.
 
Old 04-19-2017, 01:47 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Sorry, I actually run debian which does have scripts in the those directories. I guess mint does not.
 
Old 04-20-2017, 02:02 PM   #7
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thanks for that 'man' reference hydrurga. I'm afraid it's above my pay grade however. And it sounds like there are actually scripts in those empty dirs. Guess I'll remain in the dark. (Sigh).
 
Old 04-20-2017, 02:31 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Imagine if the message had read:

Running any scripts found in the directory scripts/init-bottom...done processing any scripts that were found (if any)

That would have made more sense? I think here that it's a case of an original info message that isn't very precise.

Don't remain in the dark. Keep having a look around.

Mint is based via Ubuntu on Debian. Perhaps this therefore could be of use: https://wiki.debian.org/BootProcess
 
Old 04-20-2017, 03:03 PM   #9
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
For starters, you may want to list the contents of your initramfs:
Code:
lsinitramfs -l INITRAMFSFILE
(where INITRAMFSFILE, obviously, identifies the initramfs file—which most likely sits in your /boot directory). See if it lists any (executable) files in the scripts directory tree.
 
1 members found this post helpful.
Old 04-21-2017, 10:07 AM   #10
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
hydrurga: Your interpretation of those boot time script messages makes perfect sense to me. However, the hang time for those messages seems to suggest that something is happening. The reference to the Debian wiki on booting looks very interesting. Thanks for your interest and your help.

luvr: Alas, I don't seem to have a relevant initram* file anywhere in /. I do have a file initrd.img-3.19.0-32-generic, but lsinitramfs can't read it. BTW, I never knew about the lsinitramfs command. Thanks.
 
Old 04-21-2017, 11:38 AM   #11
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by notadoc View Post
luvr: Alas, I don't seem to have a relevant initram* file anywhere in /. I do have a file initrd.img-3.19.0-32-generic, but lsinitramfs can't read it.
That’s strange... On my Ubuntu system, I have a /boot/initrd.img-4.4.0-67-generic file, which lsinitramfs reads fine. Perhaps on your Mint system, it’s in a somehow different format? The file command on my system tells me it’s a gzip compressed file:
Code:
$ file /boot/initrd.img-4.4.0-67-generic
/boot/initrd.img-4.4.0-67-generic: gzip compressed data, last modified: Wed Mar 15 19:17:28 2017, from Unix
I can copy it to a file with a .gz extension, and un-“gzip” it:
Code:
$ cp /boot/initrd.img-4.4.0-67-generic blahblah.gz
$ gunzip blahblah.gz
The resulting file, blahblah, then, will be a cpio archive:
Code:
$ file blahblah
blahblah: ASCII cpio archive (SVR4 with no CRC)
I can use the “cpio” command to extract its contents:
Code:
$ cpio -i < blahblah
196673 blocks
The contents will get extracted to the current directory:
Code:
$ ls -l
total 98388
drwxr-xr-x  2 luvr luvr      4096 Apr 21 18:26 bin
-rw-r--r--  1 luvr luvr 100696576 Apr 21 18:23 blahblah
drwxr-xr-x  3 luvr luvr      4096 Apr 21 18:26 conf
drwxr-xr-x 10 luvr luvr      4096 Apr 21 18:26 etc
-rwxr-xr-x  1 luvr luvr      6907 Apr 21 18:27 init
drwxr-xr-x  9 luvr luvr      4096 Apr 21 18:26 lib
drwxr-xr-x  2 luvr luvr      4096 Apr 21 18:26 lib64
drwxr-xr-x  2 luvr luvr      4096 Apr 21 18:26 run
drwxr-xr-x  2 luvr luvr      4096 Apr 21 18:27 sbin
drwxr-xr-x  7 luvr luvr      4096 Apr 21 18:27 scripts
drwxr-xr-x  4 luvr luvr      4096 Apr 21 18:26 usr
drwxr-xr-x  4 luvr luvr      4096 Apr 21 18:26 var
This is the exact actual contents of the initial RAM disk as your system uses it.

Quote:
BTW, I never knew about the lsinitramfs command. Thanks.
You're welcome!
 
1 members found this post helpful.
Old 04-21-2017, 01:02 PM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by notadoc View Post
hydrurga: Your interpretation of those boot time script messages makes perfect sense to me. However, the hang time for those messages seems to suggest that something is happening. The reference to the Debian wiki on booting looks very interesting. Thanks for your interest and your help.

luvr: Alas, I don't seem to have a relevant initram* file anywhere in /. I do have a file initrd.img-3.19.0-32-generic, but lsinitramfs can't read it. BTW, I never knew about the lsinitramfs command. Thanks.
luvr's posts have been very interesting indeed.

What error message does lsinitramfs give?

On Mint 18.1, I have /boot/initrd.img-4.8.0-46-generic and lsinitramfs /boot/initrd.img-4.8.0-46-generic works fine.
 
Old 04-21-2017, 02:52 PM   #13
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
luvr: I collected my thoughts after I had posted.
Code:
file initrd.img-3.19.0-32-generic
said it was a gzip file. Like you, I appended a ',gz' to the name and ungzip'ed it. Voila, lsinitramfs read it; no cpio required. The /scripts/*-bottom were dirs, containing a few sophisticated scripts that told me nothing and were of no interest.

hydrurga:
Code:
lsinitramfs initrd.img-3.19.0-32-generic
just says "Specified file could not be read."

Thanks, folks, for staying with me on this.
 
Old 04-22-2017, 02:12 AM   #14
luvr
Member
 
Registered: May 2005
Location: Boom - The Home Town of Tomorrowland, Belgium
Distribution: Slackware, Xubuntu
Posts: 459
Blog Entries: 2

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by notadoc View Post
hydrurga:
Code:
lsinitramfs initrd.img-3.19.0-32-generic
just says "Specified file could not be read."
Probably a silly question, but were you in the right directory when you issued that command (i.e., most likely, "/boot")? Or, alternatively, did you enter the complete path to the file?
 
Old 04-22-2017, 02:14 PM   #15
notadoc
Member
 
Registered: Jan 2015
Posts: 113

Original Poster
Rep: Reputation: Disabled
Well might you ask

I try to careful about that, but I must have screwed up big time. A repeat of
Code:
lsinitramfs /boot/initrd.img-3.19.0-32-generic
gave an immediate display of the files. No gunzip, no cpio, no nuthin. Sorry for polluting this thread.
 
  


Reply



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
location of bootup image goodbyebluesky Red Hat 3 05-06-2009 10:15 AM
location startup scripts megadeth Linux - Software 2 05-22-2005 07:31 AM
adding bootsplash scripts to bootup? microsoft/linux Debian 7 12-17-2004 09:44 AM
Location of bootup messages? rech Linux - Newbie 2 08-24-2003 11:54 AM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 03:52 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