Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-02-2003, 11:31 AM
|
#1
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Rep:
|
Create a filesystem
Hi
I would like to know how can I Create a filesystem in dev/hda6 for my Redhat 8.0, I tried with in a shell "mkfs" but appear me: bash: command not found
Thanks
|
|
|
06-02-2003, 11:34 AM
|
#2
|
Senior Member
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123
Rep:
|
fdisk /dev/hda6
|
|
|
06-02-2003, 11:40 AM
|
#3
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
I tried with /sbin/fdisk /dev/hda6 and then add a new partition, next I made write table to disk and exit, then /sbin/fdisk /dev/hda -l and now is
Disk /dev/hda: 255 heads, 63 sectors, 3738 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1925 15358140 83 Linux
/dev/hda3 1926 2435 4096575 83 Linux
/dev/hda4 2436 3738 10466347+ f Win95 Ext'd (LBA)
/dev/hda5 2436 2459 192748+ 82 Linux swap
/dev/hda6 2460 3738 10273536 83 Linux
My disc is 30GB but I have 10GB without partition, now I want to create a filesystem and mount /dev/hda6
Thanks
|
|
|
06-02-2003, 11:42 AM
|
#4
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by iceman47
fdisk /dev/hda6
|
fdisk creates and modifies partitions on hard drives, it doesn't create filesystems.
Your looking for mke2fs Gerardoj.
man mke2fs for more information on the man pages.
|
|
|
06-02-2003, 11:43 AM
|
#5
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
I want to mount /dev/hda6 in /mnt/folder, how can I mount /dev/hda6? I tried with [root@ud3-25 Gerardo]# mount /dev/hda6 /mnt/Folder
mount: you must specify the filesystem type
what kind of type is it ?
Thanks
Last edited by Gerardoj; 06-02-2003 at 11:49 AM.
|
|
|
06-02-2003, 11:50 AM
|
#6
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
man mount
or
mkdir /mnt/folder
mount /dev/hda6 /mnt/folder
To mount automatically at bootup, just add an entry to your /etc/fstab file like this:
Code:
/dev/hda6 /mnt/folder ext3 defaults 1 2
man fstab for more options.. etc on editing that file.
|
|
|
06-02-2003, 11:51 AM
|
#7
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by Gerardoj
mount: you must specify the filesystem type
what kind of type is it ?
|
How did you create the filesyste? If you just did a regular ol mke2fs /dev/hda6, it will default to or as a ext2 filesystem most likely. So you would want to specify that as your filesystem, etc.
|
|
|
06-02-2003, 11:53 AM
|
#8
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
I dont created filesystem how can I do that?
Thanks
|
|
|
06-02-2003, 11:54 AM
|
#9
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by Gerardoj
I dont created filesystem how can I do that?
Thanks
|
look up.. i've been explaining how to do it in my first post/reply.. 
|
|
|
06-02-2003, 11:56 AM
|
#10
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
Ok but what kind of command I need to use: /sbin/fdisk /dev/hda6:
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
I used "w"
|
|
|
06-02-2003, 11:58 AM
|
#11
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by Gerardoj
Ok but what kind of command I need to use: /sbin/fdisk /dev/hda6:
|
Dont use fdisk, like I said, that only creates a partition, etc. You already have the partition /dev/hda6. You just need to format it and create the filesystem with mke2fs.... 
|
|
|
06-02-2003, 12:00 PM
|
#12
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
When I try
[root@ud3-25 Gerardo]# fdisk /dev/hda6
bash: fdisk: command not found
and
[root@ud3-25 Gerardo]# mke2fs /dev/hda6
bash: mke2fs: command not found
Thanks
|
|
|
06-02-2003, 12:02 PM
|
#13
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by Gerardoj
When I try
[root@ud3-25 Gerardo]# fdisk /dev/hda6
bash: fdisk: command not found
and
[root@ud3-25 Gerardo]# mke2fs /dev/hda6
bash: mke2fs: command not found
Thanks
|
Don't worry about fdisk anymore, you no longer need it, you already have your partition.
/sbin/mke2fs /dev/hda6
If that doesn't work, make sure its installed by using:
locate mke2fs
or
find / -name mke2fs
|
|
|
06-02-2003, 12:04 PM
|
#14
|
Member
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465
Original Poster
Rep:
|
Thanks man, now works
Thanks a lot!!!!!
|
|
|
All times are GMT -5. The time now is 04:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|