Date: Thu, 25 Sep 2008 14:45:13 -0700 From: "Peter Wemm" <peter@wemm.org> To: "Marcel Moolenaar" <xcllnt@mac.com> Cc: FreeBSD Arch <arch@freebsd.org>, Poul-Henning Kamp <phk@phk.freebsd.dk> Subject: Re: RFC: making gpart default Message-ID: <e7db6d980809251445x233bb8f4w95591c8f1eacb47@mail.gmail.com> In-Reply-To: <901FB1DE-BA4C-405C-8F8E-AA8CCC6A89FA@mac.com> References: <1896.1222371977@critter.freebsd.dk> <901FB1DE-BA4C-405C-8F8E-AA8CCC6A89FA@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 25, 2008 at 2:24 PM, Marcel Moolenaar <xcllnt@mac.com> wrote: > On Sep 25, 2008, at 12:46 PM, Poul-Henning Kamp wrote: [..] >> pretty conclusively, but fsck will happily trash a database >> stored in partition that previously contained a filesystem, >> provided enough magic bits survive near the start. > > That's why I believe we need to attach real meaning > to the partition type. We should disallow a newfs_ufs > on a partition that is not of type freebsd-ufs. We > should disallow swapon for a partition that is not > of type freebsd-swap. etc.. > > With gpart it's trivial to change the partition type, > so it's no hassle. The protection and support this > gives users certainly outweighs the hassle IMO. Don't forget that we currently support creating file systems on raw disk devices. eg: /dev/ad1. You are currently allowed to swapon /dev/ad2. There are a lot of those out there, you can't break it because people know where you work and will come find you. :) This however, is a different issue to switching GEOM_BSD + GEOM_MBR to GEOM_PART_BSD + GEOM_PART_MBR. (I think the partition type thing could be solved by specifying the heuristic as "if the partition *has a type* and its not ufs, then disallow ufs" etc. Don't forget to include --shoot-foot=allowed override mode.) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e7db6d980809251445x233bb8f4w95591c8f1eacb47>