Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] odd system loss


2009/7/25 Geoffrey Cowling <geoffrey.cowling@xxxxxxxxx>:
>  2. I made a new directory and mounted the / partition on it.
> (Accessing /etc meant that I could read fstab).
>
> 3. I mounted the other partitions to the directories under /   (I
> realise now that vmlinuz was probably broken linked on / becaause
> /boot was not mounted. Derr!
>
> 4. I chrooted into the new /
>
> 5.  It seemed to be possible to fix a kernel without destroying
> everything else.  This was my BIG question ... I was even tempted to
> use the chroot as a sort of virtual machine.  But was a little
> cautious about repeating disaster.  In the meantime I had to press on
> with my tasks using an underpowered and less memory/hard disk machine
> (though using Ubuntu 8.10)  I had no problems with complex convert
> scripts, with no memory or hard disk problems.  So this does not seem
> to have caused my original failure.
>
> 6.  There was a suggestion about using apt-get "reinstall kernel", but
> htis seems to be a wish rather than an option. Right?  But doing an

aptitude has a "reinstall" option, and besides is more powerful. It
also has full command line interface like apt-get so no down side for
switching to it.

> apt-get update/upgrade got me a new ? security upgrade, which was
> great. Installing the current kernel did not seem to work, but perhaps
> it did occur, but grub problem stopped booting)
>
> 7. I tried update-grub next.  This said it could not find the root,
> corrupted fstab?  trying hda1.  Which was no use!

That possibly happened because the chroot'ed environment didn't have
access to /dev, /sys and /proc, what you need to do AFTER mounting the
root partition and BEFORE the chroot is:

# for i in sys proc dev; do mount -o bind /$i /root/$i; done

(assuming your going-to-be-chrooted root partition is mounted under /root)

I'm not sure this is the reason but it's a good thing to do when
dealing with kernel installation inside chroot in any case - mkinitrd
needs this for instance if you install new kernel modules.

(rest deleted).

In all your post I couldn't find the string "fsck" - have you tried to
force-check the suspected partitions?

Cheers,

--Amos