Corgi Linux, a tool for generating installable Debian live media

Discussion in 'all things UNIX' started by Gullible Jones, Apr 12, 2014.

Thread Status:
Not open for further replies.
  1. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    Disclaimer: Corgi Linux comes with no warranty, and I do not consider it production ready. Use at your own risk.

    Okay, with that aside...

    https://gitorious.org/corgi-linux

    Corgi Linux is not a distribution. It's a simplistic frontend to Debian's bootcd tool, for creating customized, installable live media. Your binaries and scripts go in the 'bin' directory; dotfiles and such go in 'desktop'; and packages go in the 'packagelist.txt' file, one per line. Given those files and the right command line arguments, it will generate a CD image of a working Debian desktop.

    By default, the files it comes with will generate an ugly but functional IceWM desktop, with Chromium, Xfe, Wicd, CUPS, and a bunch of other applications. You get to choose the root and limited user ('corgi') password when the image is created.

    (NB, on the default desktop I've solved Linux's device mounting issues with a bit of creative stupidity: there's one entry in the root menu to mount all external drives, and another to unmount them. I'm not yet sure if it works with eSATA disks.)

    Anyway the default setup should be good for casual use on low-spec computers; and has several advantages over most "mini" distros, since it's actually Debian.

    Known Bugs

    - /tmp on the live medium has the wrong permissions, for reasons I haven't yet figured out. mkcorgi.sh adds an entry in /etc/rc.local (on the finished live medium) to correct this. The entry can be safely removed after the live system is installed to your hard disk.

    TODO List

    - Parameterize more stuff, and use long options instead of positional parameters. e.g. It should be possible to specify hostname of live system, name of packages list file...

    - Make the whole thing less interactive. dpkg stuff should all be parameterized, and password prompts should only show up when the script first starts.

    - Add a script to make the live installation friendlier, and better able to handle hard disks with 4 KB sectors.

    - Add support for grub-efi

    - Add support for GPT partition tables, if possible

    - Make the script compatible with Ubuntu as well as Debian
     
    Last edited: Apr 12, 2014
  2. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    6,029
    Very cool :thumb:
     
  3. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    Thanks mirimir!

    I'm currently working on a version that supports long options, and is more flexible in general (e.g. you can specify where to look for files). Should be done some time tomorrow.
     
  4. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
  5. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    Thanks @NGRhodes - no, I'm not in contact with them. Probably should be.
     
  6. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    So today I created and merged a new git branch. This is almost but not quite a rewrite, and should be more powerful and flexible.

    Features and Fixes
    - Better option parsing
    - More helpful help message
    - Lots of stuff has been parameterized: language, time zone, custom file location, kernel package, hostname...
    - mkcorgi is now almost entirely noninteractive, you only have to enter the root and user passwords at the beginning
    - You can select PAE vs. non-PAE kernels for x86 installs
    - Ubuntu images *should* be supported now (though I haven't tested that yet; feedback would be appreciated... ;) )
    - mkcorgi unmounts virtual filesystems from the chroot when it's done
    - Locale and time zone setup is handled in (slightly) more distro agnostic fashion

    Future Plans
    - Support for grub-efi
    - Decent wrapper for the installer
    - Documentation!
     
  7. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    BTW, I'm probably going to be switching the default configuration to a different window manager. IceWM is nice; but it has some very annoying bugs when dealing with GTK3 programs, and does not force programs to honor rubber-band resize.

    I may also see about providing an official ISO image of the default build at some point, provided I can host it somewhere. (I will absolutely not stoop to using disreputable file-sharing sites.)
     
  8. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    I've added a second desktop configuration directory ("newdesk") which will generate a Fluxbox desktop. Less buggy than IceWM, but alas less friendly as well.

    I'm considering perhaps creating a custom desktop based on Fvwm, for the default config... Ideally I want a desktop setup that's simple for novices, without being irritating for advanced users. More on that in another thread though.
     
  9. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    So, bad news: as of right now, Corgi Linux is obsolete. The live CD utility it depended on has been obsoleted and replaced in Debian Testing.

    But the good news is, I am planning a replacement. :) This version will be hopefully simpler and easier to use. It will
    - Be written in Perl
    - Not use cheesy tricks (if I can help it)
    - Use a config file instead of tons of CLI arguments
    - Create very simple live CDs using GRUB2 (and tmpfs where needed)

    I'll also work on a simple installer script.

    Stay tuned...
     
  10. deBoetie

    deBoetie Registered Member

    Joined:
    Aug 7, 2013
    Posts:
    1,150
    Location:
    UK
    Thanks for the info and good luck with the Perl alternative. I was particularly interested in your reference to the drive mounting aspect and wondered if you could clarify.

    For various reasons (including security), I do not want my Live distribution to open the laptop's harddrive, certainly not by default. I assume from what you've written, this means omitting the relevant entries from the build configuration files? Is this something that might be achieved with the script you are contemplating?
     
  11. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    The default Corgi setup wouldn't mount anything by default, until the "Mount Devices" menu entry was clicked. The menu entry and the script it invokes are easily editable/removable. Take a look at the contents of the 'newdesk' configuration directory. :)

    That said, if you're looking for security, this might not be what you want. It depends heavily on your needs.

    Re the Perl version, I think now that I should try to fix and clean up the bash version a bit before going for a full programming language. I will see if I can make some progress this weekend.
     
  12. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    Okay, halfway there but I have to ask: does anyone know a reliable way to create a GRUB2 based live CD, without using buggy, barely-supported stuff like xorriso? If not I will probably just use isolinux/isohybrid like everyone else...
     
Loading...
Thread Status:
Not open for further replies.