LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-09-2010, 12:22 AM   #1
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 229

Rep: Reputation: 30
filesystem copy, can't find last references to old uuid


Ok ... so I'm trying to copy a filesystem from an old hard drive to a larger hard drive on the same system.

I tarred up the old filesystem (tar cfp).

I made a new install with four partitions:
sda1 - os1 (I installed ubuntu 9.1 fresh here)
sda2 - os2 (I untarred [tar xfp] the old filesystem here)
sda5 - /home
(sda3 is the swap partition, and sda4 makes the logical partition for sda5)

Grub2 has recognized both filesystems and can boot just fine into the installed filesystem. When it's trying to boot into the copied filesystem, I get the error that uuid-766cc21f-blahblah doesn't exist.

Well that's right! The new drive has a different uuid (of course). I changed the fstab for the copied system. I changed the grub.cfg manually (even though I know you're not really supposed to do that). I changed the links in /dev/disk (by-uuid / by-path / by-id).

I also reinstalled grub from the OS that works.

I'm not sure where to find this crazy reference to the old uuid. Any ideas?
 
Old 04-09-2010, 12:26 AM   #2
brucehinrichs
Member
 
Registered: Mar 2008
Location: US
Distribution: Debian Sid; Sabayon, UbuntuStudio, Slackware-multilib 13.1, Peppermint Ice, CentOS
Posts: 575

Rep: Reputation: 67
Code:
sudo blkid
EDIT: Misread the post, disregard.

Last edited by brucehinrichs; 04-09-2010 at 12:30 AM.
 
Old 04-09-2010, 12:54 AM   #3
kainosnous
Member
 
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
The only two places that your boot process should be looking for a UUID (that I can think of) is from fstab or grub. Until I had the system working correctly, I would try to just use /dev/sda2. Actually, I would suspect that the old grub file isn't even accessed, but instead the grub config file from your primary OS on sda1, and so it shouldn't have your old information in it?

I suspect fstab. Could you show us your fstab? Also, at which part of the boot process does it hang?

Don't try to change the links in /dev as they should be recreated at boot anyway.
 
Old 04-09-2010, 02:48 PM   #4
JohnLocke
Member
 
Registered: Jun 2004
Location: Denver, Colorado
Distribution: Ubuntu
Posts: 229

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by kainosnous View Post
The only two places that your boot process should be looking for a UUID (that I can think of) is from fstab or grub. Until I had the system working correctly, I would try to just use /dev/sda2. Actually, I would suspect that the old grub file isn't even accessed, but instead the grub config file from your primary OS on sda1, and so it shouldn't have your old information in it?

I suspect fstab. Could you show us your fstab? Also, at which part of the boot process does it hang?

Don't try to change the links in /dev as they should be recreated at boot anyway.
So ... I first tried your suggestion of using /dev/sda2 in the fstab. Not sure if that's the /exact/ thing that fixed it, but it's going now! I still have no idea where it was getting the old uuid (I didn't change the old uuid to a new one anywhere else), but it's OBE now. Thanks for the suggestion!

New weird issue is with Grub2. I've had this issue before and am simply not sure what causes it. (it's not related to this thread, but I'll mention it anyway)

When Grub2 detects the other linux partition, it likes to try and use the linux root from the first partition (sets the root uuid to sda1 when booting to sda2), which has the unhappy side effect of simply booting to sda1. So I went in and manually changed it in grub.cfg (I know you're not supposed to really do that). Now grub no longer writes to that file during grub-install. I have to do a grub-mkconfig and copy those contents over grub.cfg (after editing the uuid).

Weird, but workable.
 
  


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
can I label a swap partition or find its UUID ? centguy Linux - Software 3 09-12-2010 02:37 PM
boot can't find UUID, then finds it Peterius Gentoo 0 08-09-2009 12:37 AM
Volume has problems including no uuid in /dev/disk/by-uuid abejarano Linux - Hardware 3 12-31-2008 09:41 PM
after copying partition, how to deal with fstab when it references by UUID ? lumix Linux - Newbie 5 12-09-2008 10:59 PM
[Ubuntu] how to find a hard disks UUID Jayla Linux - Newbie 10 05-12-2008 10:58 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