Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
We are running on RHEL 5.2. We have created a custom shell script to be executed during the boot process. We have placed it in rc.local. One of the things that our script tries to do is to determine if a certain storage device has been detected and to try to partition this device. However, it seems that all fs related commands fail to execute in this script. Commands such as fdisk and mkfs do not appear to have executed at all. Does that mean that maybe this secondary drive has not been detected by the time rc.local is executed or these fs related commands are not available?
Might try to insert commands into your script just for test to see if the path includes the commands you need ato the time of execution of your script and something to see if the device you are trying to work on shows up
you might insrt"
There are several *fdisk programs around. Each has its problems and strengths. Try them in the order cfdisk, fdisk, sfdisk. (Indeed, cfdisk is a beautiful program that has strict requirements on the partition tables it accepts, and produces high quality partition tables. Use it if you can. fdisk is a buggy program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can. sfdisk is for hackers only - the user inter‐face is terrible, but it is more correct than fdisk and more powerful than both fdisk and cfdisk. Moreover, it can be used noninteractively.)
Note the last sentence. From that I infer that fdisk will not work non-interactively. Clear as mud, right?
Maybe you should try sfdisk or "parted -s".
Last edited by norobro; 01-09-2009 at 08:15 PM.
Reason: changed interactively to non-interactively