Solved

Some Easy Questions ??????

Posted on 2004-08-03
6
412 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
6 Comments
 
LVL 3

Expert Comment

by:pYrania
Comment Utility
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
Comment Utility
parted -s rm /dev/hda5 will delete the hda5 partition.
0
 
LVL 20

Accepted Solution

by:
Gns earned 500 total points
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Expert Comment

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

Expert Comment

by:Gns
Comment Utility
Might be it. Hopefully we'll get to know though.

-- Glenn
0
 
LVL 1

Expert Comment

by:rdoctane
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now