[Gllug] Moving System to a new Disk - checking out my plan...

Ken Smith kens at kensnet.org
Mon Jul 2 19:07:42 UTC 2007


Ken Smith wrote:
> Ken Smith wrote:
>   
>> Hi Guys, I have an FC6 system (MythTV) where hda=60G and hdb=250G. hdc 
>> has a dvd drive on it.
>>
>> {snippage}
>> In order to do some testing of new s/w releases, without risking the 
>> 'production' system, I have also created a 15G partition on the new hda. 
>> My plan is to tar/untar or rsync the current system (/boot and 
>> everything else) into that partition. (Less the huge .mpg files, the 
>> rest of it is only 4.5G. The test system doesn't need to be a big LVM 
>> setup, just enough to test out new kernels and especially capture 
>> drivers.) Then label the test ext3 partition as /test, edit its fstab 
>> and grub.conf accordingly to allow it to boot. What have I missed there???
>>
>> Thanks in advance
>>
>> Ken
>>   
>>     
>
> OK the first part of my plan has gone well. The system is now OK with 
> its new disk and the extended LV. :-)
>
> The test system in the second part of my plan is not so good. I took 
> Nix's suggestion and created a second VG for the test system. I copied 
> the existing /boot from hda1 to a new ext3 filesystem, which I labeled 
> /test in hda3. I copied the rest of the system from the old LV to the 
> new VG/LV (with is actually in hda5).
>
> I changed fstab in the copied system to mount /boot from /dev/hda3 and / 
> from my new VG (/dev/VolGroup01/LogVol00). I also changed the content of 
> grub.conf in hda3 to reflect the new system. I manually edited the grub 
> options at boot time to boot hd(0,2) and aimed it at 
> /dev/VolGroup01/LogVol00 for the rest of the system.
>
> {snip}
>
> The initrd came up fine but there was a Kernel panic when it tried to 
> had over to the real system. The first error is
>
> "mount: could not find filesystem '/dev/root'"
>
> and it all goes downhill from there.
>
> So somehow I think its something about the test system's initrd is not 
> handing over properly to the system in my new VG. So how does that 
> happen?....
>
> Any suggestions....
>
> Thanks
>
> Ken
>
>
>   
OK I think I've worked it out. I've been experimenting with a test 
system that I can trash without worrying. I did roughly the same to that 
test system as I had to my MythTV system. What I found out was that the 
LVM configuration is hard coded into the initrd in /boot.

This means that changing

kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=/dev/VolGroup00/LogVol00

into

kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=/dev/VolGroup01/LogVol00

in grub.conf will not make any difference. The initrd has 
VolGroup00/LogVol00 pre-coded into its vgchange command and so when it 
tries to go for VolGroup01/LogVol00 from the root= line from grub.conf 
it all heads south from there, 'cause it will never find 
VolGroup01/LogVol00.

I found this website 
http://www.whoopis.com/howtos/linux_lvm_recovery.html which is not quite 
about the same thing, but it describes unravelling the initrd, changing 
its init script and wrapping it up again.

I manually changed the init script in the initrd and all is well......

And I learned a fair bit more about the fine details of the boot 
process.....

:-)

Ken





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list