LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-10-2004, 10:09 PM   #1
Ionexchange
LQ Newbie
 
Registered: Apr 2004
Location: Tampa, Fl
Distribution: Fedora Core 2 and 3
Posts: 21

Rep: Reputation: 15
Mounting old Linux hard drive


I have an old hard drive with Red Hat Linux on it. It was part of a dual boot system and the boot loader crashed. I have mounted the old Linux drive (/dev/hdb1) however it only shows me the boot directory. How do I access the other directories.

Here is the output of fdisk -l for the hdb1
Disk /dev/hdb: 10.2 GB, 10205282304 bytes
255 heads, 63 sectors/track, 1240 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 1240 9960268+ c Win95 FAT32 (LBA)
/dev/hdb2 1241 1241 0 e Win95 FAT16 (LBA)

Thanks
Milton
 
Old 06-10-2004, 11:46 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
The subject is misleading as apparently you know how to mount the drive, and apparently they are Windows drives from the filesystems.
cd (change directory, spaces in names must be inclosed in delimiters such as quote marks)
Examples:
cd /mnt/<your-mount-point>/"My Documents"
ls -al (list all long)

Remember that Linux is case sensitive where Windows isn't.

Last edited by fancypiper; 06-10-2004 at 11:49 PM.
 
Old 06-11-2004, 07:50 AM   #3
Ionexchange
LQ Newbie
 
Registered: Apr 2004
Location: Tampa, Fl
Distribution: Fedora Core 2 and 3
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by fancypiper
The subject is misleading as apparently you know how to mount the drive, and apparently they are Windows drives from the filesystems.
cd (change directory, spaces in names must be inclosed in delimiters such as quote marks)
Examples:
cd /mnt/<your-mount-point>/"My Documents"
ls -al (list all long)

Remember that Linux is case sensitive where Windows isn't.
Ahh, but there's another problem. This disk is purely linux, I don't know why fdisk is showing the disk as FAT32. This hard drive was part of a dual boot system where one hard drive had Windows 2000 and the boot manager and the other disk (this one in question) had Linux

Milton
 
Old 06-11-2004, 12:19 PM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting

Do you remember how many partitions you created after shrinking your partition and splitting? Did this drive contain /, swap and others?

Ah, maybe you told it to only list hdb1. What's on the entire drive?

Try one more time, making sure you give this command exactly as root:

fdisk -l /dev/hdb

Put no number after the b. This should list all partitions on the drive.

