How do I view a mounted cloned hard drive's Linux file system?
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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How do I view a mounted cloned hard drive's Linux file system?
I've always had a clone of my primary hard drive sitting in my computer's 'ultrabay.' I also have three partitions - NTFS and FAT32, and the Linux partition. Every night, I do an rsync of my NTFS and FAT32 partitions.
However, I've never been able to backup my Linux (Fedora) partition - but because the Linux partition on the backup hard drive has never been visible. Up to this point, I've been backing up my primary hard drive's /home/username directory to a directory on my backup hard drive's Windows partition.
I'd ultimately like to rsync my primary hard drive's Fedora partition directly with my backup hard drive. However, as mentioned, while I can see the non-Fedora partitions on the backup hard drive, I cannot see the Fedora partitions.
I'd greatly appreciate any guidance as to how to do this - and of course, rsync suggestions are always appreciated.
The pages linked to in that thread give a decent rundown on how to do it, although I'm not seeing anything that's specific to Fedora 9, so you may have to improvise a bit on some of the names of the commands. You probably won't have to install any packages since it's a clone of your current drive and your machine can read it just fine. The other fellow who actually uses Fedora can probably do a better job of helping you with the specifics if necessary.
If Fedora doesn't mount it automagically, it probably means you have the same names for vg/lv on the backup. LVM won't handle that.
You could change the names, but then it wouldn't be a (exact) clone, and for example may not boot because of grub/fstab mismatches (unless you use UUID/label).
Personally I'd just blow that partition away, make it type x83 (mkfs as appropriate) and just fsck to it what I needed.
tldp.org has a good LVM howto, Redhat used to as well. I avoid it where possible.
Perfect - that the volumes have the same names is exactly what the issue is. On the next install I will choose something other than LVM, but for the meantime, I suppose it would be easiest to change the name of the backup hard drive. Then, if the primary hard drive fails and I want to use the backup, I can boot with a 3d hard drive I have sitting around (an old Fedora 9) and change the backup hard drive name back to what it was on the first (failed) hard drive to ensure it boots fine.
Now I have a problem after cloning the LVM and keeping this 2nd disk in the 'ultrabay'; when I boot up, the system automatically now runs off SDB instead of SDA. My system is set to boot off the first hard drive, so first, why is it doing this, and second, what can I do to fix this? My GRUB.Conf is below. What if I unhash "#boot=/dev/sda5" on the 'primary' drive (SDA) - will that fix this - or is there a better way?
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,4)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
title Fedora (18.104.22.168-92.fc14.i686.PAE)
kernel /vmlinuz-22.214.171.124-92.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
title Fedora (126.96.36.199-91.fc14.i686.PAE)
kernel /vmlinuz-188.8.131.52-91.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
title Fedora (184.108.40.206-90.fc14.i686.PAE)
kernel /vmlinuz-220.127.116.11-90.fc14.i686.PAE ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
The correct way to do it these days, provided you have a reasonably recent version of grub, is to locate your partitions by filesystem UUID. Otherwise you're likely to run into issues if your devices don't always start up in the same order. I've seen several machines where warm boot vs. cold boot changed the device order. Or where having a USB device plugged in would mess it up.
The easiest way, of course, is to upgrade to GRUB2, which will configure things by UUID automagically. Unfortunately, Fedora is a bit messed up in this regard, and the available packages for GRUB2 will just make your life miserable. So install from source instead. Instructions here: http://blog.fpmurphy.com/2010/06/upg...-to-grub2.html
I am not an expert with GRUB. However, my old machine that I'm currently using uses UUIDs and an old version of GRUB, and instead of a "root (hdx,x)" line, it's got a "uuid <uuid>" line. The kernel parameter is being passed as a
GRUB2 has a search function. Put in a "search --no-floppy --fs-uuid --set=root <uuid>" in place of the uuid line. Kernel parameter is the same as GRUB.
Ok, so by way of background, I have these two cloned Fedora 14 drives, and am trying to boot with both in the computer - one as primary, and the other as secondary.
On the 'original' drive, I've replaced the entries in FSTAB and GRUB.Conf to use the various UUIDs listed with blkid. On the cloned drive, I changed all UUIDs to make them different from the 'original' drive, and then changed FSTAB and GRUB.Conf accordingly to use those updated UUIDs.
Each drive boots up fine separately, no problem.
When I boot them together, though - meaning booting off the original drive in the main HD bay, with the cloned HD sitting in the computer's ultrabay, I get almost to the end of the boot process, but then get a warning: "no root device found, sleeping forever." And that's it.
I'm glad I got this far, it's great to learn about the Fedora OS. It seems that everything works ok alone, since each drive boots up fine separately. However, what can I do now to make the computer boot up with both HDs inserted in the computer? I feel like I'm almost there - or am I?
My GRUB and FSTAB are included a few posts above, the only changes are specifying UUIDs.