[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rfc: growlight as d-i partman replacement



Christian PERRIER left as an exercise for the reader:
> I'd like to followup on your suggestion as it seems well thought and
> prepared and not just one idea thrown in the wild as I was initially
> thinking (sorry for this).

Thanks for your kind words, christian! i'm still wondering what people think
about installing GRUB to all disks (thus making boots more deterministic (see
my mail to this group of 2012-10-13 [0])), but I think this change would be
more valuable still.

> You have well identified the difficulty in abandoning partman. The
> main "problem" is probably that partman is well modular and makes it
> "easy" to throw in some new fliesystem support (it seems this is not

I'd say it's simpler to add a filesystem to growlight's c code than the scripts
of partman, personally (I know I'm sounding kinda like Lennart here, but hey,
SprezzOS uses systemd). Here's the fs dispatch table [1], used for creation,
setting a UUID (where appropriate), and setting a label (where appropriate):

  static const struct fs {
        const char *name;
        const char *desc;
        int (*mkfs)(const char *,const struct mkfsmarshal *);
        int (*uuidset)(const char *,const unsigned char *);
        char nameparam;                 // parameter on cmdline to name
        int namemax;                    // max length of name, if known
  } fss[] = {
        {
                .name = "vfat",
                .desc = "File Allocation Table (DOS default)",
                .mkfs = vfat_mkfs,
                .namemax = 11,
                .nameparam = 'n',
                .uuidset = NULL,
        },
  
etc etc. Take a look -- I think you'll find the C very readable.

> "easy" to throw in some new fliesystem support (it seems this is not
> as easy as it seems, though, as you ended up in developing something
> else for ZFS support).

ZFS is a combination of the block layer and filesystem layer. It was going to
require special cases in most any system. Indeed, it gets a whole (small) file
and device class in growlight [2].

I didn't end up using partman because partman is ugly, partman's source is
ugly, partman seems unusable with a large number of drives (I regularly deal
with 128 drives in a machine), partman didn't have UEFI support at the time,
I found d-i debconf scripts difficult to debug, and I need curved unicode
box characters to live.

> It is quite easy, though to push for your proposal : develop growlight
> and the udebs it produces in the D-I infrastructure, eventually

As said, you can find a growlight udeb in the SprezzOS repositories, where it
is actively used in our d-i-derived installer:

 [skynet](0) $ links2 -dump https://www.sprezzatech.com/apt/pool/main/g/growlight/
                      Index of /apt/pool/main/g/growlight

  [ICO] Name                                        Last        Size Description 
                                                    modified    
    --------------------------------------------------------------------------
  [DIR] Parent Directory                                           -             
  [   ] growlight-udeb_1.0.4.5-SprezzOS2_amd64.udeb 06-Feb-2013 122K  04:26
  [   ] growlight_1.0.4.5-SprezzOS2.debian.tar.gz   06-Feb-2013 4.6K  04:26 
  [   ] growlight_1.0.4.5-SprezzOS2.dsc             06-Feb-2013 2.2K  04:26
  [   ] growlight_1.0.4.5-SprezzOS2_amd64.deb       06-Feb-2013 208K  04:26
  [   ] growlight_1.0.4.5.orig.tar.xz               06-Feb-2013 388K  04:26 
    --------------------------------------------------------------------------

    Apache/2.2.22 (Debian) Server at www.sprezzatech.com Port 443
 [skynet](0) $ dpkg-deb -I growlight-udeb_1.0.4.5-SprezzOS2_amd64.udeb 
  new debian package, version 2.0.
  size 128482 bytes: control archive=1301 bytes.
      828 bytes,    14 lines      control              
     1092 bytes,    39 lines   *  postinst             #!/bin/sh
      118 bytes,     4 lines      templates            
  Package: growlight-udeb
  Source: growlight
  Version: 1.0.4.5-SprezzOS2
  Architecture: amd64
  Installer-Menu-Item: 4200
  Maintainer: Nick Black <nick.black@sprezzatech.com>
  Installed-Size: 468
  Depends: cdebconf-udeb, hw-detect, md-modules, mdadm-udeb, dmsetup-udeb, libpci3-udeb, libcryptsetup4-udeb, libatasmart4-udeb, libpciaccess0-udeb, kbd-udeb, e2fsprogs-udeb, dosfstools-udeb, jfsutils-udeb, xfsprogs-udeb, ntfs-3g-udeb, btrfs-tools-udeb, hfsutils-udeb, f2fs-tools-udeb, util-linux-udeb
  Replaces: grub-installer, lilo-installer, partitioner, partman
  Provides: bootable-system, created-fstab, harddrive-detection, made-filesystems, made-swapspace, mounted-partitions, partitioned-harddrives
  Section: debian-installer
  Priority: standard
  Description: Prepare target
   Growlight udeb, unsuitable for installation on normal machines.
 [skynet](0) $ 

Obviously this is not going to land for Wheezy, but it seems that this provides
a pretty decent starting point for the beginning of the next development epoch.

Thanks!

-rigorously, nick
 Hacker in Charge, SprezzOS Project

[0] http://lists.debian.org/debian-boot/2012/10/msg00184.html
[1] https://github.com/dankamongmen/growlight/blob/master/src/fs.c
[2] https://github.com/dankamongmen/growlight/blob/master/src/zfs.c

-- 
nick black     http://www.sprezzatech.com -- unix and hpc consulting
to make an apple pie from scratch, you need first invent a universe.

Attachment: signature.asc
Description: Digital signature


Reply to: