LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-18-2011, 11:35 PM   #1
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Rep: Reputation: 19
Can't boot with 2 cloned hard drives, where UUIDs are different & GRUB specifies UUID


I cloned my hard drive, from my primary hard drive to my secondary 'ultrabay' hard drive. After cloning, I booted from my ultrabay hard drive (the clone), changed the UUIDs of all ext3 partitions (all the partitions that I could change) on that drive, and changed all FSTAB and GRUB specifications from labels to UUIDs (where applicable).

I also booted into the primary drive, changed the FSTAB and GRUB to use UUIDs instead of labels.

So now, each drive has their own UUIDs, and each specifies such in FSTAB and GRUB.

The problem is that, while I can successfully boot each drive *separately*, when I try to boot from the primary hard drive while the ultrabay hard drive is also present, I get the warning: "no root device found, sleeping forever."

I am totally lost about why this is happening. I thought if there'd be a problem, the drive wouldn't boot on its own - but they *are* both booting separately.

I'd immensely appreciate any guidance about what could be causing this, and what steps I could take to fix this!

Thanks a ton!!!
 
Old 08-19-2011, 04:17 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,483

Rep: Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378Reputation: 2378
What motivated you to specify UUIDs?

It sounds to me like GRUB thinks that it has two-or-more drives to boot from. Since it has no provision for choosing between them, it stops.
 
Old 08-19-2011, 05:39 PM   #3
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,514

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Can't tell from what was stated in the OP if the boot drive was properly specified. Code below is taken from my grub.conf (aka menu.lst) file; I use grub-legacy:
Code:
title Fedora (2.6.40.3-0.fc15.x86_64)
    root (hd0,4)
    kernel /boot/vmlinuz-2.6.40.3-0.fc15.x86_64 ro root=/dev/sda5  rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us selinux=0
Note the second line - it tells me which hard drive and partition to look on for the rest of the bootloader - in this case 1st hard drive, 5th partition (grub-legacy starts numbering from zero). The UUID doesn't come into play until the kernel line; I used root=/dev/sda5 (and you'd use root=UUID=whatever), specifying the kernel file on /dev/sda5 of hd0.
 
Old 08-19-2011, 08:30 PM   #4
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
Thanks a ton for the replies.

My grub.conf is:

Code:
# 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
#boot=/dev/sda5
default=0
timeout=5
splashimage=(hd0,4)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.35.13-92.fc14.i686.PAE) via UUID
        root (hd0,4)
        kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=UUID=4dd82094-943a-4a2e-aaf6-b7d34a26abf7 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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img
title Fedora (2.6.35.13-92.fc14.i686.PAE) (OLD, pre-UUID)
        root (hd0,4)
        kernel /vmlinuz-2.6.35.13-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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img
title Other
        rootnoverify (hd0,0)
        chainloader +1
So I have the UUID specified in the kernel line. I tried stripping out everything else on that line after root=, but that didn't do the trick either, so I'm utterly confused.

The reason why I wanted different UUIDs was because I wanted to, first, avoid what was happening - the PC was booting from the second drive when I had the first and the second in the computer at the same time - and also to mount both drives.

Any further suggestions?

Thanks a ton.
 
Old 08-19-2011, 09:36 PM   #5
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,514

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
My thought would be to set up something like the following in grub.conf on the hard drive that actually boots:

Code:
# Fedora 14 on original disk:
title Fedora (2.6.35.13-92.fc14.i686.PAE) via UUID
        root (hd0,4)
        kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=UUID=uuid_of_orignal 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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img

# Fedora 14 on cloned disk:
title Fedora (2.6.35.13-92.fc14.i686.PAE) via UUID
        root (hd0,4)
        kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=UUID=uuid_of_clone 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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img
None of my desktop systems currently have two internal drives, so I can't verify the above. Are you sure the drive you think you're booting from is the drive you're actually booting from? I've encountered situations when I've had two drives in a system where I thought I was booting off one drive but was actually booting off the other.
 
Old 08-25-2011, 12:16 PM   #6
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
I put my computer to hibernate, then made a test. I put in a second, non-Fedora HD in the 2nd drive slot, and 'woke' up the PC. It resumed fine. I then tried that with the cloned Fedora HD, and I got a 'sleep' error. I shut down, and then rebooted my computer - but the computer didn't reboot, but instead resumed from hibernate. So, it's like the PC reads the cloned as the primary drive whenever it's present in the computer. That's so strange. Any further suggestions? I have no idea why this happening / what the issue is behind it, making it happen.

Thanks!
 
Old 08-25-2011, 12:36 PM   #7
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
What if I removed the hash and put into both GRUBs: boot=/dev/sda5 ?

Thanks.
 
Old 08-25-2011, 03:54 PM   #8
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,514

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
I see an error in what I posted earlier. Why not something like this:
Code:
title Fedora (2.6.35.13-92.fc14.i686.PAE) via dev
        root (hd0,4)
        kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=/dev/sda5 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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img

# Fedora 14 on cloned disk:
title Fedora (2.6.35.13-92.fc14.i686.PAE) via dev
        root (hd1,4)
        kernel /vmlinuz-2.6.35.13-92.fc14.i686.PAE ro root=/dev/sdb5 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
        initrd /initramfs-2.6.35.13-92.fc14.i686.PAE.img
 
