[lug] Recovering from loss of /boot directory on Slackware
D. Stimits
stimits at idcomm.com
Tue Dec 18 22:50:32 MST 2001
BOF wrote:
>
> Hello,
>
> Through a series of events so egregious that they cannot be repeated
> where small children may read them <g>, I managed to delete the /boot
> directory on my Slackware 8.0 system.
>
> I can recover the System.map file from my last kernel recompile. But
> what would be the most graceful way to restore files like boot.b,
> boot.0300, chain.b, map and os2_d.b?
I would boot a rescue, mount the old hard drive somewhere, then call
chroot to that point. This effectively tells the system that it has a
new root directory, and it will immediately begin using the new system
as if it is its own. You can then compile and install a kernel from
scratch, run lilo or grub, so on. I do not believe there is such a thing
as an easy way to create the missing boot files unless you had a dd copy
of all the boot sectors and can place your kernel back to the same inode
(I could be wrong about that, I'm no chain or boot file expert). In any
case, as long as you can chroot to this new root and the system thinks
it is on the old partition, you lose nothing by trying to reinstall the
kernel and lilo, the data on the actual root partition should remain
untouched (except possibly modules going into /lib/modules/). Assuming
you have installed a kernel before other than default, I would guess
that even your lilo.conf is already set. Beware though that if you have
a master boot record for some other system to boot you can interfere
with that by overwriting it. The short summary: rescue disk and chroot
to wherever the old root gets mounted; follow all your normal kernel
install steps from there.
D. Stimits, stimits at idcomm
>
> Thanx.
>
> BOF
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list