Here is my output on a multi boot system:
Code:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1215   9755991    c  Win95 FAT32 (LBA)
/dev/hda2          1215      2429   9751455    7  HPFS/NTFS
/dev/hda3          2429      2446    140017+  83  Linux
/dev/hda4          2447      4865  19430617+   5  Extended
/dev/hda5          2447      2516    562243+  83  Linux
/dev/hda6          2517      3368   6843658+  83  Linux
/dev/hda7          3369      3795   3429846   83  Linux
/dev/hda8          3796      4222   3429846   83  Linux
/dev/hda9          4223      4865   5164866   83  Linux
Here is my /etc/fstab file to show what is what in those partitions:
Code:
# Duron 950 uilleann Fedora Core 1 /etc/fstab file
/dev/hda7       /                       ext3            defaults        1 1
/dev/hda3       /boot                   ext3            defaults        1 2
none            /dev/pts                devpts          gid=5,mode=620  0 0
#/dev/hda6      /mnt/gentoo             ext3            defaults        1 2
#/dev/hda8      /pub/home/fancy/Pictures                   ext3            defaults        1 2
/dev/hdb1       /pub                    ext3            defaults        1 2
/dev/hda9       /pub/home/fancy/stuff   ext3            defaults        1 2
/dev/hda1       /mnt/win98              vfat            defaults        0 0
/dev/hda2       /mnt/win2k              ntfs            defaults        0 0
/dev/hdc1       /mnt/fat32              vfat            defaults        0 0
none            /proc                   proc            defaults        0 0
none            /dev/shm                tmpfs           defaults        0 0
/dev/hda5       swap                    swap            defaults        0 0
/dev/cdrom      /mnt/cdrom              udf,iso9660     noauto,owner,ro 0 0
/dev/fd0        /mnt/floppy             auto            noauto,owner    0 0
Also, once drives are mounted, try the mount command to see what partitions mounted and the filesystem types they contain.
Code:
Fri Jun 11 01:17 PM root@uilleann ~ # mount
/dev/hda7 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda3 on /boot type ext3 (rw)
/dev/hdb1 on /pub type ext3 (rw)
/dev/hda9 on /pub/home/fancy/stuff type ext3 (rw)
/dev/hda1 on /mnt/win98 type vfat (rw)
/dev/hda2 on /mnt/win2k type ntfs (rw)
/dev/hdc1 on /mnt/fat32 type vfat (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda6 on /mnt/gentoo type ext3 (rw)
/dev/hda3 on /mnt/gentoo/boot type ext3 (rw)
/dev/hdb1 on /mnt/gentoo/pub type ext3 (rw)
proc on /mnt/gentoo/proc type proc (rw)

Last edited by fancypiper; 06-11-2004 at 12:41 PM.
 
Old 06-11-2004, 11:13 PM   #5
Ionexchange
LQ Newbie
 
Registered: Apr 2004
Location: Tampa, Fl
Distribution: Fedora Core 2 and 3
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by fancypiper
# Managing drives
LNAG - Accessing my drives
Rute - Device Mounting

Do you remember how many partitions you created after shrinking your partition and splitting? Did this drive contain /, swap and others?

Ah, maybe you told it to only list hdb1. What's on the entire drive?

Try one more time, making sure you give this command exactly as root:

fdisk -l /dev/hdb

Put no number after the b. This should list all partitions on the drive.

Here is my output on a multi boot system:
Code:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      1215   9755991    c  Win95 FAT32 (LBA)
/dev/hda2          1215      2429   9751455    7  HPFS/NTFS
/dev/hda3          2429      2446    140017+  83  Linux
/dev/hda4          2447      4865  19430617+   5  Extended
/dev/hda5          2447      2516    562243+  83  Linux
/dev/hda6          2517      3368   6843658+  83  Linux
/dev/hda7          3369      3795   3429846   83  Linux
/dev/hda8          3796      4222   3429846   83  Linux
/dev/hda9          4223      4865   5164866   83  Linux
Here is my /etc/fstab file to show what is what in those partitions:
Code:
# Duron 950 uilleann Fedora Core 1 /etc/fstab file
/dev/hda7       /                       ext3            defaults        1 1
/dev/hda3       /boot                   ext3            defaults        1 2
none            /dev/pts                devpts          gid=5,mode=620  0 0
#/dev/hda6      /mnt/gentoo             ext3            defaults        1 2
#/dev/hda8      /pub/home/fancy/Pictures                   ext3            defaults        1 2
/dev/hdb1       /pub                    ext3            defaults        1 2
/dev/hda9       /pub/home/fancy/stuff   ext3            defaults        1 2
/dev/hda1       /mnt/win98              vfat            defaults        0 0
/dev/hda2       /mnt/win2k              ntfs            defaults        0 0
/dev/hdc1       /mnt/fat32              vfat            defaults        0 0
none            /proc                   proc            defaults        0 0
none            /dev/shm                tmpfs           defaults        0 0
/dev/hda5       swap                    swap            defaults        0 0
/dev/cdrom      /mnt/cdrom              udf,iso9660     noauto,owner,ro 0 0
/dev/fd0        /mnt/floppy             auto            noauto,owner    0 0
Also, once drives are mounted, try the mount command to see what partitions mounted and the filesystem types they contain.
Code:
Fri Jun 11 01:17 PM root@uilleann ~ # mount
/dev/hda7 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda3 on /boot type ext3 (rw)
/dev/hdb1 on /pub type ext3 (rw)
/dev/hda9 on /pub/home/fancy/stuff type ext3 (rw)
/dev/hda1 on /mnt/win98 type vfat (rw)
/dev/hda2 on /mnt/win2k type ntfs (rw)
/dev/hdc1 on /mnt/fat32 type vfat (rw)
none on /dev/shm type tmpfs (rw)
/dev/hda6 on /mnt/gentoo type ext3 (rw)
/dev/hda3 on /mnt/gentoo/boot type ext3 (rw)
/dev/hdb1 on /mnt/gentoo/pub type ext3 (rw)
proc on /mnt/gentoo/proc type proc (rw)

Thanks but I know the output I generated is from
fdisk -l
as root. I omitted the output of hda because that drive is not important. I do not remember all the partitions for the disk in question but I do remember the partitioning was a normal Linux installation so I guess it had a boot partition, one regular disk partition, a / partition, and one swap. Here is another bizarre characteristic. The output of

df -h

shows that the disk is only 16M large but the output of fdisk shows the disk to be 10G.


Thanks
Milton
 
  


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
Need help mounting a hard drive cevilgenius Linux - Newbie 15 04-12-2005 02:35 PM
mounting hard drive thug_poet22 Linux - Hardware 14 01-04-2005 02:11 AM
Mounting a Hard Drive Bill413 Linux - Newbie 6 11-15-2004 05:19 PM
mounting a hard drive n_ick2000 Linux - Newbie 5 04-10-2002 04:40 PM
Mounting hard drive Runt888 Linux - Newbie 1 08-29-2001 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:25 PM.

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