From owner-freebsd-hackers Fri Sep 20 20:37:59 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA15652 for hackers-outgoing; Fri, 20 Sep 1996 20:37:59 -0700 (PDT) Received: from hp.com (hp.com [15.255.152.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id UAA15625 for ; Fri, 20 Sep 1996 20:37:56 -0700 (PDT) Received: from srmail.sr.hp.com by hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA255387072; Fri, 20 Sep 1996 20:37:52 -0700 Received: from hpnmhjw.sr.hp.com by srmail.sr.hp.com with ESMTP (1.37.109.16/15.5+ECS 3.3) id AA110087071; Fri, 20 Sep 1996 20:37:52 -0700 Received: from mina.sr.hp.com by hpnmhjw.sr.hp.com with SMTP (1.37.109.16/15.5+ECS 3.3) id AA000537071; Fri, 20 Sep 1996 20:37:51 -0700 Message-Id: <199609210337.AA000537071@hpnmhjw.sr.hp.com> To: rhh@ct.picker.com Cc: hackers@freebsd.org Subject: Re: fdisk changes, anyone? In-Reply-To: Your message of "Fri, 20 Sep 1996 18:08:14 EDT." <199609202208.SAA27475@elmer.ct.picker.com> Date: Fri, 20 Sep 1996 20:37:49 -0700 From: Darryl Okahata Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > As for myself, my current make-ufs-zip script, which currently has in > it this nasty mess: > > fdisk -u /dev/${DEVICE} << !EOF! > n y 165 1 196576 y 0 1 1 95 63 32 y y 0 0 0 n y y 0 0 0 n y y 0 0 0 n y > y 0 y y > !EOF! Well, with my fdisk manglings, it now looks something like (this example fully initializes the disk, as opposed to editing existing partitions): fdisk -i -f - /dev/${DEVICE} < Though this isn't rocket science, I can see the benefit of having this > in a config file for newbies that just want to be able to store files on a > UFS ZIP disk and don't know or even want to know about how to set up what > cylinders, heads, and sectors go into their UFS slice. Umm, my changes are aimed at the EXPERT user. With these changes, it's just too easy to accidentally blow away an existing disk. When a config file is used, there is no pretty confirmation query asking the user if he really wants to amputate his toes and other sensitive body parts .... > But as they'll > still want to build a script to pull the fdisk, disklabel, and newfs into > one convenient "just do-it" command, its arguable and not much extra effort > for them to just pull this script out of the mailing list archives. Oh, yes. That's been my goal all along. I want a nice little tool that does everything, and making fdisk non-interactive was step #1. However, what I really want is a nice, screen-oriented, sysinstall-like (;-) tool. I'd also like to be able to use it for disaster-recovery (e.g., on a fixit-like disk). Unfortunately, this means that I'll probably have to write the user-interface in C, which begs the question, "Why don't I drop-kick fdisk and use libdisk instead?" (I discovered libdisk after I had finished most of my fdisk modifications). I don't have an answer for this. Any opinions? [ Instead of writing a C program, I'd love to write a Perl5 script. Unfortunately, not only would this make disaster-recovery impossible (perl is too big), and would force the user to install the optional perl5 package, but it would force the user to install an optional perl5 module to get access to curses. Bleah. ] -- Darryl Okahata Internet: darrylo@sr.hp.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Hewlett-Packard, or of the little green men that have been following him all day.