Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 1999 14:25:20 -0400 (EDT)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        freebsd-questions@FreeBSD.ORG (FreeBSD Questions)
Subject:   Fixit Floppy Experience/Suggestion
Message-ID:  <199908311825.OAA86228@cc942873-a.ewndsr1.nj.home.com>

next in thread | raw e-mail | index | archive | help
I went through the fairly painful process of upgrading from 2.2.8 to
3.2 with all source. Once I hacked in something to fix the 'unknown'
value sneaking into MACHINE_ARCH, the 'make upgrade' went on... and
on... and on... just fine. It's been painful fixing broken ports and
building X from source was another chore, but the real fun began when
I made a really boneheaded move with /dev.

Figuring that changing major release numbers was an occasion to
rebuild /dev and maybe reduce the clutter in there a bit, I
deleted most things and rebuilt what I thought I needed or might
need. I did some other stuff like build the new custom kernel and
rebooted.

The reboot did not go too well. It could not find the file
/dev/wd0s2a, my root partition. It dropped me into single user, and I
confirmed what I feared. I had './MAKEDEV wd0' which builds wd0[a-g]
and wd0s[1-4] but NOT any FreeBSD paritions within the slices. The
single-user mode partition was mounted read-only and with no
/dev/wd0s2a to use in a mount command, I could not make it writeable
to run a MAKEDEV in /dev.

To the Fixit Floppy, Robin! Sweating profusely, I went through the
kern.flp, msfroot.flp, fixit.flp sequence to see if I could save my
slice (luckily I was able to even find the old 3.1 floppies that I had
laying around). Never having needed to use the fixit before, I was
hoping against all hope that it had the tools I needed to fix my disk
(afterall, wouldn't this be just the kind of thing one would need it
for?). 

Once I got to the 'Fixit#' prompt, I was pleased to see a /dev, but no
wd0s2[a-g] devices (OK, OK, calm down, there must be a MAKEDEV around
in this thing). No MAKEDEV in /dev (uh-oh). But I quickly found
another dev, /mnt2/dev. It had no wd0s2[a-g] devices either but it
_did_ have a MAKEDEV (whoo-hoo!).

But I was not home free yet. First, I found that the MAKEDEV has
references to /sbin/mknod, but on the fixit floppy, all of the useful
commands are under /mnt2/stand. I try to edit MAKEDEV, but /mnt2 is
mounted read-only. OK, OK, / is mounted rw, so I go to /dev and,

# sed 's-/sbin/mknod-/mnt2/stand/mknod-' /mnt2/dev/MAKEDEV > MAKEDEV
# chmod 755 MAKEDEV

And after congratulating myself for being so darn smart as to get this
far, I try to ./MAKEDEV wd0s2a, but MAKEDEV dies on the chown
commands. It seems that there is not a complete /etc/group and MAKEDEV
makes use of group names (like 'operator'). Luckily, I for some reason
remember that operator is 5 and do another 'sed' switching operator to
5.

And finally, I have made /dev/wd0s2a... on the fixit. I still need to
use that to mount the root partition and actually fix the /dev
there. But that is somewhat anti-climatic now.


Anyway, the point of my tale of woe is to suggest that it might be
worthwhile to make the MAKEDEV on the fixit.flp actually function
as-is. I would suggest taking all absolute command paths out of
MAKEDEV since there is a 'PATH=' command at the top anyway. The
contents of that PATH would be different for the fixit and the
'normal' MAKEDEV. As for the group problem, I am not sure if modifying
MAKEDEV or inserting a minimal /etc/group would be the best way to
go. And finally, maybe the fixit floppy should include partitioned
slices for wd's and da's. Do they really take up much space?

The other alternative is figure out a way to never let morons like me
remove required devices from /dev. (Yeah, laugh, laugh, like you've
never done something that stunningly silly yourself.)
-- 
Crist J. Clark                           cjclark@home.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908311825.OAA86228>