LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 06-02-2003, 11:31 AM   #1
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
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
 
Old 06-02-2003, 11:34 AM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
fdisk /dev/hda6
 
Old 06-02-2003, 11:40 AM   #3
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
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
 
Old 06-02-2003, 11:42 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 06-02-2003, 11:43 AM   #5
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
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.
 
Old 06-02-2003, 11:50 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 06-02-2003, 11:51 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 06-02-2003, 11:53 AM   #8
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
I dont created filesystem how can I do that?
Thanks
 
Old 06-02-2003, 11:54 AM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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..
 
Old 06-02-2003, 11:56 AM   #10
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
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"
 
Old 06-02-2003, 11:58 AM   #11
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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....
 
Old 06-02-2003, 12:00 PM   #12
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
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
 
Old 06-02-2003, 12:02 PM   #13
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 271Reputation: 271Reputation: 271
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
 
Old 06-02-2003, 12:04 PM   #14
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Original Poster
Rep: Reputation: 30
Thanks man, now works

Thanks a lot!!!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 10:35 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
no valid devices were found on which to create new filesystem mehdi Linux - Software 5 02-18-2004 06:48 AM
create ext3 filesystem glock19 Linux From Scratch 2 02-06-2002 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration