LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2003, 01:22 AM   #1
bmike1
Member
 
Registered: Jul 2003
Posts: 132

Rep: Reputation: 15
mkfs


Well, here I am yet again. I think that I installed everything yet forgot to mkfs -j <location>. Is there a way to easily tell if that is so? What do I need to do if so (or if not)?
What happens if I run it on a disk with data on it.
I do have a couple of drives in which the information doesn't really matter so I ran mkfs on them. Why would it respond as such:
bmike1@bmike1:/mnt$ umount /dev/sda6
umount: /dev/sda6 is not mounted (according to mtab)
bmike1@bmike1:/mnt$ su
Password:
root@bmike1:/mnt# mkfs -t ext2 -j /mnt/sda6
mke2fs 1.34-WIP (21-May-2003)
/mnt/sda6 is not a block special device.
Proceed anyway? (y,n) y
mkfs.ext2: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.

root@bmike1:/mnt# umount sda5
root@bmike1:/mnt# mkfs -t ext2 -j /mnt/sda5
mke2fs 1.34-WIP (21-May-2003)
/mnt/sda5 is not a block special device.
Proceed anyway? (y,n) y
mkfs.ext2: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
root@bmike1:/mnt#

Ahhhhh! It gets even stranger. There are partitions which I didn't create but that are there. Such as:

bmike1@bmike1:/mnt$ ls hda1 (msdos)
My Documents _ bootlog.txt _io.sys _ _ _quickenw _ _ _suhdlog.dat
Program Files _command.com _msdos.--- _ recycled _ _ _system.1st
autoexec.bat _ config.sys _ msdos.sys _ scandisk.log _temp
bootlog.prv _ _detlog.txt _ netlog.txt _setuplog.txt _windows
bmike1@bmike1:/mnt$ ls hda5 (linux)(WHERE ARE ALL THE FILES?)
bmike1@bmike1:/mnt$ ls hda6<(didn't create this)(cat /proc/partitions shows that)
bmike1@bmike1:/mnt$ ls hda7<(didn't create this)
bmike1@bmike1:/mnt$ ls hda8<(didn't create this)
bmike1@bmike1:/mnt$ ls sda5
downloads _drakx-images _lost+found
bmike1@bmike1:/mnt$ ls sda5/dr*
sda5/drakx-images:
<listing of files>
bmike1@bmike1:/mnt$ ls sda5/do*<there WAS a file in here
bmike1@bmike1:/mnt$ ls sda6<(didn't create this)

If you will notice the directory listing from ls and cat /proc/partitions differ.

root@bmike1:/home/bmike1# cat /proc/partitions; cat /etc/fstab; fdisk -l /dev/sda
major minor _#blocks _name
_ _8 _ _ 0 _ _1025500 sda
_ _8 _ _ 1 _ _ 409584 sda1
_ _8 _ _ 2 _ _ _ _ _1 sda2
_ _8 _ _ 5 _ _ 511984 sda5
_ _8 _ _ 6 _ _ 103408 sda6<I didn't create this.
_ _3 _ _ 0 _ 29316672 hda
_ _3 _ _ 1 _ 14659281 hda1
_ _3 _ _ 2 _ _ _ _ _1 hda2
_ _3 _ _ 5 _ 14651248 hda5

# /etc/fstab: filesystem table.
# filesystem _mountpoint _type _options _dump _pass
/dev/cdrom _/cdrom _iso9660 _defaults,ro,user,noexec,noauto _0 _0
/dev/fd0 _/floppy _vfat _defaults,user,auto,showexec,umask=022 _0 _0
/dev/hda1 /mnt/hda1 vfat defaults,users,exec,umask=000,uid=knoppix,gid=knoppix
0 0
/dev/hda5 _/ _ext3 _defaults,errors=remount-ro _0 _1
/dev/sda5 /mnt/sda5 ext3 defaults,users,exec 0 2
/dev/sda6 /mnt/sda6 ext3 defaults,users,exec 0 2
/dev/sda1 swap swap noauto 0 0
proc _/proc _proc _defaults _0 _0

Disk /dev/sda: 1050 MB, 1050112000 bytes
64 heads, 32 sectors/track, 1001 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
_ _Device Boot _ _Start _ _ _ End _ _Blocks _ Id _System
/dev/sda1 _ * _ _ _ _ 1 _ _ _ 400 _ _409584 _ 82 _Linux swap
/dev/sda2 _ _ _ _ _ 401 _ _ _1001 _ _615424 _ _5 _Extended
/dev/sda5 _ _ _ _ _ 401 _ _ _ 900 _ _511984 _ 83 _Linux
/dev/sda6 _ _ _ _ _ 901 _ _ _1001 _ _103408 _ 83 _Linux
root@bmike1:/home/bmike1#

I am running Debian. It used to be mandrake but now I'm doing debian.

Last edited by bmike1; 08-06-2003 at 01:51 AM.
 
Old 08-06-2003, 02:30 AM   #2
bmike1
Member
 
Registered: Jul 2003
Posts: 132

Original Poster
Rep: Reputation: 15
I just realized what I was doing wrong!

IT IS mkfs /dev/<drive> NOT /mnt/<drive> as shown:

root@bmike1:/mnt# mkfs -t ext2 -j /dev/sda6
mke2fs 1.34-WIP (21-May-2003)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
25896 inodes, 103408 blocks
5170 blocks (5.00%) reserved for the super user
First data block=1
13 block groups
8192 blocks per group, 8192 fragments per group
1992 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@bmike1:/mnt# mkfs -t ext2 -j /dev/sda5
mke2fs 1.34-WIP (21-May-2003)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128016 inodes, 511984 blocks
25599 blocks (5.00%) reserved for the super user
First data block=1
63 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
 
  


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
mkfs blackzone Linux - Newbie 1 01-07-2005 12:52 AM
mkfs after fdisk? blackzone Linux - Newbie 1 01-07-2005 12:50 AM
mkfs.vfat GlobShim Linux - General 2 03-28-2004 03:56 PM
mkfs problem kaltag Linux - General 1 01-26-2004 10:27 PM
mkfs help SticklerThe1st Linux - Software 3 01-01-2003 06:45 AM


All times are GMT -5. The time now is 01:18 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