LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   try to format something (https://www.linuxquestions.org/questions/linux-newbie-8/try-to-format-something-161902/)

dummoi 03-24-2004 02:22 PM

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:~#

aaa 03-24-2004 02:27 PM

hdb1 is a partition... hdb is a hd. Making a device file should be unnecessary

dummoi 03-24-2004 02:34 PM

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:~#

aaa 03-24-2004 02:36 PM

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

dummoi 03-24-2004 02:52 PM

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

aaa 03-24-2004 02:56 PM

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.

dummoi 03-24-2004 03:01 PM

Yes, I still have to learn much about linux. But now it works. Thanx a lot

dummoi 04-07-2004 02:51 AM

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.

dummoi 04-07-2004 12:54 PM

nevermind, I found it.


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