[SOLVED] How to access files from a migrated disc?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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)?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.