[PLUG] OK, now I did it. Deleted /bin

Rogan Creswick creswick at gmail.com
Tue Jul 25 00:53:27 UTC 2006


On 7/24/06, John Jason Jordan <johnxj at comcast.net> wrote:
> On Mon, 24 Jul 2006 13:10:20 -0700
> "Rogan Creswick" <creswick at gmail.com> dijo:
>
> > As has already been pointed out, /dev/hda2 *should* still have a /bin
> > directory.  However, that may not be critical one way or the other.
> > I'd suggest booting off an ubuntu64-live disk
>
> Great suggestion! I hadn't thought of that! Wait ... I think the Ubuntu
> live/install CD (I actually burned a live/install DVD, which is what I
> used for both installations) does not let you touch the filesystem. I
> am told that Knoppix will, but this is 64-bit Dapper, so Knoppix won't
> work.

I really think the live disk is the easiest way to do this.  As you've
already seen, many, many things rely on stuff in /bin.  Doing anything
is going to be chancy (I don't mean that you will do more damage, just
that many things won't work, and you  probably won't know which things
are broken until you try them all.. which will take forever.)

The Ubuntu live cd may not let you touch the filesystem by default,
but you can unmount them and re-mount them read-write so that you can.
 The other resuce disk may be easier, but you should know that it is
indeed possible to do this with an ubuntu live cd (barring any very
bizare and arcane configurations on the ubuntu disk).

The following commands should do this (run as root, or with sudo,
also, tihs is in context of an ubuntu live distro):

umount /dev/hda2
umount /dev/hda3

mkdir /mnt/hda2
mount /dev/hda2 /mnt/hda2

mkdir /mnt/hda3
mount /dev/hda3 /mnt/hda3

(the mount commands may need a -o rw, as in:
mount -o rw /dev/hda3 /mnt/hda3)

> > Go to a terminal and run:
>
> Terminal won't run, and I can't log in when I do Ctrl-Alt-F1. At the
> moment I'm stuck with the GUI stuff.

Hence the rescue disk.  First step in reparing a system: Get a
terminal (if at all possible) :)

In a later email in this thread you mention:

> It looks like I will have to reinstall everything I have done in the
> past two months since the new hard disk was installed. And that's
> assuming I can get the /bin folder off the old hard disk back onto
> hda3. Also, there was at least one kernel update since then. (I use
> Upgrade Manager once a week or so.)

This should not be a time consuming or difficult task -- the database
of applications you've installed is still intact.  In the worst case,
once you have a /bin back on your system, you can do this:

dpkg --get-selections > packages

then use the packages file on a new install of Dapper 64 as:

dpkg --set-selections < packages

then:
apt-get update && apt-get upgrade

replace your /etc and /home from backups, and you're good to go.

It is possible to refresh all the packages with an apt or dpkg command
though.. (you could try doing the process I describe above, it may
very well work and it shouldn't hurt anything.)

apt-get's --reinstall option may help too.

--Rogan



More information about the PLUG mailing list