Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 03-01-2007, 03:19 PM   #1 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default How can I detect another Hard Disk in linux?

Hi. I have attached another HD (in slave mode). Its NTFS file System with 5 partitions.one with windows xp installed with it. it was automatically detected by Xp. but with PCQ linux 2004 I cant find that HD. in my own HD one partition is NTFS. the linux is alright with it. so whats the problem with the other HD?
tanmoy_rajguru2005 is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 03-01-2007, 03:44 PM   #2 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: How can I detect another Hard Disk in linux?

Check the output of fdisk -l . It's small L not big i.
Code:
su
fdisk -l
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-01-2007, 04:11 PM   #3 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default Re: How can I detect another Hard Disk in linux?

Disk /dev/hda: 40.0 GB, 40060403712 bytes
255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1531 4869 26820486 7 HPFS/NTFS
/dev/hda2 1 1530 12289693+ 83 Linux

Partition table entries are not in disk order

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


this is the out put
tanmoy_rajguru2005 is offline  
Old 03-01-2007, 09:57 PM   #4 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: How can I detect another Hard Disk in linux?

there you go. /dev/hdb is the other drive. Try
Code:
fdisk -l /dev/hdb
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-01-2007, 10:00 PM   #5 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default Re: How can I detect another Hard Disk in linux?

ok I got it. but my problem how can I get the files like songs videos in the second hard disk and play them. in which folder thery are?
tanmoy_rajguru2005 is offline  
Old 03-01-2007, 10:40 PM   #6 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: How can I detect another Hard Disk in linux?

Do this
Code:
su
mkdir /mnt/windows
gedit /etc/fstab
FIrst line will create folder named windows in /mnt/ folder. You can replace windows with any word of your liking. And instead of /mnt you can also use /media directory to create that folder
Second line will open up fstab file in gedit text editor. Replace gedit with kate in the command if you have kde running. Then add the following line
Code:
/dev/hdb  /mnt/windows   ntfs  defualts   0 0
Then give the following command
Code:
mount -a
Is your whole of 2nd hard drive as one ntfs partition?
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-01-2007, 10:53 PM   #7 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default Re: How can I detect another Hard Disk in linux?

nope.
part of my second hard drive is FAT32

total list is here

[root@localhost root]# fdisk -l /dev/hdb

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 973 7815591 7 HPFS/NTFS
/dev/hdb2 974 9729 70332570 f Win95 Ext'd (LBA)
/dev/hdb5 974 4914 31656051 7 HPFS/NTFS
/dev/hdb6 4915 7541 21101346 b Win95 FAT32
/dev/hdb7 7542 9729 17575078+ b Win95 FAT32
[root@localhost root]#



and i am getting this after mount -a

[root@localhost root]# mount -a
mount: wrong fs type, bad option, bad superblock on /dev/hdb,
or too many mounted file systems
__________
after gedit /etc/fstab this i got the following and added the last line

LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
# ***Start Of PCQLinux mountwinpartitions (NTFS) enteries***
/dev/hda1 /mnt/C-ntfs: ntfs defaults 0 0
# ***End Of PCQLinux mountwinpartitions (NTFS) script enteries***
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdb /mnt/windows ntfs defaults 0 0

Last edited by tanmoy_rajguru2005; 03-01-2007 at 10:53 PM. Reason: Automerged Doublepost
tanmoy_rajguru2005 is offline  
Old 03-01-2007, 10:59 PM   #8 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: How can I detect another Hard Disk in linux?

yeah it wont work as you didn't give me proper partition layout.
Now replace hdb with hdb1
Similarly for hdb5 just change the dir name
For hdb2,6,7 replace ntfs with vfat
ntfs partition are read onlt by default. Install some software like ntfs-3g to enable writing to ntfs
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-01-2007, 11:10 PM   #9 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default Re: How can I detect another Hard Disk in linux?

thank you. I made it for the first drive and then trying for the others. thnx again

BTW how can i unmount them all

Last edited by tanmoy_rajguru2005; 03-01-2007 at 11:34 PM.
tanmoy_rajguru2005 is offline  
Old 04-01-2007, 12:37 AM   #10 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,657
Default Re: How can I detect another Hard Disk in linux?

Use the umount <mount_device> command. [Not unmount, but umount].
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 04-01-2007, 11:10 AM   #11 (permalink)
GaurishSharma.com
 
gary4gar's Avatar
 
Join Date: May 2005
Location: Jaipur
Posts: 4,097
Default Re: How can I detect another Hard Disk in linux?

try
Code:
man umount
for mor details
gary4gar is offline  
Old 04-01-2007, 06:35 PM   #12 (permalink)
Broken In
 
Join Date: Nov 2005
Location: kolkata
Posts: 135
Default Re: How can I detect another Hard Disk in linux?

so for every new hardware (HD or CD writer) I attach I have to mount it before i can use it?
tanmoy_rajguru2005 is offline  
Old 04-01-2007, 07:54 PM   #13 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: How can I detect another Hard Disk in linux?

Yes but if you have autofs, which I guess is there in many distros, then it will be automatically mounted, if it is detected.
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 04-01-2007, 08:15 PM   #14 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,657
Default Re: How can I detect another Hard Disk in linux?

Also you can create an entry under /etc/fstab which'll automount your specified devices on boot up automatically.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2