LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-27-2003, 03:10 PM   #16
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15

The problem I am having is that hda1 and sda5 will list its directories while hda6-8 will not. When you asked if I had created the directories I thought that just might be the problem. Unfortunately when I entered mkdir hda* it told me that the file was already there. It also will not read from the CDRom nor the floppy. I think it is very strange that when I ask it to list out sda5 it has no problem doing so but its entry into fstab looks just like the directories that will not list. I just had a thought that it could be it does not list anything because the drive is empty. I decided to test my theory by entering 'mount /mnt/hda6' expecting it to say 'filesystem already mounted." Was I surprised when it said, "mount: wrong fs type, bad option, bad superblock on /dev/hda6, or too many mounted file systems. hda6,7,&8responded the same way but when I entered 'mount /mnt/hda5' (the partition with root on it) it says 'mount: can't find /mnt/hda5 in /etc/fstab or /etc/mtab'. Looks like I can see it there!
Here is exactly how my fstab looks. (if more than one space the space has deen replaced with a '~' )
~~~
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/cdrom~~/cdrom~~iso9660 defaults,ro,user,noexec,nooauto~~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/hda6 /mnt/hda6 ext3 defaults,users,exec 0 2
/dev/hda7 /mnt/hda7 ext3 defaults,users,exec 0 2
/dev/hda8 /mnt/hda8 ext3 defaults,users,exec 0 2
/dev/sda6 swap swap noauto 0 0
proc~~/proc~~proc~~defaults~~0~~0
~~~
I hate being a !

Last edited by bmike1; 07-27-2003 at 03:12 PM.
 
Old 07-27-2003, 04:44 PM   #17
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Can you post the output of

fdisk -l /dev/hda

where -l is an ELL as in LIMASSOL

and then we can see what partitions you actually have on the drive and what is the type of each partition?

Also can you post the output of

ls -aFls /mnt
 
Old 07-27-2003, 04:52 PM   #18
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
ls -aFls /mnt & fdisk -l /dev/hda

root@bmike1:/home/knoppix# fdisk -l /dev/hda
Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1825 14659281 c Win95 FAT32 (LBA)
/dev/hda2 1826 3649 14651280 5 Extended
/dev/hda5 1826 3649 14651248+ 83 Linux

root@bmike1:/home/knoppix# ls -aFls /mnt
total 49
4 drwxr-xr-x 11 root root 4096 Jul 26 16:39 ./
4 drwxr-xr-x 21 root root 4096 Jul 27 2003 ../
4 -rw------- 1 root root 911 Jul 26 16:39 DEADJOE
4 drwxr-xr-x 2 root root 4096 Jul 24 18:43 cdrom/
4 drwxr-xr-x 2 root root 4096 Jul 24 18:42 floppy/
8 drwxrwxrwx 8 knoppix knoppix 8192 Jan 1 1970 hda1/
4 drwxrwxrwx 2 root root 4096 Jul 17 17:47 hda5/
4 drwxrwxrwx 2 root root 4096 Jul 17 17:47 hda6/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 hda7/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 hda8/
1 drwxr-xr-x 4 root root 1024 Jul 17 19:05 sda5/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 sda6/
root@bmike1:/home/knoppix#

Last edited by bmike1; 07-27-2003 at 05:16 PM.
 
Old 07-27-2003, 05:13 PM   #19
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
Oh no! Apparently I have an improper setting in fstab. Upon boot it stoped in the middle and it told me:
Checking all filesystems...
fsck 1.34-WIP (22-MAY-2003)
fsck.ext3: Invalid argument trying to open /dev/hda6
/dev/hda6
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck wuth an alternate superblock:
e2fsck -b 8293 <device>
fsck.ext3: Invalid argument trying to open /dev/hda7
/dev/hda7
The /dev/sda5: clean, 47/128016 files, 25497/511984 blocks
superblock could not be read (repeat of the above).
fsck failed. Please repair manually.
what did i screw up?
 
Old 07-27-2003, 05:37 PM   #20
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Re: ls -aFls /mnt & fdisk -l /dev/hda

Quote:
Originally posted by bmike1
root@bmike1:/home/knoppix# fdisk -l /dev/hda
Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1825 14659281 c Win95 FAT32 (LBA)
/dev/hda2 1826 3649 14651280 5 Extended
/dev/hda5 1826 3649 14651248+ 83 Linux
So unless fdisk is lying, the only paritions on that disk are a primary partition hda1, of type windoze FAT32, and a logical partition hda5 of type Linux (contained in the extended partition hda2).

Thus partitions hda6, hda7, and hda8 do not exist.

Since it is not possible to mount non existent partitions, this explains why trying to mount them fails and you are not able to see any directory listings for them.

Why not do an fdisk -l /dev/sda and see if the partitions which you may have thought you created on hda were actually created on sda?
 
Old 07-27-2003, 06:06 PM   #21
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
This is all screwed up! hda2 and hda5 start and stop on the same block while
sda1 goes from 1-400
sda2 and sda5 go from 401-1001
sda6 from901 to 1001
I don't know what I creaated!
There must be alot of blank space on my disk(s).
What should I do now? To get all of that wasted space back?
Here is a good question; It seems to appear that every Extended system is matched up with Linux system, is this true or just an unlucky observation?
~
I just noticed that sda1 is the swap space (Which is how I had originally configured it)

Last edited by bmike1; 07-27-2003 at 06:23 PM.
 
Old 07-27-2003, 06:30 PM   #22
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Do you have both an IDE drive (hda means IDE bus 1 master) and an SCSI (sda is the first SCSI drive) hard drive on that system?
 
Old 07-27-2003, 06:47 PM   #23
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
Yes I do have both an hd and sd on this box. I bought the hard drive in '95 (I wonder how long I have until it fails) and I pulled the SCSI and its controller card out of another computer.
 
Old 07-27-2003, 08:22 PM   #24
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,678

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Re: ls -aFls /mnt & fdisk -l /dev/hda

Quote:
Originally posted by bmike1
Disk /dev/hda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1825 14659281 c Win95 FAT32 (LBA)
/dev/hda2 1826 3649 14651280 5 Extended
/dev/hda5 1826 3649 14651248+ 83 Linux
The way a drive is partitioned you can have up to 4 primary partitions. One of the primay partitions can be an extended. Logical drives are created in an extended partition.

Looks like your IDE drive is 30gb. With half as the c: drive and the other as your linux root. hda2 is an extended paritition which in a nutshell is a place holder for logical drives. So hda2 size should be the total of all partitions 5 and up. And since hda5 is using up all of the extended space its blocks are the same.

The same is true on your SCSI drive. With two logical drives sda5 and sda6 should total to equal sda2. But with the numbers you posted they overlap. Is this true?

So how did you originally partition the IDE drive?

When you changed the fstab entry from 0 0 to 0 2 this indicates that fsck should periodically check the drive for errors on boot. Since it appears that the drives do not exist that is why there were a bunch of errors.

Post the output of fdisk for your SCSI drive i.e.
fdisk -l /dev/sda
 
Old 07-27-2003, 08:40 PM   #25
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
root@bmike1:/home/knoppix# fdisk -l /dev/sda

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/knoppix#
~~~~
I originally partitioned it with a mandrake9.0 distro I have.

Last edited by bmike1; 07-27-2003 at 08:43 PM.
 
Old 07-27-2003, 08:43 PM   #26
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Perhaps these will help.

# Partitioning
Linux Partition HOWTO
Rute - Partitions, File Systems, Formatting, Mounting
Proper Filesystem Layout

# Linux filesystem structure
Directory Navigation Help File
Filesystems, Directories, and Devices Help File
 
Old 07-27-2003, 09:03 PM   #27
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
Thanks for the links. Wish me luck!
 
Old 07-27-2003, 11:28 PM   #28
bmike1
Member
 
Registered: Jul 2003
Posts: 133

Original Poster
Rep: Reputation: 15
Re: ls -aFls /mnt & fdisk -l /dev/hda

I understand what you are saying now!
hda1is my WIN 95 partition (which it shows as 14659281 bytes large)
but I don't understand (if hda2 shows total size of hda 5-?)why the totalbyte size why it is smaller than hda5
Quote:
/dev/hda2 1826 3649 14651280 5 Extended
/dev/hda5 1826 3649 14651248+ 83 Linux
Is there a reason that its id is 5 & 83? And what about the '+' sign?
I just realized something! I can't repartition that disk. Everything is falling into place in my mind. I guess I just had to go out for a couple of hours.

As for this:
Quote:
root@bmike1:/home/knoppix# ls -aFls /mnt
total 49
4 drwxr-xr-x 11 root root 4096 Jul 26 16:39 ./
4 drwxr-xr-x 21 root root 4096 Jul 27 2003 ../
4 -rw------- 1 root root 911 Jul 26 16:39 DEADJOE
4 drwxr-xr-x 2 root root 4096 Jul 24 18:43 cdrom/
4 drwxr-xr-x 2 root root 4096 Jul 24 18:42 floppy/
8 drwxrwxrwx 8 knoppix knoppix 8192 Jan 1 1970 hda1/
4 drwxrwxrwx 2 root root 4096 Jul 17 17:47 hda5/
4 drwxrwxrwx 2 root root 4096 Jul 17 17:47 hda6/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 hda7/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 hda8/
1 drwxr-xr-x 4 root root 1024 Jul 17 19:05 sda5/
4 drwxr-xr-x 2 root root 4096 Jul 17 17:47 sda6/
root@bmike1:/home/knoppix#
I wonder why it said that knoppix determined these hard drives (drives greater than 5) were there? Why would the fact that it is the way I originally partitioned the drive have something to do with that? I suppose the auto-check checked what a program told it and not the physical drive.

