LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hidden hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/hidden-hard-drive-415185/)

Thulemanden 02-14-2006 01:25 AM

Hidden hard drive
 
I have a 2nd hard disk on my Ubuntu Hoary which I can see and format in QTparted.

However they don't appear in fstab ot through the file managers.

I have tried entering the lines in fstab but it wan't accepted. My added lines are at the end here. What can I do?

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/sda /media/usb0 auto rw,user,noauto 0 0
/dev/sdb /media/usb1 auto rw,user,noauto 0 0
/dev/hdb /media/hdb ext3 defaults 0 1
/dev/hdb1 /media/hdb1 ext3 defaults 0 1

dombrowsky 02-14-2006 01:40 AM

I assume you mounted them?
Code:

$ mount /media/hdb1
and I notice that you have /media/hdb in there. That's the block device, not the partition. I'm not sure if that's correct. Do you only have one partition on the drive?

cs-cam 02-14-2006 03:59 AM

You can't put /dev/hdb in there, there has to be a number after it or it won't work.

Thulemanden 02-14-2006 08:26 AM

Quote:

Originally Posted by cs-cam
You can't put /dev/hdb in there, there has to be a number after it or it won't work.


It shows I have this: /dev/hdb1 /media/hdb1 ext3 defaults 0

Thulemanden 02-14-2006 08:27 AM

Quote:

Originally Posted by dombrowsky
I assume you mounted them?


yes I tried but it refused.

michaelk 02-14-2006 09:04 AM

What are the errors?
Did you create the directory /media/hdb1?

Thulemanden 02-14-2006 08:07 PM

Solved
 
Quote:

Originally Posted by michaelk
What are the errors?
Did you create the directory /media/hdb1?

No, I didn't know I was supposed to, but I have now.
next step is again adding the line in fstab copied from the rest:

/dev/hdb1 /media/hdb1 auto rw,user,noauto 0 0

and then it worked :-D

The main error was I never created the folder /media/hdb1. I had never guessed that.


Thanks for the solution you gave.

Thulemanden 02-14-2006 08:47 PM

Addition
 
Furthermore, I installed KDE knowing it was easier to get desktop icons inserted and I got all my devices neatly entered with proper icons and labels. KDE has a nice Create New Link to device in it's mouse drop down curtain on the desktop.

Adding the 1's put it all in place. (It's trial and error for me, not knowing a heck of a lot about devices and blocks)

Here is the etc/fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/sdb1 /media/usb0 auto rw,user,auto 0 0
/dev/sda1 /media/usb1 auto rw,user,auto 0 0
/dev/hdb1 /media/hdb1 auto rw,user,auto 0 0

michaelk 02-14-2006 09:09 PM

The 1's are partition numbers. A hard drive can be subdivided into partitions. There is lots of info on the web but in a nutshell an IDE hard drive can be divided into 64 partitions. The first 4 are called primary partitions and all others are logical. In order to create logical partitions one of the primaries is designated an extended partition.

The following command will list the partitions of hda
fdisk -l /dev/hda (that is a small L and you must be root)

Quote:

/dev/hdb1 /media/hdb1 auto rw,user,auto 0 0
This is better.
/dev/hdb1 /media/hdb1 ext3 defaults,user 0 1

See man pages for mount and fstab but
No need to use auto since you know it is formatted as ext3. The 1 at the end means the filesystem will be periodically checked automatically.
using defaults,user means
defaults rw, suid, dev, exec, auto, nouser, and async.
user overrides defaults nouser

Thulemanden 02-14-2006 10:01 PM

Thanks, Can't help thinking Ubuntu should do this automatically, when other do (MEPIS and Xandros).

I'll update.


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