LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-30-2007, 03:16 PM   #1
slcuser
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
mount old linux disk to new Linux


Hi,

I have an old disk and trying to attach to the upgraded linux version hoping to see my old data. But I am not very successful.
What is the normal procedure to make the data from old linux to be visible to new Linux system?

- steps I took.

# fdisk -l /dev/sdc

Disk /dev/sdc: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 19452 156248158+ 83 Linux

After creating doing
# mkdir -p /mnt/sdc1

and modifying /etc/fstab file to have the line

/dev/sdc1 /mnt/sdc1 ext3 defaults 1 2

I typed

# mount -a

But I got the error as following:

mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
or too many mounted file systems

Any idea to go futher from here? Thanks.

-- slcuser
 
Old 07-30-2007, 03:23 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
Are you certain /dev/sdc1 is ext3 and not xfs, reiserfs, jfs, etc.? I would do something like 'file -s /dev/sdc1' to get more info about the filesystem.
 
Old 07-30-2007, 03:28 PM   #3
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,178

Rep: Reputation: 47
Is ext3 correct as the filesystem? Try from the commandline with

mount -t ext3 /dev/sdc1 /mnt/sdc1

You may need to be root for it to work. In place of ext3 you could try ext2 and/or auto. And where you tried mount -a try mounting just sdc1 with mount /dev/sdc1.

EDIT: Matir and I were typing at the same time.

Last edited by dracolich; 07-30-2007 at 03:30 PM.
 
Old 07-30-2007, 03:45 PM   #4
slcuser
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,

Thanks for your kind inputs. I thought it was ext3 but not sure now since I did not
put the old system. I tried

Matir>
# file -s /dev/sdc1
/dev/sdc1: Linux/i386 swap file (new style) 1 (4K pages) size 1024134 pages

dracolich>
# mount -t ext3 /dev/sdc1 /mnt/sdc1
"mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
or too many mounted file systems"
and the same thing for ext2.

Then from the result of the suggestion from Matir, the disk contains only swap space?

I forgot to mention one thing:
If I modify /etc/mtab by adding the line as
/dev/sdc1 /mnt/sdc1 ext3 rw 0 0
and type mount -a then I am able to mount the disk and reporting
#df
Filesystem 1K-blocks Used Available Use% Mounted on
....
....
/dev/sdc1 15709664 3677116 11234520 25% /mnt/sdc1

However, of I cd into the directory I do not see any old files there.
# cd /mnt/sdc1
# ls

--slcuser

Last edited by slcuser; 07-30-2007 at 04:04 PM.
 
Old 07-30-2007, 04:50 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
Modifying mtab does not really mount the disk. mount -a returns no errors because it believes that disk is already mounted.
 
Old 07-30-2007, 05:18 PM   #6
slcuser
LQ Newbie
 
Registered: Jul 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Matir
Modifying mtab does not really mount the disk. mount -a returns no errors because it believes that disk is already mounted.
Yes you are right. But what happened to the files size reported from df?
So the old disk contain only swap files and cannot be mountable?

-- slcuser
 
  


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
Mount freebsd 5.x disk on linux 2.6.18 eggman1024 *BSD 1 01-07-2007 07:43 PM
mount LOCAL netware disk in linux ronanio Linux - Enterprise 3 08-29-2006 07:35 AM
About mount fat32 disk in linux lonelyghost317 Linux - Newbie 7 06-29-2005 09:42 AM
Linux boot disk + NTFS mount Freaksta Linux - General 2 04-16-2003 12:38 AM
How do mount a NTFS disk in Linux Scratchmaster Linux - Newbie 4 08-15-2002 07:42 PM


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