Adding commands to boot sequence


6 posts
by Mobius » Mon Dec 31, 2012 3:47 pm
First does anyone know the sequence of file executions that happens during boot up?

Second, is there a boot file that I can edit to add commands or even better, to add a call to a user file with additional boot commands? I know that Config.txt is probably somewhere near the beginning
of the boot sequence so that is not really a good candidate for what I have in mind. One thing I want to do is to allow for the mounting of a USB drive during boot but I'm sure I'll think of other things as I learn more about Linux and the Pi.
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA
by Jim JKla » Mon Dec 31, 2012 3:53 pm
Config.txt is in the PC acessable part of the SD card acess it with Wordpad NOT NOTEPAD notepad does nor line wrap properly.

There's some noob info here http://elinux.org/RPi_Noob_Guide_to_the_Pi_image#Getting_an_image ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 1935
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by flyinghappy » Mon Dec 31, 2012 3:59 pm
To mount a usb drive at boot add it into your fstab file at /etc/fstab.

some good info about fstab here...... https://wiki.archlinux.org/index.php/Fstab
Pi with ArchLinux running a minidlna/samba home server
Posts: 111
Joined: Mon Nov 05, 2012 5:31 pm
by Mobius » Mon Dec 31, 2012 7:24 pm
Jim JKla wrote:Config.txt is in the PC acessable part of the SD card acess it with Wordpad NOT NOTEPAD notepad does nor line wrap properly.

There's some noob info here http://elinux.org/RPi_Noob_Guide_to_the_Pi_image#Getting_an_image ;)


I know about editting config.txt but it seems like that is too early in the boot cycle for my purposes. Had to edit it for my HDMI to VGA setup.
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA
by Mobius » Mon Dec 31, 2012 7:29 pm
flyinghappy wrote:To mount a usb drive at boot add it into your fstab file at /etc/fstab.

some good info about fstab here...... https://wiki.archlinux.org/index.php/Fstab


That is only one example of what I want to do. If there is a boot file where I can just add the mount command line, then that is all I really need for the USB drive. I have already established a "mnt/FLASH" folder so I just need a place to put the "mount -o uid=xxx,gid=xxx /dev/sda1 /mnt/FLASH" command. That would also, presumably, allow me a place to add other command lines.
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA
by Jim JKla » Tue Jan 01, 2013 1:39 am
Thats ok I had to put it in just in case ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 1935
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK