LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-28-2009, 04:46 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
Problem with grub or lvm when swapping out drives?


I'm having a hard time trying to wrap my head around a problem that I'm having here. I have 20 laptops that are all the same make/model and hardware configuration. I'm not cloning these drives but I'm building them all up on one particular laptop and taking the drives to the field computers. My problem is that when I build up at machine on one laptop and put the drive into another, it can't find the VolGroup00. But if I put it back in the original machine it comes up just fine.

Could something that I don't know about in the hardware configuration (like different memory manufactures) cause a drive to not boot up? I've even tried cloning the drives with Ghost and dd and I still get the same issue. Someone please point me in the right direction. Thanks!

Last edited by mijohnst; 09-28-2009 at 04:56 PM.
 
Old 09-28-2009, 06:04 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
The LVM control files in /etc/lvm contain the UUID information of each physical volume in every volume group. You need to make sure that the drive's UUID is not reset when the drive is swapped, and/or that it matches the information in the various files in /etc/lvm and it's sub-directories.
 
Old 09-29-2009, 09:09 AM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Ok, that makes sense PTrenholme. Thank you! I wonder what could be happening to cause my hostid to change. Is that created from a MAC address or something? This is going to make it hard to come up with an field replaceable unit for remote sites not having the ability to just throw in another drive by someone no technical.
 
Old 09-29-2009, 12:53 PM   #4
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Ok, doesn't seem to be an LVM problem. I just build up a disk without LVM and it did the same thing. There has got to be a way to clone a disk that you don't have to worry about something like this happening.
 
Old 09-29-2009, 01:12 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by mijohnst View Post
I just build up a disk without LVM and it did the same thing.
You don't mean it can't find the VolGroup00" or do you?! What was the actual error? Is there only one HDD in each system? What does /etc/fstab look like?
 
Old 09-29-2009, 01:32 PM   #6
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Well, in my original post it couldn't find the VolGroup00, but now I've rebuild the machine without LVM and when I move the drive to another machine it crashes at the same spot. Below is the error I'm seeing:

Code:
Mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: no such file or directory
setuproot: error /proc failed: no such file or directory
setuproot: error /sys failed: no such file or directory
switchroot: mount failed: no such file or directory
kernel panic - not syncing: attempted to kill init!
When I put the drive back into the machine I installed it on, it comes up just fine. I don't see anything strange in the fstab file. I'll get that booted up and post that as well.

I know this might seem like useful information that I should have put in the beginning, but these computers are dual boot WindowsXP/RHEL5 systems.
 
Old 10-01-2009, 09:06 AM   #7
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
bump
 
Old 10-01-2009, 09:23 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by mijohnst View Post
bump
fstab?

And fdisk -l output and a few lines that come before "Mount: could not find filesystem '/dev/root'"
 
Old 10-01-2009, 12:36 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Ah! Some distributions hard-code file/disk access information in the initial RAM file system. You may need to edit the boot script in the initrd.img to get things to work. You might want to look at the mkinitrd command to see if you can create a "generic" initrd image file or investigate the kickstart stuff to creating portable installations, although that's usually used for making installation DVDs.
 
Old 10-01-2009, 01:22 PM   #10
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by mijohnst View Post
Well, in my original post it couldn't find the VolGroup00, but now I've rebuild the machine without LVM and when I move the drive to another machine it crashes at the same spot. Below is the error I'm seeing:

Code:
Mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: no such file or directory
setuproot: error /proc failed: no such file or directory
setuproot: error /sys failed: no such file or directory
switchroot: mount failed: no such file or directory
kernel panic - not syncing: attempted to kill init!
These messages suggest that the initrd.img file in /boot may not always cause the correct things to happen. Remember, that during boot the devices (aka, /dev/* ) are now dynamically discovered and created. It seems to me that you may have too much of physical-laptop-A identity in your kit so that /dev does not get built correctly on physical-laptop-B.

The boot sequence will load GRUB as it shakes and stirs the physical drive master boot record (MBR). Typically, the GRUB configuration details appear in /boot/grub -- specifically the menu.lst file where drives and partitions use a notation like 'hd(0,1)' to refer to drives and partitions for each bootable configuration. /boot will provide the typically compressed kernel and the initial ram disk (initrd.img) for an in-memory getting started root file system. When the kernel is finally loaded, it creates the ram-disk, loads it, and starts things running over there. Once there enough parts are running, the physical root file system ... and all the other file systems ... get mounted and full-blown system initialization is under way. Your messages tell me that something is wrong where your duplicated drive meets the alternate hardware.

ALTERNATIVE: With everything dynamic these days, drive mounting uses file system UUID instead of device names. Doing that lets us use the file system for the same functions in spite of the device name it gets when all of the dynamic parts stop moving. Perhaps your boot-time configuration relies on a name that is changing from one laptop to the next instead of a specific filesystem regardless of its device name.

Please (1) report back on your progress, and (2) indicate when and if you have a solution. I suspect others may have the same issues when they move to a larger drive in the same laptop.

~~~ 0;-Dan
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swapping drives ? Chroma Slackware 5 09-29-2006 04:36 AM
Swapping Hard Drives With Redhat 9 Neochubbz Linux - Hardware 1 01-06-2005 10:55 AM
Swapping Drives Little Dump Linux - Newbie 0 10-13-2004 07:46 PM
Swapping Drives Little Dump Linux - Hardware 0 10-13-2004 02:28 PM
swapping hard drives enzo250gto Linux - Hardware 8 08-31-2002 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:10 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
Open Source Consulting | Domain Registration