LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-05-2007, 06:02 PM   #1
infekt
Member
 
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Rep: Reputation: 15
Windows HHD??


Hi there,
I have 2 hard drives: 160 Gb HDD with Suse 10.2 running and another 160 Gb HDD with Windows XP running. I have all my mp3s on my XP drive so naturally I want to access those in Suse. Problem was that while installing Suse I unpluged my XP drive so its not been detected by Suse now. Both drives are in the same machine. The XP drive is fat 32 (i think- is there a way to check this?)

Basically I want to be able to access my XP drive- How would I detect and mount the XP drive in Suse 10.2? Any help would help, or even a point in the right direction. Thanks.
 
Old 01-05-2007, 06:25 PM   #2
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
hda = master on primary controller
hdb = slave on primary controller
hdc = master on secondary controller
hdd = slave on secondary controller

You need to create a mount point for it, like /windows in the filesystem:

mkdir /windows

as root.

Then you need to place an entry in your /etc/fstab file that connects the device to the mount point:

/dev/hdb /windows fat32 defaults,users,rw 1 1

You'll have to verify what I wrote above. Particularly the the device in the first field and the parameters in the third field. I'm not sure using "defaults" is the right thing to do for a fat32 drive, or even "users".

Then try mounting it:

mount /windows

If the entry in fstab is correct, you should be able to see /windows in your filesystem. But check the parameters in man fstab first.
 
Old 01-05-2007, 06:34 PM   #3
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Depending on how your drive is formatted, you might not want /dev/hdb, since this is the raw device for the entire drive including boot sector and partition table.

/dev/hdb1 = first partition on /dev/hdb
/dev/hdb2 = second partition on /dev/hdb

etc.

Run:

fstab -l /dev/hdb

as root to list your partitions.
 
Old 01-05-2007, 06:35 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Run the command as root /sbin/fdisk -l to see what drives and partitions it sees with thier types. Post output.

Brian
 
Old 01-06-2007, 03:03 AM   #5
infekt
Member
 
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Original Poster
Rep: Reputation: 15
Disk /dev/sda: 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/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 19457 133210980 83 Linux

Disk /dev/sdb: 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/sdb1 * 1 9781 78565851 c W95 FAT32 (LBA)
/dev/sdb2 9782 17512 62099257+ f W95 Ext'd (LBA)
/dev/sdb3 17513 19457 15623212+ 77 Unknown
/dev/sdb5 9782 17512 62099226 b W95 FAT32
 
Old 01-06-2007, 09:25 AM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Ok all the partitions on the second sata or scsi drive is fat32. You can use the filesystem type vfat when mounting. Post contents of your current /etc/fstab file for options used by the other mounts. But from the above post the line in fstab for say /dev/sda5 would like this. Note your options like user may be user or users. Minor difference distro to distro.
Code:
/dev/sdb5       /mnt/sdb5   fat32     auto,umask=000,defaults,users,rw 1 1
You can read the manpages on fstab and mount to learn about the options I listed in more detail. The auto will automatically mount the partition at boot. Umask allows all users to read and write to the partition, just not root only. Again users maybe user just depends on what the other lines in your fstab file is like. Now for the above to work you need to have a directory created in /mnt called sdb5. You can name it to what every you wish call it drivee if you it is the E drive in windows. They just need to match.

Brian
 
Old 01-06-2007, 10:01 AM   #7
infekt
Member
 
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Original Poster
Rep: Reputation: 15
Here is my current fstab content:
Code:
/dev/sda2            /                    ext3       acl,user_xattr        1 1
/dev/sda3            /home                ext3       acl,user_xattr        1 2
/dev/sda1            swap                 swap       defaults              0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/fd0             /media/floppy        auto       noauto,user,sync      0 0
 
Old 01-06-2007, 10:43 AM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Lets do /dev/hda5. Open a terminal session and su to root. Using and editor edit the file /etc/fstab. Add the following line after say the /dev/sda1.
Code:
/dev/sdb5       /mnt/sdb5   fat32     auto,umask=000,defaults,user,rw 0 0
Now make the directory /mnt/sdb5.
cd /mnt
mkdir sdb5

Now mount it. No reboot required. Changes to fstab take effect immediately.
mount /dev/sdb5

Brian
 
Old 01-06-2007, 11:08 AM   #9
infekt
Member
 
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Original Poster
Rep: Reputation: 15
Okay I added the following line to fstab
Code:
/dev/sdb5            /sdb5             	  vfat	     auto,unmask=000,defaults,user,rw      0 0
(I changed the fat32 to vfat because it asked me if that is waht i ment during mounting)

Then I created the /sdb5 dir and typed the following as root:
Code:
# mount sdb5
mount: wrong fs type, bad option, bad superblock on /dev/sdb5,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
Okay I just tried to mount after editing the fstab file. Line now reads:
Code:
/dev/sdb5            /sdb5             	  vfat	     defaults,user,rw      0 0
Will this make a difference? Is this okay.
I can now see Drive D (for windows - I had 2 partitions).

Question, what are the "0 0" for? What is "1 1"?
 
Old 01-06-2007, 01:09 PM   #10
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Check out this post on that. http://learn.clemsonlinux.org/wiki/Fstab
Or using the man command to learn about many linux commands.
ie:
man fstab
man mount
man ls
man fdisk

In your post you have unmask, it is mispelled and should be umask.
Use of default should automount on boot.
Using mount sdb5 I would think it would have produced a different error. One would use
mount /sdb5
or
mount /dev/sdb5

Glad to see you have it going now.
Brian
 
Old 01-08-2007, 01:59 PM   #11
infekt
Member
 
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Original Poster
Rep: Reputation: 15
Thank you all. You've all helped.
 
  


Reply



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
Hhd Install??????????????????????????????????? lowlux Linux - Hardware 5 11-05-2006 02:16 PM
hhd help... tkienzle Linux - Hardware 2 09-10-2006 06:14 PM
new hhd snoply Linux - Hardware 5 05-31-2005 09:37 AM
new hhd snoply Linux - Hardware 2 05-30-2005 07:08 PM
Problem with display - HHD nearly full! gmichel Linux - Newbie 3 11-25-2003 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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