From owner-freebsd-stable Fri Oct 31 00:50:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA22340 for stable-outgoing; Fri, 31 Oct 1997 00:50:56 -0800 (PST) (envelope-from owner-freebsd-stable) Received: from palrel3.hp.com (palrel3.hp.com [156.153.255.219]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA22334 for ; Fri, 31 Oct 1997 00:50:35 -0800 (PST) (envelope-from neumann@mailhost.rsn.hp.com) Received: from tfkws050.gsr.hp.com (tfkws050.gsr.hp.com [15.137.136.79]) by palrel3.hp.com (8.8.5/8.8.5tis) with ESMTP id AAA21149; Fri, 31 Oct 1997 00:50:32 -0800 (PST) Received: from tfkws050 (localhost [127.0.0.1]) by tfkws050.gsr.hp.com with SMTP (8.7.1/8.7.1) id JAA02665; Fri, 31 Oct 1997 09:54:05 +0100 (MET) Message-ID: <34599CAC.5A35@convex.hp.com> Date: Fri, 31 Oct 1997 09:54:04 +0100 From: Wolfgang Neumann X-Mailer: Mozilla 3.01Gold (X11; I; HP-UX B.10.20 9000/735) MIME-Version: 1.0 To: chad@anasazi.com CC: freebsd-stable@FreeBSD.ORG Subject: Re: FreeBSD MAKEDEV Hazard (fwd) References: <9710302248.AA06145@chad.anasazi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Chad R. Larson wrote: > > E-mail from one of my users... > > Forwarded message: > > From wbloom@wbloom.anasazi.com Thu Oct 30 12:35:06 1997 > > > > A caveat about the FreeBSD /dev/MAKEDEV script... > > > > If you ever have occasion to recreate special device files for storage > > devices, then here is something to be very careful about. Doing what > > appears to be, at first blush, obvious from a brief look at the > > MAKEDEV code in order to create new device files for, say, wd0... > > > > sh MAKEDEV wd0 > > > > ...is exactly what MAKEDEV itself does if called as 'sh MAKEDEV all'. > > > > However, the code which executes in order to create files for wd0 > > will first create wd0 itself, then... > > > > for slicepartname in s0h s1 s2 s3 s4 > > do > > sh MAKEDEV $name$unit$slicepartname > > done > > > > The above code will create device files for wd0 slices (s[1-4]), will > > create device files for partitions wd0[a-h], and will -DELETE- any > > special device files for partitions wd0s[1-4][a-h]. If you use MAKEDEV > > in this fashion to recreate device files for disks that happen to > > have partitions on which your critical mountable filesystems are located > > (e.g. /dev/wd0s1e) and then reboot, the boot may fail. > > This is exactely what happened to me the other day by playing around with 'MAEKEDEV all' to generate some device files in FreeBSD 2.2.2 ... Since I didn't had time yet to check for the boot failure, your info saved me some time. Thanks ! Wolfgang