LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 03-28-2006, 12:39 AM   #1
twentyfour
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Mounting external EXT3 via USB on FC4


I've searched here and found some good information but nothing exactly like what I'm looking for. Consider this a "newbie" post. I've got a fair amount of experience with some things on Linux, but I've never had to do anything like this.

I was previously running a server under RH9 and it experienced (what I assume was) a hard drive "crash". I don't know the particulars as I'm not smart on drive post-mortem tools. It now refuses to boot with a kernel panic and some nasty EXT3 errors. I can possibly capture those errors if there is a need but I figured it would be just as easy to remount the drive in an external USB box and pull the vital data off. Truthfully, my question is not related to the crash directly -- I've resolved that the drive will not boot but would really like to get certain bits of data off the drive.

The RH9 drive was the only drive in the machine and hence had a swap partition and the other standard (don't know what else to call them... default?) partitions for a run-of-the-mill RH9 install.

I've got an FC4 box handy so I figured with the HAL (?) it would be easy enough to mount the old drive via USB and get into the partitions to grab the data.

The FC4 box is running kernel: 2.6.15-1.1833_FC4

Plugging in the USB box creates the following:

In fstab:

Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
/dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs   defaults        0 0
/dev/proc               /proc                   proc    defaults        0 0
/dev/sys                /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/fd0                /media/floppy           auto    pamconsole,exec,noauto,utf8,managed 0 0
/dev/hdd                /media/cdrom            auto    pamconsole,exec,noauto,managed 0 0
/dev/sda1               /media/usbdisk          ext3    pamconsole,exec,noauto,managed 0 0
/dev/sda2               /media/usbdisk1         ext3    pamconsole,exec,noauto,managed 0 0
and /var/log/messages shows:

Code:
Mar 27 20:39:42 dorkus kernel: usb 1-2: new high speed USB device using ehci_hcd and address 2
Mar 27 20:39:42 dorkus kernel: SCSI subsystem initialized
Mar 27 20:39:42 dorkus kernel: Initializing USB Mass Storage driver...
Mar 27 20:39:42 dorkus kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Mar 27 20:39:42 dorkus kernel: usbcore: registered new driver usb-storage
Mar 27 20:39:42 dorkus kernel: USB Mass Storage support registered.
Mar 27 20:39:47 dorkus kernel:   Vendor: Maxtor 5  Model: 2049U4            Rev: DA62
Mar 27 20:39:47 dorkus kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
Mar 27 20:39:47 dorkus kernel: SCSI device sda: 39882527 512-byte hdwr sectors (20420 MB)
Mar 27 20:39:47 dorkus kernel: sda: assuming drive cache: write through
Mar 27 20:39:47 dorkus kernel: SCSI device sda: 39882527 512-byte hdwr sectors (20420 MB)
Mar 27 20:39:47 dorkus kernel: sda: assuming drive cache: write through
Mar 27 20:39:47 dorkus kernel:  sda: sda1 sda2 sda3
Mar 27 20:39:47 dorkus kernel: sd 0:0:0:0: Attached scsi disk sda
Mar 27 20:39:47 dorkus scsi.agent[4321]: disk at /devices/pci0000:00/0000:00:10.3/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:0
Mar 27 20:39:48 dorkus fstab-sync[4373]: added mount point /media/usbdisk for /dev/sda1
Mar 27 20:39:48 dorkus fstab-sync[4382]: added mount point /media/usbdisk1 for /dev/sda2
I would take it from this that FC4 has mounted two of the drive's partitions at /media/usbdisk and /media/usbdisk1? However these directories are empty. When I log on to the desktop, there is an icon for a USB drive and it is labeled "/boot(2)". When I click on it, it shows all my stuff from the boot directory of the RH9 drive (or at least some stuff). There is no icon for any other partition.

Question: What, if anything, else do I need to do to mount the remaining partitions of the RH9 drive? Does the fact that the FC4 box didn't automatically mount them mean that they are trashed and not accessible? What other tools could I use to get to the data?

o.k. so that was questions plural, not question.... ;-)

One more bit of data. When I mount the drive on a Windows box it of course can't do anything with the EXT3 partitions but it does show four partitions.

Any insight would be appreciated. Thanks.

Last edited by twentyfour; 03-28-2006 at 12:42 AM.
 
Old 03-28-2006, 08:05 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
# fdisk -l /dev/sda

That is the letter "L" and not the number one in the comand above.

# mkdir /media/partitionX

# mount -t ext3 /dev/sdaX /media/partitionX -ro

Where X is the partition number you want to mount (ignore the swap partition).
 
Old 03-28-2006, 09:14 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,475

Rep: Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280Reputation: 2280
A default RH9 install creates 3 partitions. /boot / and swap. The posted log messages confirms the 3 partitions. RH and fedora uses volume labels and so now you have two partitions labeled /boot. The second one being the USB drive hence the /boot(2). The second / is not automatically mounted.
 
Old 03-28-2006, 11:11 PM   #4
twentyfour
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
This can't be good.....

Thanks guys! I got this in my logs when I tried this:

Code:
Mar 28 20:51:29 dorkus kernel: EXT3-fs error (device sda2): ext3_check_descriptors: Block bitmap for group 128 not in group (block 1701062688)!
Mar 28 20:51:29 dorkus kernel: EXT3-fs: group descriptors corrupted !
Starting from the beginning, I saw this when I did fdisk:

Code:
Disk /dev/sda: 20.4 GB, 20419853824 bytes
240 heads, 63 sectors/track, 2637 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          14      105808+  83  Linux
/dev/sda2              15        2551    19179720   83  Linux
/dev/sda3            2552        2637      650160   82  Linux swap / Solaris

The mount command gave me this:

Code:
# mount -t ext3 /dev/sda2 /media/partition2
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
Note that I had to do it without the -ro option, or at least I think that was the problem. I tried it just like Lenard said and got this:

Code:
# mount -t ext3 /dev/sda2 /media/partition2 -ro
mount: option requires an argument -- o
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
Did I miss something or do I need to fix something more drastic?

Thanks again guys. I really appreciate it.
 
Old 03-29-2006, 07:14 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
No, it was a typo on my part sorry....

# mount -t ext3 /dev/sdaX /media/partitionX -r

or

# mount -t ext3 /dev/sdaX /media/partitionX -o ro
 
  


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
ext3 partition on external USB hard drive mounted, but only root access allowed leontini Linux - Hardware 4 02-17-2006 01:54 AM
mounting ext3 / booting FC4 Master of Reality Linux - General 4 02-02-2006 03:38 PM
usb controller dies mounting external usb hard disk komasoftware Linux - Hardware 4 11-30-2005 01:18 PM
Problem with Booting after creating ext3 partition on External USB ynyus75 SUSE / openSUSE 1 11-13-2005 02:23 PM
FC4 Boot from external USB Hard drive troth Fedora 1 09-13-2005 10:57 PM

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

All times are GMT -5. The time now is 09:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration