LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-30-2004, 06:08 PM   #1
Utah
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 73

Rep: Reputation: 15
Seeing my hard disk in Knoppix?


I'm a real newbie...

So, I'm normally running Fedora Core 1 but I want to be able to use a Knoppix CD as an emergency rescue type of disk in case (when) I screw up my Fedora distro. But I can't figure out how to see my hard drive when I boot from the Knoppix CD. Is that even possible? (Seems like it wouldn't be very useful if it wasn't)

In Fedora, my (Serial ATA) drive is /dev/hdi (hdi1, 2 and 3 for /boot, /, and swap).

But in Knoppix, /dev/hdi doesn't even exist. I've tried mounting /dev/hda and several others but only get error messages.

eg: (as root)

mount -t ext3 /dev/hda /mnt/hd

Mount: wrong fs type, bad option, bad superblock on /dev/hda or too many mounted filesystems.

Is trying to mount the disk even the right approach? And does that command seem correct? And, if so, how do I know which device file is for the hard disk?

Lots of (probably stupid newbie type) questions. 8^)

Thanks in advance for any help.

utah
 
Old 06-30-2004, 06:51 PM   #2
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 56
Try mounting in knoppix as a scsi device, eg /dev/sda#.
 
Old 06-30-2004, 07:12 PM   #3
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
I think your approach and the basic command are correct, but could it be that the file system is not ext3? In other words, the error you indicate actually could be due to FC1 using ext2 or reiser, etc, and if so, it may be that -t parameter is incorrect. -- J.W.
 
Old 06-30-2004, 07:12 PM   #4
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
mount -t ext3 /dev/hda2 /mnt/hd

You have to specify the partition number
 
Old 06-30-2004, 08:15 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
D'oh!!!! Of course -- I didn't even notice that. Darthtux's advice is right on. -- J.W.
 
Old 06-30-2004, 11:50 PM   #6
Utah
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 73

Original Poster
Rep: Reputation: 15
Yes, I guess I need the partition number in there but I'm still getting the same errors.

My biggest question is how do I know what device file to use for the hard disk. There are LOTS of them even if I assume it is /dev/hd* .

Is there some way to scan for hard disks?

And, although your replies implied it, can someone confirm that Knoppix can, indeed, access my hard drive?

Thanks,

utah
 
Old 07-01-2004, 12:19 AM   #7
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Utah -- Knoppix should be able to detect your drive. Let me suggest this: boot up Knoppix, then open a terminal session. As root, enter the command
Code:
fdisk -l
This will list the paritions on your system, and hopefully that should permit you determine the partition numbers you need. If your PC still won't cooperate, it might be helpful to post the output from the fdisk -l listing in any future posts. -- J.W.
 
Old 07-01-2004, 06:38 PM   #8
Utah
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 73

Original Poster
Rep: Reputation: 15
Thanks JW,


When I run that command on my standard Fedora Core 1 distro I get the following:

[root@doc root]# fdisk -l

Disk /dev/hdi: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdi1 * 1 13 104391 83 Linux
/dev/hdi2 14 8937 71682030 83 Linux
/dev/hdi3 8938 9165 1831410 82 Linux swap
[root@doc root]#



************************************************
But on Knoppix (3.4), it returns absloutely NOTHING. ************************************************

???
utah
 
Old 07-28-2004, 05:09 AM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,740

Rep: Reputation: 262Reputation: 262Reputation: 262
I have the same problem with my hard drives(hdi,hdj and hdk) in knoppix. The problem is knoppix refuses to make any /dev/hdx where x>h. You can make the /dev/hdx by using the mknod command which has the syntax:

# mknod -m 666 /dev/hdx b <Major number> <Minor number>

The kernel really doesn't care what you call the device; it just looks at the major and minor numbers in its communication with the device. You can get the magic numbers by running:

$ cat /proc/partitions

For hdi the major number is 56 and the minor is 0, for hdi1(56 1), hdi2(56 2)...hdix(56 x). Make hdi first using 56 0 then the individual partitions, hdi1, hdi2 and hdi3. After you make them with the mknod command you can mount the partitions in knoppix.
 
Old 07-28-2004, 12:03 PM   #10
Utah
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 73

Original Poster
Rep: Reputation: 15
Wow! That worked! Thanks kilgoretrout. I had given up, since I had read somewhere that Knoppix doesn't support SATA hard drives. But (at least with Knoppix 3.4) that is not true.

Using your instructions modified for my situation as below:


I checked the partitions first in Fedora using:
#cat /proc/partitions
which verified the major and minor numbers for me.

I then booted Knoppix and looked at the partitions file again. To my surprise, it showed all the same partitions and major/minor numbers (of course).


I created two device files using:

#mknod -m 666 /dev/hdi b 56 0 (the entire drive)
#mknot -m 666 /dev/hdi2 b 56 2 (the / partition)

Then mounted hdi2 with:

#mount -t ext3 /dev/hdi2 /mnt/hd



Thanks again for the right answer and some good education.

utah
 
Old 07-28-2004, 08:03 PM   #11
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,740

Rep: Reputation: 262Reputation: 262Reputation: 262
Glad it worked for you. One thing I discovered fooling around with this is it doesn't matter what you call the device file. In frustration, I designated one /dev/mybut and /dev/mybut1. As long as you have the right magic numbers you can mount the device. I guess that's all the kernel cares about.
 
Old 07-29-2004, 06:38 PM   #12
Utah
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 73

Original Poster
Rep: Reputation: 15
Another great observation. These kind of things really go a long way toward making me really understand what's going on rather than just knowing what "buttons" to push. Thanks for the insight.

utah
 
  


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
Cloning 1 hard disk to smaller hard disk, dd or ghost? fireman949 Linux - Hardware 8 12-23-2012 12:51 AM
Knoppix 4.0 DVD from hard disk excidy Linux - Software 4 09-12-2005 09:12 AM
Can Knoppix be installed on hard-disk? ZhiYi Linux - Software 3 04-25-2005 06:09 AM
colinux with hard disk knoppix install cheech66 Linux - Newbie 0 05-30-2004 04:25 AM
Knoppix to hard disk: complete steps jfchui Linux - Newbie 2 04-17-2004 04:20 PM

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

All times are GMT -5. The time now is 07:21 AM.

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