LinuxQuestions.org
Register a domain and help support LQ
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 10-29-2012, 06:50 AM   #1
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 9
Posts: 127

Rep: Reputation: 15
How to access files from a migrated disc?


I am installing a new machine, but I want to copy some files from an older machine. I can access teh physical drive using a USB link, treating teh old dsik as an 'External Drive'.

When I attach the disk, it shows on the desktop as /boot, and when I open it up, I have 3 folders - efi, grub and lost+found.

If I try to open lost+found, I am told that I do not have permission to access that folder. I assume that that is where all my files are, but that nice Linux is preventing unauthoruised access. How do I access those files?
 
Old 10-29-2012, 08:53 AM   #2
pierre2
Member
 
Registered: May 2009
Location: Perth, AU
Distribution: LinuxMint
Posts: 364
Blog Entries: 8

Rep: Reputation: 84
Quote:
efi, grub and lost+found.
By rights, those files won't be in either grub or lost+found, as they are both system folders.
so, therefore - they should be in the efi folder . .

try installing gnome-commander in your host PC - it can be run as /root
& thus give you R/W privlidges that allow you to copy / move your stuff.
 
Old 10-29-2012, 10:39 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,247

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
lost+found is a special directory created when an ext2/3/4 file system is formatted and can only be accessed by root. In a nutshell if fsck finds corrupted files during a check it will place them in the lost+found directory. What you see is your old OS's /boot partition which was automatically mounted when the drive was attached. I assume the files you are seeking are in the / partition.

Please post your current and old linux distributions/versions and also post the old OS partition information if known. You probably have to manually mount your / partition which could be part of a LVM.

Last edited by michaelk; 10-30-2012 at 03:16 PM.
 
Old 10-29-2012, 02:30 PM   #4
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 9
Posts: 127

Original Poster
Rep: Reputation: 15
The 'new' system is actually running Fedora 12. I did a 'fdisk -l' and a 'df -h /' and the results are below.
Quote:
[root@localhost ian]# fdisk -l

Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x911a911a

Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 9964 79830998+ 8e Linux LVM

Disk /dev/dm-0: 80.8 GB, 80803266560 bytes
255 heads, 63 sectors/track, 9823 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 939 MB, 939524096 bytes
255 heads, 63 sectors/track, 114 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
[root@localhost ian]# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
75G 3.4G 67G 5% /
[root@localhost ian]#
The 'old' disk is also from a Fedora 12 system - but is a 250 GB drive. It got teh default partitioning when the OS was installed. I can't just swap the drives around because the 'new' machine is PATA/IDE but the 'old disk' is SATA.
 
Old 10-30-2012, 07:20 AM   #5
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 9
Posts: 127

Original Poster
Rep: Reputation: 15
I guess that my problem is this:-

When I connect my disk using a USB cable, the system automatically mounts the first partition (the /boot partition). It recognises that the disk is 250 GB, but it only sees the first partiton which is about 200MB.

I need to access the 2nd partition, so I must mount that. Obviously, I can make a folder such as /mnt/myotherdisk - but how can I know the 'address' of the drive (obviously NOT /dev/sda)?
 
Old 10-30-2012, 11:52 AM   #6
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 9
Posts: 127

Original Poster
Rep: Reputation: 15
I connected the external drive via USB and it was automatically mounted by the OS. I then entered a mount command and got this output
Quote:
[root@localhost ian]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_ubject_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/ian/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ian)
/dev/sdb1 on /media/_boot type ext3 (rw,nosuid,nodev,uhelper=devkit)
I noticed that my external drive was showing as /dev/sdb1 - so I then entered the following commands
Quote:
[root@localhost ian]# mkdir /mnt/mydisk
[root@localhost ian]# mount /dev/sdb2 /mnt/mydisk/
mount: unknown filesystem type 'LVM2_member'
[root@localhost ian]#
Either I don't want to mount partition 2 OR I need to do something different to access an LVM.
 
Old 10-30-2012, 01:23 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,247

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
You need to do something different to access an LVM.
Here are the basic steps:

Scan for volume groups
vgscan -v

Once you determine the volume group set it active:
vgchange -a y Volume_Group_Name

Find the name of the Logical volume you want to mount:
lvs –all

Now mount your logical volume:
mount /dev/volume_group/logical_volume /mountpoint
 
Old 10-30-2012, 02:59 PM   #8
Ian D
Member
 
Registered: Aug 2005
Location: Solihull, UK
Distribution: Fedora 9
Posts: 127

Original Poster
Rep: Reputation: 15
Thank you michaelk. That has done the trick and I am copying files.

Great.
 
Old 10-30-2012, 03:16 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,247

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
Your welcome.
 
  


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
Ultra slow disc access with software raid exallon Mandriva 0 02-23-2007 06:50 AM
Migrated files are now all read only blink_00 Linux - Newbie 5 12-15-2004 11:12 AM
Mandrake 9.2/10 CD Data disc access. ruse Linux - Newbie 2 08-17-2004 05:37 PM
Restrict Mounted Disc Access JC404 Linux - Security 7 09-06-2003 07:48 AM
Trying to access a CDROM disc - drake 9.1 sillykids Linux - Software 2 07-16-2003 05:03 PM


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