disaster recovery Q's

jackson byers byersjab at gmail.com
Thu Nov 12 20:52:45 UTC 2009


jackson byers wrote:

>> In my experience, the UUID for the rootfs
>> is also hidden away in the init file in the initrd.img.
>> If one tries to convert from UUID to labels, doesn't
>> the init file have to be changed also?

Tom Horsley responded:
> I think only the UUID for the swap is stashed in there,
> and it only uses it if you are trying to resume from
> hibernate (or something like that).

> The only places I've ever needed to change are the
> root= parameters in the grub.conf file and the UUID=
> parameters in the fstab.

>.There is some parameter I set somewhere I think in
> /etc/sysconfig/mkinitrd to disable hibernate

I find the UUID explicitly on the mkrootdev line in init:
Following is copied from my response to an older thread Sep 2009:

----
In my experience,
the UUID is also embedded internal to the initrd.img
and this also should be consistent with the UUID in grub.conf

to see this embedded UUID,
you have to  unpack the initrd.img and examine the 'init' file.

Here is how I do it on my f11
[root at localhost ~]# mkdir clean
[root at localhost ~]# cd clean
[root at localhost clean]# pwd
/root/clean
[root at localhost clean]# cp
/boot/bootf11usb3/initrd-2.6.30.5-43.fc11.i686.PAE.img .
[root at localhost clean]# ls
initrd-2.6.30.5-43.fc11.i686.PAE.img
[root at localhost clean]# gunzip -c initrd-2.6.30.5-43.fc11.i686.PAE.img | cpio -i
13701 blocks
[root at localhost clean]# ls
bin  etc   initrd-2.6.30.5-43.fc11.i686.PAE.img  proc  sys      usr
dev  init  lib                                   sbin  sysroot
[root at localhost clean]# less init

near the end look for "mkrootdev" line:
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro UUID=54c84c0a-040b-43bd-8887-202519baaae2
----

So my question remains:
If i try to use labels instead of UUID, do i have to modify this mkrootdev
line in init (initrd.img) ?

jack




More information about the users mailing list