Solved

Some Easy Questions ??????

Posted on 2004-08-03
6
415 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 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