LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2004, 03:22 PM   #1
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Rep: Reputation: 15
try to format something


I have been trying to format my harddrive ( I think it's called hdb1 ) for 2 days.... and I have no idea what else I can try? Can somebody help me?

Thanx

dummoi

this is what I have done....

root@dieter:~# fdisk /dev/hdb1

The number of cylinders for this disk is set to 9731.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-9731, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-9731, default 9731):
Using default value 9731

Command (m for help): p

Disk /dev/hdb1: 80.0 GB, 80048392704 bytes
255 heads, 63 sectors/track, 9731 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1p1 1 9731 78164226 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

root@dieter:~# mknod /dev/hdb1p1 b 22 0

root@dieter:~# mke2fs /dev/hdb1p1
mke2fs 1.34 (25-Jul-2003)
mke2fs: No medium found while trying to determine filesystem size
root@dieter:~#
 
Old 03-24-2004, 03:27 PM   #2
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
hdb1 is a partition... hdb is a hd. Making a device file should be unnecessary
 
Old 03-24-2004, 03:34 PM   #3
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Original Poster
Rep: Reputation: 15
Do you mean I just have to :

mke2fs /dev/hdb1

I also did...This is the result...

root@dieter:~# mke2fs /dev/hdb1
mke2fs 1.34 (25-Jul-2003)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9781248 inodes, 19543064 blocks
977153 blocks (5.00%) reserved for the super user
First data block=0
597 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@dieter:~# mount -t vfat /dev/hdb1 /mnt/hdb1

mount: wrong fs type, bad option, bad superblock on /dev/hdb1, or too many mounted file systems

root@dieter:~#
 
Old 03-24-2004, 03:36 PM   #4
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Do a :
mount -t ext2 /dev/hdb1 /mnt/hdb1
mke2fs makes ext2 filesystems. 'mkfs.vfat' or 'mkdosfs -F 32' makes the FAT32 (vfat) filesystem.
The /mnt/hdb1 directory has to exist for this to work:
mkdir /mnt/hdb1
 
Old 03-24-2004, 03:52 PM   #5
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Original Poster
Rep: Reputation: 15
It has to be a FAT32 partitition. I have done this.

root@dieter:~# mkdosfs -F 32 /dev/hdb1 /mnt/hdb1 78172256
mkdosfs 2.8 (28 Feb 2001)
Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]
[-m boot-msg-file] [-n volume-name] [-i volume-id]
[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]
[-F fat-size] [-r root-dir-entries] [-R reserved-sectors]
/dev/name [blocks]
root@dieter:~# mount -t vfat /dev/hdb1 /mnt/hdb1
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
or too many mounted file systems


Has it actually done something? (78172256 is blocks count).
/mnt/hdb1 does exist
 
Old 03-24-2004, 03:56 PM   #6
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
It works like mke2fs:
mkdosfs -F 32 /dev/hdb1 78172256
It should then say the filesystem was created successfully, if that is the case. Mount won't work until the filesystem was created properly.
 
Old 03-24-2004, 04:01 PM   #7
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Original Poster
Rep: Reputation: 15
Yes, I still have to learn much about linux. But now it works. Thanx a lot
 
Old 04-07-2004, 03:51 AM   #8
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Original Poster
Rep: Reputation: 15
actually, It doesn't work. Because when I want to run /sbin/lilo I get an error:
root@dieter:/sbin# ./lilo
Warning: COMPACT may conflict with LBA32 on some systems
Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/hdb' -> '/dev/hdb'
Fatal: open /dev/hdb: No such file or directory

But when I disconnect my harddrive and comment the following line in fstab
/dev/hdb1 /mnt/hdb1 ext3 defaults 0 0
then it works.
 
Old 04-07-2004, 01:54 PM   #9
dummoi
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Redhat9
Posts: 31

Original Poster
Rep: Reputation: 15
nevermind, I found it.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
format a hard drive (/dev/hda1) in Reiser fs format Linh Linux - General 7 06-17-2009 07:30 AM
Converting wma format to mp3 format. fakie_flip Linux - General 6 10-02-2005 08:49 PM
replace empty function from the old format to the new format powah Programming 4 07-12-2005 09:07 PM
use vi to convert linux format to windows format intolinux Linux - Software 2 12-10-2003 11:20 PM
Format Problems Saving Star Office Docs in Word Format kkempter Linux - Software 4 08-27-2003 05:23 PM


All times are GMT -5. The time now is 08:37 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration