LinuxQuestions.org
Help answer threads with 0 replies.
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 09-30-2010, 06:15 AM   #1
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Simultaneous access of 2 hard-disks (each having a Linux Distro on it) from the same laptop


I have Linux installed on my laptop and now I have installed Linux on my external hard-disk too.

I was planning to use the external harddisk as a backup medium for my data. I was planning to use data synchronization softwares and all that...

Now I have realized when I boot from my external hard-disk I can't see the other hard-disk and vice-versa

What is the way out now ?? Help !
 
Old 09-30-2010, 06:23 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by anishakaul View Post
Now I have realized when I boot from my external hard-disk I can't see the other hard-disk and vice-versa
You can't see it from where?
 
Old 09-30-2010, 06:25 AM   #3
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
I meant from the booted external harddisk. Can I see it from there ?
 
Old 09-30-2010, 06:45 AM   #4
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Okay, first of all we have to check if both disks are visible to the OS itself.
Check with fdisk -l if the OS sees both disks. If it does, you probably have to mount the other disk manually.

If not check dmesg output for messages about the disks.
Code:
# dmesg | grep [hs]d[ab]
will probably do the trick.
Should give you something like this
Code:
[    1.625227] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[    1.625313] sd 0:0:0:0: [sda] Write Protect is off
[    1.625317] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    1.625353] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.625567]  sda: sda1 sda2 sda3
[    1.648211] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.521124] EXT3-fs (sda1): using internal journal
[    2.521131] EXT3-fs (sda1): mounted filesystem with ordered data mode
[    7.156229] sd 3:0:0:0: [sdb] 781422768 512-byte logical blocks: (400 GB/372 GiB)
[    7.156318] sd 3:0:0:0: [sdb] Write Protect is off
[    7.156322] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    7.156360] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    7.156590]  sdb: sdb1 sdb2
[    7.162191] sd 3:0:0:0: [sdb] Attached SCSI disk
Check the output for error messages.
And post it here if there are Warning or Error messages.

_____________
Gerrard
 
1 members found this post helpful.
Old 09-30-2010, 08:42 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Many thanks to you, gdejonge, See the result below:
What I am supposed to do now ?
Code:
anisha@Eccentric-aquarian ~ $ fdisk -l
anisha@Eccentric-aquarian ~ $ dmesg | grep [hs]d[ab]
[    3.244414] sd 2:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[    3.244492] sd 2:0:0:0: [sda] Write Protect is off
[    3.244495] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.244525] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.244760]  sda:
[    3.587812]  sda1 sda2 sda3 < sda5 sda6 >
[    3.626232] sd 2:0:0:0: [sda] Attached SCSI disk
[    7.942557] sd 5:0:0:0: [sdb] 976773167 512-byte logical blocks: (500 GB/465 GiB)
[    7.943052] sd 5:0:0:0: [sdb] Write Protect is off
[    7.943056] sd 5:0:0:0: [sdb] Mode Sense: 1c 00 00 00
[    7.943059] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    7.944810] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    7.944816]  sdb: sdb1 sdb2 < sdb5 > sdb3
[    8.031679] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[    8.031684] sd 5:0:0:0: [sdb] Attached SCSI disk
[    8.653140] EXT4-fs (sdb1): mounted filesystem with ordered data mode
[   16.651558] Adding 3998712k swap on /dev/sdb5.  Priority:-1 extents:1 across:3998712k 
[   16.665669] Adding 4264952k swap on /dev/sda6.  Priority:-2 extents:1 across:4264952k 
[   17.828121] EXT4-fs (sdb3): mounted filesystem with ordered data mode
anisha@Eccentric-aquarian ~ $
 
Old 09-30-2010, 09:22 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
No output from fdisk -l ?
You may need to be root for fdisk -l to work properly

Your OS detects 2 disks /dev/sda and /dev/sdb

/dev/sda has partitions sda1 sda2 sda3 sda5 sda6
/dev/sdb has partitions sdb1 sdb2 sdb3 sdb5
sdb1 and sdb3 are formatted as etx4
sdb5 and sda6 are formatted as swap

mount
will tell you what is currently mounted where (Ie the disk which is mounted at / is currently running your OS)

So you will be able to work out which disk is the other one, and then mount its partitions
with the mount command.
 
1 members found this post helpful.
Old 09-30-2010, 09:25 AM   #7
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Many thanks to you tredegar, for the reminder
Code:
Eccentric-aquarian ~ # fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f0989

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1306    10490413+  83  Linux
/dev/sda2            1307        6528    41945715   83  Linux
/dev/sda3            6529       19458   103853057    5  Extended
/dev/sda5            6529       18927    99587072   83  Linux
/dev/sda6           18927       19458     4264960   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003061f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         623     4999168   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2             623        1121     3998721    5  Extended
/dev/sdb3            1121       60802   479385600   83  Linux
/dev/sdb5             623        1121     3998720   82  Linux swap / Solaris
 
Old 09-30-2010, 09:34 AM   #8
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
mount output:
Code:
Eccentric-aquarian ~ # mount
/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sdb3 on /home type ext4 (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
 
Old 09-30-2010, 09:40 AM   #9
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Okay, I assume that the 160GB disk is the one in your laptop and that you booted off the external disk.

create some directories where you want to mount the partitions of the internal disk. Lets try
mkdir /media/part1
mkdir /media/part2
mkdir /media/part3

Now you can mount the partitions with
mount /dev/sda1 /media/part1
mount /dev/sda2 /media/part2
mount /dev/sda5 /media/part3

Now you should be able to browse through those directories with your favorite filemanager.

__________________
Gerrard
 
1 members found this post helpful.
Old 09-30-2010, 09:56 AM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,680
Blog Entries: 29

Original Poster
Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thank you :)

Many thanks to you, gdejonge
It worked and now I can see the data from the laptop harddisk !

Thanks again !
Code:
Eccentric-aquarian media # ls
Eccentric-aquarian media # mkdir part1
Eccentric-aquarian media # mkdir part2
Eccentric-aquarian media # mount /dev/sda1 part1
Eccentric-aquarian media # cd part1
Eccentric-aquarian part1 # ls
bin  boot  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  sbin  selinux  srv  success  sys  tmp  usr  var
Eccentric-aquarian part1 # cd home/
Eccentric-aquarian home # ls
Eccentric-aquarian home # mount /dev/sda2 /media/part2
Eccentric-aquarian home # cd ..
Eccentric-aquarian part1 # cd ..
Eccentric-aquarian media # cd part2
Eccentric-aquarian part2 # ls
anisha  lost+found
Eccentric-aquarian part2 # cd anisha
Eccentric-aquarian anisha # ls
bin  Comics  cppPrograms  Desktop  Documents  Frm_Reports.aspx  How to install wireless LAN card  Photography  tarballs
 
  


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
XP / Linux installation on two different Hard disks Strykaas Linux - Newbie 18 02-25-2006 06:06 PM
linux doesn't see my other 2 hard disks tr6boy Linux - Hardware 5 07-19-2004 05:09 PM

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

All times are GMT -5. The time now is 02:31 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