?
Solved

Some Easy Questions ??????

Posted on 2004-08-03
6
Medium Priority
?
417 Views
Last Modified: 2010-08-05
i have linux redhat9.0
I Know That The Purpose Of The File /etc/rc.d/rc.local Is That You Just Enter Some Commands In It And These Commands Will Be Execute After The Booting Process Of Linux.

If I Put
mount -t vfat /dev/hda1 /mnt/windows  
this command in /etc/rc.d/rc.local
then my c: (Drive) will be mounted each time when i start linux.

I want that
when i boot my linux then it will terminate or formate my d: (hda5)
each time when linux start.
so for that i must put the command
mount -t vfat /dev/hda5 /mnt/windows  
In    rc.local
now what is the next command to format or completely delete the partition hda5 or D:

If You Dont Know About This Stupidity
Then Just Tell Me The Process Of Formating any vfat drive from linux redhat 9.0


thanxxxxxxxxx you all



0
Comment
Question by:bbaiub
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:pYrania
ID: 11702131
it highly depends on the filesystem you want to format the partition with

for ext3 use the following:
mke2fs -j /dev/hda5
mount -t ext3 /dev/hda5 /mnt/windows

for vfat you might use:
mkfs -t vfat /dev/hda5
mount -t vfat /dev/hda5 /mnt/windows
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 11702465
parted -s rm /dev/hda5 will delete the hda5 partition.
0
 
LVL 20

Accepted Solution

by:
Gns earned 1500 total points
ID: 11702626
Um, why do you put the first mount in rc.local? Something wrong with setting it to automatically mount in /etc/fstab?
Oh, and why have a scratch area that you zero each time you start linux?
... And you don't have to mount on /mnt/windows ... you can well mount it anyplace you like. Say you want to mount /dev/hda1 ("c:") on /mnt/win_c and /dev/hda5 on /mnt/win_d, the (first time only) you need create these directories
mkdir /mnt/win_c
mkdir /mnt/win_d
... Then you put something like
/dev/hda1 /mnt/win_c vfat defaults 0 0
in /etc/fstab so that mount -a can handle it at boot, and use a slightly modified variant of pYranias vfat advice for the scratchpad like
mkfs -t vfat /dev/hda5
mount -t vfat /dev/hda5 /mnt/win_d
in /etc/rc.d/rc.local ... You might have an entry for it in fstab too, so that it is easier to handle (umount /mnt/win_d ... etc), something like
/dev/hda5 /mnt/win_d vfat defaults,noauto 0 0
where the "noauto" option make sure it _doesn't_ get mounted automatically, and thus won't be in the way for the fs-creation.

But I'm really curious as to why you would want this type of setup.

-- Glenn
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 3

Expert Comment

by:pYrania
ID: 11702776
maybe he hasn't heard about tmpfs yet.
0
 
LVL 20

Expert Comment

by:Gns
ID: 11703091
Might be it. Hopefully we'll get to know though.

-- Glenn
0
 
LVL 1

Expert Comment

by:rdoctane
ID: 11708784
mkfs.vfat -F FAT-size

if you dont specify it'll give you 12 or 16 bit...if you want fat32, you have to specify it

~joe~
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question