Solved

Some Easy Questions ??????

Posted on 2004-08-03
6
416 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 500 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

726 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