LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Windows HHD?? (https://www.linuxquestions.org/questions/linux-newbie-8/windows-hhd-516735/)

infekt 01-05-2007 06:02 PM

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.

penguiniator 01-05-2007 06:25 PM

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.

zhangmaike 01-05-2007 06:34 PM

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.

Brian1 01-05-2007 06:35 PM

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

Brian

infekt 01-06-2007 03:03 AM

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

Brian1 01-06-2007 09:25 AM

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

infekt 01-06-2007 10:01 AM

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


Brian1 01-06-2007 10:43 AM

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

infekt 01-06-2007 11:08 AM

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"?

Brian1 01-06-2007 01:09 PM

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

infekt 01-08-2007 01:59 PM

Thank you all. You've all helped.


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