Old 08-25-2011, 10:41 PM   #9
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
Ok, thanks for the response. Actually doing df shows:

Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      51606140  10280988  38703712  21% /
tmpfs                  1021772       808   1020964   1% /dev/shm
/dev/sda5               495844     65372    404872  14% /boot
/dev/mapper/VolGroup-lv_home
                     217163740  84166832 121965564  41% /home
/dev/sda3             53797288  17041208  36756080  32% /media/SHARED
/dev/sda2            156753916 133577600  23176316  86% /media/SW_Preload
/dev/sda1               102396     25288     77108  25% /media/System Reserved
So root should be at /dev/mapper/VolGroup-lv_root ; if I do a root=/dev/sda5 would that work?
 
Old 08-25-2011, 11:38 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,045

Rep: Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914Reputation: 1914
Quote:
Originally Posted by ziphem View Post
So, it's like the PC reads the cloned as the primary drive whenever it's present in the computer. That's so strange.
Not at all. The BIOS makes those determinations, not you. It's certainly consistent with (some of) what you're seeing. Try your test with another disk that has a bootloader in the MBR (of the inserted disk).
I would have thought LABELs would have been a better option - change the backup to say "backup". Makes more sense (to me) to use metrics that mean something to people (i.e. you) than the machine.
 
Old 09-14-2011, 02:13 PM   #11
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
Ok, I think I have some time and the courage to give this a shot, following some of the (very detailed) tutorials. However, I have a seriously basic question - the Fedora rescue CD - what is it? Is it the live DVD, or CD, in which I have the option to boot into rescue mode? Or does it also describe what is basically just the live CD/DVD?

Second, in some of the instructions on changing volume names, it says to edit initrd. However, I've also seen I can rebuild it with mkinitrd. Are there disadvantages of just rebuilding rather than editing? I think if I can get it to work, I'll edit, that way I can be sure I keep everything how it was in initrd how it was before I changed volume names (?) (obviously except for the changed volume names...!).

Thanks a ton!
 
Old 09-14-2011, 03:05 PM   #12
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,201

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
unless you have done some sort of customization that rebuilding the initrd will undo, i would say it's easier just to rebuild the initrd with mkinitrd as a conservative effort, if that doesn't work, then edit the initrd.
 
Old 09-17-2011, 12:09 AM   #13
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
Ok I'm stumped again. I've been in the rescue mode, and I've renamed the volume group and volume labels. I've also edited fstab to indicate the right group and labels. My problem now is initrd - my /boot is empty, and I'm totally stumped. With an empty /boot (I did chroot /mnt/sysimage), I can't run mkinitrd, or edit the file. I can't seem to find an answer on this anwywhere. I appreciate any help.

Thanks!!!
 
Old 09-18-2011, 05:42 PM   #14
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 158

Original Poster
Rep: Reputation: 19
I made good progress, but still running into a problem. It's frustrating because I think I'm just a step away (or maybe that's just me telling myself that!).

I re-ghosted the primary to the backup hard drive, so I'd have an up to date copy of my primary hard drive with which to work. I then used the Fedora DVD and booted into rescue mode, as suggested. I was able to change the volume name, but did so only with the /home partition (from lv_home to lv_homeHD2). I also changed the volume group name for all volumes (ffrom VolGroup to VolGroupHD2). I then did mkinitrd initrd.##.##.## ##.##.##, or something to that effect (I should have done mkinitrd initrd and not mkinitrd initramfs I guess). Note I didn't change UUIDs of the backup HD yet, they are identical to the primary hard drive.

The second hard drive, on its own, boots up ok (!!), and I did a df, and saw the volume labels and group were in fact changed. So I'm pretty happy about this, because that's great progress for me.

However, when I boot up both hard drives in the computer (primary hard drive in main slot, backup hard drive in ultrabay), still, I get a warning and the system won't boot. I don't have it in front of me, but the warning is something like 'No root found. Sleeping foreever').

I'd greatly appreciate any suggestions on how you think I might be able to fix this and get me from 'almost there' to 'there.' It also goes without saying that I really appreciate all the feedback thus far, so thank you for that!!

Ps. sorry, for not answering one of the suggestions by RockDoctor! I did try =/dev/sda5 in the grub line, but got an error about the system already being mounted and in use, I believe...unfortunately it didn't work. Thanks for the suggestion though.

Last edited by ziphem; 09-19-2011 at 12:34 AM.
 
  


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
UUID not resetting with USB enclosured SATA hard drives brijam Linux - Hardware 1 01-11-2011 05:52 PM
Grub boot loader with two hard drives, trying to boot kubuntu. The Sun Linux - Newbie 10 02-06-2010 10:12 AM
[SOLVED] Grub & 2 hard drives; the Troubles I have... linus72 Linux - General 1 11-21-2009 09:39 AM
How can I get GRUB to detect the hard drives the same with each boot? Zippy1970 Linux - Software 6 03-22-2008 04:19 AM
boot problem with cloned hard drives stevebrooks452 Linux - Software 4 03-23-2006 04:07 AM


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