On 11/13/05, <b class="gmail_sendername">Shawn Fertch</b> &lt;<a href="mailto:sfertch@gmail.com">sfertch@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm attempting to restore a server from a tar backup of filesystems,
but have encountered an error on system bootup post restore.<br>

<br>

Backup information-<br>

Have the following information in flat files:<br>

sfdisk output<br>

df -k<br>

vgdisplay -v vg00<br>

The following filesytems were tarred to a remote server:<br>

/<br>

/usr<br>

/var<br>

/opt<br>
<br>
Disk partions are as follows:<br>
/dev/hda1 - Linux<br>
/dev/hda2 - Swap<br>
/dev/hda3 - Linux<br>
/dev/hda4 - Linux LVM<br>

<br>

<br>

Restore procedure:<br>

-Boot from RHELv3 cd#1<br>

-type in &quot;linux rescue&quot; at prompt<br>

-enable networking<br>

-Do not search for old filesystems<br>

-Repartition drive<br>

    # sfdisk /dev/hda &lt; hda.out<br>

-Run a vgscan<br>

    # vgscan<br>

-Create physical volume<br>

    # pvcreate /dev/hda4<br>

-Create volume group<br>

    # vgcreate -s 4 /dev/vg00 /dev/hda4<br>

-Create Logical Volumes<br>

    # lvcreate -l &lt;PE count&gt; -n &lt;lvname&gt; vg00<br>

-Format partitions and logical volumes<br>

    # mkfs.ext3 /dev/hda1<br>

    # mkfs.ext3 /dev/hda3<br>

    # mkfs.ext3 /dev/vg00/&lt;lvname&gt;<br>

-Create top level restore directory<br>

    # mkdir /restore<br>

-Mount root partition<br>

    # mount /dev/hda3 -t ext3 /restore<br>

-Change directories<br>

    # cd /restore<br>

-Restore the data from remote server<br>

    # ssh -n -l &lt;username&gt; &lt;serverIP&gt; -C &quot;/bin/cat /backupdir/root.tgz&quot; | tar zxpvf -<br>

-Mount remaining filesystems to be restored<br>

    # mount /dev/hda1 -t ext3 /restore/boot<br>

    # mount /dev/vg00/&lt;lvname&gt; -t ext3 /restore/&lt;fsname&gt;<br>

-Restore the remaining data<br>

    # ssh -n -l &lt;username&gt; &lt;serverIP&gt; -C &quot;/bin/cat /backupdir/&lt;name&gt;.tgz&quot; | tar zxpvf -<br>

-Enter a chroot jail<br>

    # chroot /restore<br>

-Install grub<br>

    # grub-install /dev/hda<br>

    # exit<br>

-Reboot the system<br>

<br>

<br>

On reboot, GRUB loads and shows the correct kernel. After the timeout
period, it begins to load until it tries to mount the root filesystem.
Below is the last few lines of the boot process before it errors out:<br>

---------------------------------------<br>

Creating block devices<br>

Creating root device<br>

mkrootdev: label / not found<br>

Mounting root filesystem<br>

Mount:  error 2 mounting ext3<br>

pivotroot: pivot_root (/sysroot,/sysroot/initrd) failed 2<br>

umount /initrd/proc failed:2<br>

Freeing unused kernel memory: 164k freed<br>

kernel panic: no init found.  Try passing init= option to kernel.<br>

------------------------------------------------<br>
</blockquote></div><br>Thought I'd post up a possible resolution to my e-mail...<br><br><br>It appears as if the reason why it's not booting is that the partitions aren't labeled.&nbsp; I modified the grub.conf and fstab to reflect the devices (/dev/hda3 and /dev/hda1) and the system booted.
<br><br>Once I ran the following commands:<br><br>e2label /dev/hda1 /boot<br>e2label /dev/hda3 /<br><br>Then restored the fstab and grub.conf file to it's original state, it booted as normal.<br><br clear="all"><br>-- <br>
-Shawn<br><br>-Nemo me impune lacessit.&nbsp;&nbsp;Ne Obliviscaris.. <br>