LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Finding another partition on another drive (https://www.linuxquestions.org/questions/linux-newbie-8/finding-another-partition-on-another-drive-137853/)

GoatKing 01-23-2004 01:09 PM

Finding another partition on another drive
 
Hello,

I'm using RH9 right now, but I can also boot into Windows XP. I used partition magic 8 in windows to create an ext3 partition on a separate hard drive, to be used as a backup storage for when I'm in linux. When I boot into rh9, I can't find it. I'm confused because I know Linux uses a single root file system, so I don't know where to look to access this new partition.

Can anybody point me in the right direction?

Thanks in advance.

Skyline 01-23-2004 01:19 PM

You'll have to create a mount point and mount it first.......

ranger_nemo 01-23-2004 01:28 PM

I'm guessing it's IDE, otherwise the examples below would be a little different.

If you know what drive it is in the system (primary- / secondary- / -master / -slave), you can find it pretty easily. As root, run "fdisk -l /dev/hdX", replacing the X as follows...

primary-master = a
primary-slave = b
secondary-master = c
secondary-slave = d

So, if it's the primary-slave, the device is /dev/hdb. The fdisk -l command will list all partitions on the drive specified. My output on my Linux-only laptop is...
Code:

# fdisk -l /dev/hda

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start      End    Blocks  Id  System
/dev/hda1  *        1        16    128488+  83  Linux
/dev/hda2            17      1321  10482412+  83  Linux
/dev/hda3          1322      1337    128520  82  Linux swap
/dev/hda4          1338      7296  47865667+  83  Linux

If it's the only Linux partition on the drive, it will stick out in the "System" column.

To find where it might be automagic'ly mounted, look in the file /etc/fstab. This will list all the partitions Linux knows about on your system. Let's pretend you found a Linux partition at /dev/hdb2 with the fdisk command. Then, you look for the entry in your fstab with that partition. It might look like...
Code:

/dev/hdb2    /mnt/storage    ext3    defaults    1 2
The first column is the partition, the second is the mount-point. In this fake case, the partition is mounted as /mnt/storage. You could then see what was in that partition with "ls /mnt/storage".

<<EDIT>>

Almost forgot... If you don't find it listed in the fstab, then you will have to create a mount-point and manually mount the partition.
Code:

# mkdir /mnt/storage
# mount -t ext3 /dev/hdb4 /mnt/storage
# ls /mnt/storage

Copy over whatever you want to back-up, then unmount the partition with...
Code:

# umount /mnt/storage

GoatKing 01-23-2004 01:40 PM

I'm good to go, thanks guys.


All times are GMT -5. The time now is 03:41 PM.