What of my fstab?
[QUOTE]~~~
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/cdrom~~/cdrom~~iso9660 defaults,ro,user,noexec,nooauto~~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/hda6 /mnt/hda6 ext3 defaults,users,exec 0 2
/dev/hda7 /mnt/hda7 ext3 defaults,users,exec 0 2
/dev/hda8 /mnt/hda8 ext3 defaults,users,exec 0 2
/dev/sda6 swap swap noauto 0 0
proc~~/proc~~proc~~defaults~~0~~0
~~~ (~ = a space)

What is wrong with it that it gives me an error durring bootup? And what can I do to get the floppy and cdrom working.
(the error)
Checking all filesystems...
fsck 1.34-WIP (22-MAY-2003)

fsck.ext3: Invalid argument trying to open /dev/hda7
/dev/hda7
The /dev/sda5: clean, 47/128016 files, 25497/511984 blocks
superblock could not be read (repeat of the above).
fsck failed. Please repair manually.

what did i screw up?
Wait. There is no drive greater than 5 so my f..... what about....
Well I just tried to fix it by erasing the offending lines (hda6,7,8) to no avail. It still gives the same error (sort of). boot up reports 4 things that may be of intrest: three of them are reports for hda6,7,8 which states:
fsck.ext3: Invalid argument trying to open /dev/hda*
/dev/hda*
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck wuth an alternate superblock:
e2fsck -b 8293 <device>

Last edited by bmike1; 07-28-2003 at 12:39 AM.
 
Old 07-28-2003, 12:25 AM   #29
danny_kurniawan
Member
 
Registered: Jul 2003
Location: Surabaya - East Java, Indonesia
Distribution: Red Hat, Mandrake, Debian, Knoppix
Posts: 57

Rep: Reputation: 15
Now... it make more clear for me...

The errors that you got is because we place hda6 and hda7 to be mounted at boot time, while there is no hda6 and hda7! This false partition detections quite often happen at Knoppix (this is also one of the reason I'm suggesting bmike1 to have fix distros like RH or Mandy at other thread)...

OK... you don't need to be panic about the errors you got, it is quite safe to have them since nothing will ruin up your drive... First, you'll be thrown at single user mode with shell prompt... to fix this fstab, do the following:

# mount / -o remount,rw
# vim /etc/vstab

edit your fstab file into:

~~~
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/cdrom/cdrom~~iso9660 defaults,ro,user,noexec,nooauto~~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/hda6 /mnt/hda6 ext3 defaults,users,exec 0 2
/dev/hda7 /mnt/hda7 ext3 defaults,users,exec 0 2
/dev/hda8 /mnt/hda8 ext3 defaults,users,exec 0 2
/dev/sda6 swap swap noauto 0 0
proc~~/proc~~proc~~defaults~~0~~0
~~~
 
Old 07-28-2003, 12:37 AM   #30
danny_kurniawan
Member
 
Registered: Jul 2003
Location: Surabaya - East Java, Indonesia
Distribution: Red Hat, Mandrake, Debian, Knoppix
Posts: 57

Rep: Reputation: 15
Now... it makes more clear for me...

The errors that you got is because we place hda6 and hda7 to be mounted at boot time, while there is no hda6 and hda7! This false partition detections quite often happen at Knoppix (this is also one of the reason I'm suggesting bmike1 to have fix distros like RH or Mandy at other thread)...

OK... you don't need to be panic about the errors you got, it is quite safe to have them since nothing will ruin up your drive... First, you'll be thrown at single user mode with shell prompt... to fix this fstab, do the following:

# mount / -o remount,rw

edit your fstab file into:

~~~
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/cdrom/cdrom iso9660 ro,user,noexec,nooauto 0 0
/dev/fd0 /floppy auto user,noauto,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
proc /proc proc defaults 0 0
~~~

save it, and reboot!

Apparently you're not having correct partitions at sda, you'll have to fix them out first before using them, please check it with such PartitionMagic utils, after it, you can add them to fstab file to be mounted at boot time...

About your question regarding total size difference between extended and logical, this is normal since some space are needed for partition tables and boot records... this is almost the same case if you see total partition size differ from filesystem's total size.
 
  


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
Adding additional drives/resizing drives in RAID arrays kheldar Linux - Hardware 1 10-19-2005 01:21 PM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM
External Drives (iPod and Pen Drives) dhbiker Slackware 13 04-08-2004 06:36 AM
Re: Mandrake 9.2 destroys LG cd drives...( but what obout Lite-On cd drives?) aweir14150 Mandriva 1 03-03-2004 07:52 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:19 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
Open Source Consulting | Domain Registration