LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 12-02-2013, 11:18 AM   #1
ThreeNine
LQ Newbie
 
Registered: Nov 2013
Posts: 19

Rep: Reputation: Disabled
Run shell script direct from isolinux boot menu


Hi all, I got my script working (many thanks to druuna) and now I need a little help to implement it.

I've been reading through this article:
https://www.phenix.bnl.gov/~purschke/RescueCD/
And I think what I want to do is add an option in the boot menu (isolinux.cfg) to run my script, rather than startup a new kernel. Here is the functions I need for my script to run successfully:
Code:
trap
clear
echo
eject
reboot
sleep
cp
fdisk
df
cd
Also I will need to mount all the accessible hard drives. Either automount, or some custom mount script that runs when called.

Let me know what you think. Thank you!
 
Old 12-03-2013, 05:27 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You would use the kernel boot option init= for this. Normally set to /sbin/init its the first command thats run when the sytem booted and the initramfs was mounted. So you would need a working kernel, a working ramfs and a script that does what you want.

How to automount every device is an art of it self. Due to various different options for device usage. You could have two disks with say 3 partitions. But this could also be a raid setup. So do you mount them as single drivers or as the raid device. Also the lvm stuff is there. Not speaking of fake raid cards with dmraid. So this is something to tinker. Might be that someone has some decent stuff for this allready going. I'd say your best shoot for this would be some install cds and see how they do it. Also the trinity rescue cd has an mount all command. Might want to check it out as well.
 
2 members found this post helpful.
  


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
How to get grub to launch isolinux/syslinux boot menu. narnie Linux - Software 8 02-02-2021 02:17 PM
Run Shell script when boot Linux haseit Linux - Newbie 3 03-19-2009 07:26 PM
how to automatic run a shell script at boot? ceantuco Linux - Newbie 36 10-09-2008 12:08 PM
How to run a shell script on boot up? AussieGit Linux - Newbie 4 11-02-2005 06:10 PM

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

All times are GMT -5. The time now is 11:28 AM.

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