Page 1 of 8 123 ... LastLast
Results 1 to 10 of 72

Thread: Remastersys Guide - Create Your Own Ubuntu-based Distro

  1. #1
    Join Date
    Sep 2005
    Beans
    228

    Remastersys Guide - Create Your Own Ubuntu-based Distro

    NOTE: Beware of copying and pasting commands with < > brackets as it completely depends on your individual setup.

    REMASTERSYS RESOURCES
    + IMPORTANT resources & files:
    • Remastersys Home
    • Remastersys Forum Home
    • Remastersys Wiki
    • Capink's in-depth explanation of Fragadelic's Remastersys script
    • Or if you're a scripter, examine /usr/bin/remastersys. I tried adding the -noI -noD -noF switches inside the script so that squashfs would be uncompressed, but the boot and install take nearly 40% longer on machines with only 512MB of ram. That, in addition to wasted disk space and possibly bandwidth, means you should prolly just avoid making that same change.
    • And when you edit /etc/remastersys.conf, DO NOT change the LIVEUSER variable to "user" or "gdm".
    • Add one of these repositories, depending on your distro:

    # Remastersys Debian
    deb http://www.geekconnection.org/remastersys/repository debian/

    # Remastersys Ubuntu (For Gutsy & Earlier - version 2.0.11-1)
    deb http://www.geekconnection.org/remastersys/repository remastersys/

    # Remastersys Ubuntu (For Hardy, Intrepid, & Jaunty - version 2.0.12-1)
    deb http://www.geekconnection.org/remastersys/repository ubuntu/

    # Remastersys Ubuntu (For Karmic & Newer w/ grub2 support - version 2.0.13-1)
    deb http://www.geekconnection.org/remastersys/repository karmic/
    REMASTERSYS NOTES
    • The only real difference between backup and dist modes is that backup mode copies the /home directory to the CD/DVD. Dist mode auto-logins to the desktop with the LIVEUSER you create, whereas backup mode stops at GDM, waiting for a specific user on your current machine to login and eventually find their normal desktop on the CD/DVD and the installed system.
    • Either way, the compressed filesystem will need to be 4GB or less. No buts about it, unless of course, you're a genius with ample time on your hands. That also means backup mode will need to include your /home folder in that 4 GB iso.
    • Run aptitude clean to get rid of unnecessary .debs.
    • When you run remastersys dist, you create your dist CDFS, which is eventually converted into your dist ISO. If you only need to edit one file, such as menu.lst so you can change Grub's timeout... just go to the CDFS chroot ( /home/remastersys/ISOTMP/ ) and you'll see the filesystem layout of your dist CD. In this example, edit /home/remastersys/ISOTMP/boot/grub/menu.lst and then you'll be ready to run remastersys dist iso since there's no reason to run the regular dist command and completely re-create the CDFS.
    • If you've already run remastersys, and you need to make drastic changes, make sure to run remastersys clean before remastersys dist.
    • When you're ready to test the .iso out, use a virtual machine like VMware, VirtualBox, or QEMU... so you don't have to waste any CDs or time burning the CDs.
    • And just FAIR WARNING: I would highly consider avoiding Intrepid & Jaunty if you're planning on many, many people using this, particularly machines with Intel-based graphics... as I've found two Intel machines that display a cruddy Xorg immediately after only upgrading default Ubuntu packages (NOT installing anything extra yet)... but I do like most of the software better in Intrepid. Jaunty is definitely still too new right now. Debian Lenny might be best for a larger, supported distro as it is now officially stable.


    DISTRO PREP
    • Upgrade and install all your packages. Google Desktop might be a possible addition to your dist.
    • Remove all unnecessary packages. Here is a nice guide with an example of what I've chosen to remove from my system:

    aptitude purge ubuntu-desktop ttf-arabeyes ttf-arphic-uming ttf-indic-fonts-core ttf-kochi-gothic ttf-kochi-mincho ttf-lao ttf-malayalam-fonts ttf-thai-tlwg ttf-unfonts-core language-support-en language-support-translations-en language-support-writing-en myspell-en-za openoffice.org-thesaurus-en-au openoffice.org-l10n-en-za openoffice.org-l10n-en-gb openoffice.org-help-en-gb scim scim-bridge-agent scim-bridge-client-gtk scim-gtk2-immodule scim-modules-socket libscim8c2a libchewing3 brltty brltty-x11 gnome-app-install ubufox apturl tracker tracker-search-tool libdeskbar-tracker libtracker-gtk0 deskbar-applet fast-user-switch-applet tomboy
    • Move all backgrounds to /usr/share/backgrounds/
    • Move all GDM themes to /usr/share/gdm/themes/
    • Move all other themes to /usr/share/themes/
    • Move all icons & cursors to /usr/share/icons/
    • Likewise, move all usplash themes somewhere in /usr/share/, or splashy themes to /etc/splashy/themes/
    • Make your graphical changes (GNOME, KDE, etc.). I use GNOME, and I like to move my volume applet to the top right for easy wheel scrolling of volume. Everybody I know that uses Ubuntu says that's their favorite part about the way I configure it for them. I add the weather applet to the left of the volume applet, and then I add the system monitor applet somewhere on the top panel and enable the memory, networking, swap, & hard disk graphs. I lock the applets and panels. It's best to organize these applets thru the gconf-editor. Then, I right-click the applications menu to edit it and do a little trimming. I use the GNOME Keyboard app to make the CapsLock an extra Ctrl key. I also edit the GNOME "Sessions" and "Services" apps to trim them down to something I find more reasonable (i.e. - no bluetooth, no automatic upgrade manager, & no "user folders update", among other things). Then I use sysv-rc-conf to trim some more. If you want to use Compiz Fusion, it's prolly best to install fusion-icon and switch to metacity right before copying your config files to /etc/skel/. I make sure Nautilus, Firefox [extensions], and other programs are setup the way I like...


    COPY WORTHY CONFIG FOLDERS TO SYSTEM WIDE FOLDERS
    • Don't copy .xchat/ as it saves your username in the config.
    • Don't copy .wine/ as it is very problematic, try using the global wine folder, which is (??).
    • Clear all Firefox cache and GNOME Recent Documents cache right before doing this.
    • Clearly, you must be a superuser to do this, so don't forget about sudo. Now might be a good time to use sudo's -s switch so you don't need to type sudo before all these commands:

    sudo -s
    cp -Rf .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/ /etc/skel/
    cp -Rf .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/ /root/
    cd /etc/skel
    chown -R root:root .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/
    cd /root
    chown -R root:root .config/ .fontconfig/ .gconf/ .gconfd/ .gnome2/ .mozilla/ .nautilus/


    GDM
    • Use GNOME "Login Window" app to select your new theme and login background colors.
    • Remember the HEX values for the color, as you'll need them later.
    • Search for the terms GraphicalTheme & GtkTheme in these two files and you'll see 4 variables you need to change your GDM theme, GtkTheme, and 2 background color for pre- and post-login. Should be near lines 504, 347, & 466.

    sudo <EDITOR> /etc/gdm/gdm.conf
    sudo <EDITOR> /etc/gdm.conf-custom


    BOOT SPLASH
    • Only way I know of to customize Usplash is to use the Startup Manager program.
    • Using most Usplash themes was buggy for me on recent versions of Ubuntu.
    • As long as the theme works on your computer, it should work on both the dist cd & dist install.
    • Splashy is an easy alternative to Ubuntu's default Usplash.
    • Splashy allows you to create boot, shutdown, suspend, resume, & error images of your choice with a progress bar. Just make sure to use PNGs otherwise you'll get an Error -3.
    • Simply this command to create splashy themes:

    splashy -c

    BOOT LOADER
    • This is only for the CD, it will not copy to the dist install as ubiquity & update-grub create a custom Grub config for the new system during install.
    • If you want to alter the installed Grub, update-grub must be altered, then the package must be flagged to never upgrade.
    • You could also choose ISOLINUX if GRUB doesn't work on some extremely rare chipsets.
    • EDIT the Grub config files in /etc/remastersys/grub/:

    sudo <EDITOR> menu.lst.gutsyandbefore -OR- menu.lst.hardyandlater
    • CREATE Grub background & move to proper folder:

    convert infile.jpg -resize 640x480 -colors 14 -depth 8 splash.xpm.gz
    mv splash.xpm.gz /etc/remastersys/grub/

    • If you plan on editing the update-grub script to reflect your changes on the installed system, you can move your splash image to the shared folder:

    mv splash.xpm.gz /usr/share/grub-installer/splash.xpm.gz

    PRESEEDING
    • Preseeding allows you to customize what variables are passed to the Ubiquity installer, but it only works if you use ubiquity's --automatic switch. I don't need to make it automatic for everybody yet, but whenever I install it I can simply press Alt+F2 and type in "ubiquity --automatic" so that my language, time zone, & keyboard layout are automatically passed to the installer. I only use this in my config right now, but there are more options available which can be seen here, in this example guide.
    • Eventually remastersys will copy all preseeds from the /etc/remastersys/preseed/ folder for multiple machines and/or purposes.
    • Until then, just add your own preseed options to /etc/remastersys/preseed/custom.preseed

    # Locale sets language and country.
    d-i debian-installer/locale string en_US

    # Keyboard selection.
    # Disable automatic (interactive) keymap detection.
    d-i console-setup/ask_detect boolean false
    #d-i console-setup/modelcode string pc105
    d-i console-setup/layoutcode string us
    # To select a variant of the selected layout (if you leave this out, the
    # basic form of the layout will be used):
    #d-i console-setup/variantcode string dvorak

    # Controls whether or not the hardware clock is set to UTC.
    d-i clock-setup/utc boolean false

    # You may set this to any valid setting for $TZ; see the contents of
    # /usr/share/zoneinfo/ for valid values.
    d-i time/zone string US/Central

    # Controls whether to use NTP to set the clock during the install
    d-i clock-setup/ntp boolean true
    # NTP server to use. The default is almost always fine here.
    #d-i clock-setup/ntp-server ntp.example.com
    STATIC DNS (OpenDNS), EVEN WITH DHCP
    • EDIT resolvconf:

    sudo -s
    mkdir /etc/resolvconf/resolv.conf/
    <EDITOR> /etc/resolvconf/resolv.conf/base

    + ADD:
    nameserver 208.67.222.222
    nameserver 208.67.220.220
    • EDIT the DHCP client:

    <EDITOR> /etc/dhcp3/dhclient.conf
    + REPLACE the "#prepend domain-name-servers" line with this:
    prepend domain-name-servers 208.67.222.222,208.67.220.220;
    RESTRICTED FIRMWARE AND DRIVERS
    • It's prolly a good idea to add restricted hardware drivers or firmware, especially for wireless networking.
    • It's also prolly a good idea to let the jockey-gtk "Hardware Drivers" app juggle between the multiple Nvidia and ATI drivers *after* installation. There are older, legacy graphics cards that won't work with the newest drivers from these manufacturers' websites.
    • I only wanted to support all the wireless cards possible and NTFS support for easy resizing of Windows partitions, so I installed these packages:

    sudo aptitude install b43-fwcutter ndisgtk madwifi linux-restricted-modules ntfs-3g ntfs-config

    USB PERSISTENCE
    • If using 8.10 or later, simply use the usb-creator tool, which is installed by default in Intrepid.
    • If using 8.04 LTS, you can add usb-creator by following these instructions... however, persistence still won't work with the default 8.04 initrd.
    • As long as you can copy and paste, it might be easier to just ignore this program and follow these manual instructions... (NOTE: Everything before the fdisk command must be run before remastersys dist to work properly)


    ---- BEGIN PREPARATION ----

    sudo -s
    <EDITOR> /usr/share/initramfs-tools/scripts/casper
    (for 8.04 and earlier ONLY)
    + REMOVE this section: ",mode=755"
    <EDITOR> /usr/share/initramfs-tools/init (for 8.04 and earlier ONLY)
    + ADD the lines preceded by a + between the lines preceded by a *:
    * break)
    * break=premount
    * ;;
    *
    + persistent)
    + PERSISTENT=yes
    + root_persistence=casper-rw
    + home_persistence=home-rw
    + ;;
    +
    * esac
    • For all versions of Ubuntu, if you'd like to take away the prompt at shutdown to remove the CD from the tray and press ENTER, consider this step [...'cause I'm not positive it's the right solution]:

    chmod -x /etc/rc[06].d/*casper
    • Now re-run remastersys to implement these new initramfs changes:

    remastersys clean; remastersys dist

    ---- END PREPARATION ----

    fdisk /dev/sd<X> (replacing <X> with what you believe, 110% sure, is your flash drive)
    • Now, add 2 to 4 partitions depending on the size of your distro, whether you want a separate partition for your home directory, and whether you want a FAT16/32 partition for easy access on Windows machines. Make sure the first partition is bootable. Now format and label your partitions:

    mkfs.ext2 -L <distroName> /dev/sd<X>1
    mkfs.ext2 -L casper-rw /dev/sd<X>2
    mkfs.ext2 -L home-rw /dev/sd<X>3
    mkfs.vfat -F 16 -n files /dev/sd<X>4

    • Now pull out the drive & plug it back in.

    cd /media/cdrom/
    cp -R boot boot.catalog casper/ .disk/ md5sum.txt preseed/ README.diskdefines /media/<distroName>/
    cd /boot/grub/
    cp ./*stage* /media/<distroName>/boot/grub/
    <EDITOR> /media/<distroName>/boot/grub/menu.lst

    + ADD a boot menu along these lines...
    default 0
    timeout 7

    #color cyan/blue white/blue
    #splashimage=/boot/splash.xpm.gz

    title Start Ubuntu in Graphical Mode
    kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram rw persistent
    initrd /casper/initrd.gz

    #title Install Ubuntu
    #kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram #only-ubiquity
    #initrd /casper/initrd.gz

    title Start Ubuntu in Demo Mode
    kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram
    initrd /casper/initrd.gz

    title Start Ubuntu in Safe Graphical Mode
    kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram xforcevesa rw persistent
    initrd /casper/initrd.gz

    #title Start Ubuntu in Text Only Mode
    #kernel /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper root=/dev/ram #textonly rw persistent
    #initrd /casper/initrd.gz

    #title Check the CD/DVD for defects
    #kernel /casper/vmlinuz boot=casper integrity-check
    #initrd /casper/initrd.gz

    title Memory Test
    kernel /boot/memtest

    title Boot the First Hard Disk
    root (hd1)
    chainloader +1
    • Install grub to the MBR of the flash drive:

    grub
    $ grub > geometry (hd <Press TAB key now, making sure to realize which one is your USB>
    $ grub > root (hd<1>,0)
    $ grub > setup (hd<1>,0)
    $ grub > quit

    ADD WUBI TO YOUR DIST
    • For right now, there's a decent bit of editing to /usr/bin/remastersys and /etc/remastersys.conf.
    • Just read the Remastersys + Wubi Guide, which I'm thinking could be made simpler by just offering a copy of the edited remastersys script.
    Last edited by grndslm; February 13th, 2011 at 01:53 PM.

  2. #2
    Join Date
    Sep 2005
    Beans
    228

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    Made a couple changes for clarification.
    Last edited by grndslm; February 13th, 2011 at 01:55 PM.

  3. #3
    Join Date
    Jun 2007
    Location
    Nottingham, UK
    Beans
    1,659
    Distro
    Ubuntu

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    USB persistance can be achieved with the USB Creator tool in Intrepid. You could make your Debian or Hardy based distro, then use an Intrepid installation to make a persistant bootable USB
    email: me@rory.sh
    IRC: ​blazemore@freenode

  4. #4
    Join Date
    Sep 2005
    Beans
    228

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    Quote Originally Posted by blazemore View Post
    USB persistance can be achieved with the USB Creator tool in Intrepid. You could make your Debian or Hardy based distro, then use an Intrepid installation to make a persistant bootable USB
    Say Wha?!?

    I've had a huge Xorg problem by merely upgrading the default Ubuntu packages from Intrepid & Jaunty on a couple Intel video laptops I have... so I'd like to stick with Hardy or maybe try out Debian whenever I've got a lotta free time.

    Soo... how can I use the Intrepid installation to make a Hardy based distro persistent?? I see things like usb-creator and Unetbootin. Is the tool in Intrepid different from usb-creator? Does the Intrepid tool make USB persistence from any LiveCD, such as one I create with remastersys??
    Last edited by grndslm; February 13th, 2011 at 01:57 PM.

  5. #5
    Join Date
    Feb 2009
    Beans
    5

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    Hey Guys

    when I follow CapInk's guide on remastersys' website http://www.remastersys.klikit-linux.com/capink.html

    everything work except the home user (after install) has no folder in his directory and if I create one, it goes directly on the desktop. Does anyone have a fix for this?

    thanks

  6. #6
    Join Date
    Jun 2007
    Location
    Nottingham, UK
    Beans
    1,659
    Distro
    Ubuntu

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    What you can do is this:

    1. Make your remastersys distro. It's really easy to do this, you can use the small "tutorial" on the website.

    2. Copy your iso onto a USB flash drive or something

    3. Boot from the Intrepid LiveCD, move your iso file from the USB to the Desktop, go to System->Administration->Make USB startup disk (or something)

    4. Select the iso file, and select the USB stick you want to install to

    5. Select how much of the USB stick you'd like to dedicate to persistance. If the USB stick is going to be used exclusively as a liveUSB, you can safely set this to maximum.
    email: me@rory.sh
    IRC: ​blazemore@freenode

  7. #7
    Join Date
    Jun 2006
    Location
    Charleston, WV
    Beans
    79
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    I've been messing with Remastersys since Feb. when I created my first remaster of gOS Rocket E. Lately I've been using Remastersys with Xubuntu Hardy to create my own customized XXCE distro. Adding a bunch of web apps and changing all the default graphics and stuff to make it XXCE and not just an Xubuntu ripoff. The last one I did was after I installed LXDE and uninstalled Xfce4. (I also had to remove network-manager and install Wicd.)

  8. #8
    Join Date
    Sep 2005
    Beans
    228

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    Quote Originally Posted by blazemore View Post
    5. Select how much of the USB stick you'd like to dedicate to persistance. If the USB stick is going to be used exclusively as a liveUSB, you can safely set this to maximum.
    Thanks for the instructions. I realized that the application in Intrepid is usb-creator, which can be added to Hardy... so I shouldn't need the Intrepid LiveCD.

    I did need an explanation of what the slider was for allocating how much persistence space you wanted. Seems like what isn't used is available for traditional flash drive usage.
    Last edited by grndslm; February 13th, 2011 at 01:51 PM.

  9. #9
    Join Date
    Sep 2005
    Beans
    228

    Post Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    Quote Originally Posted by joborohe View Post
    Hey Guys

    when I follow CapInk's guide on remastersys' website http://www.remastersys.klikit-linux.com/capink.html

    everything work except the home user (after install) has no folder in his directory and if I create one, it goes directly on the desktop. Does anyone have a fix for this?

    thanks
    You might be better off asking at the remastersys forum, linked to at the top of this guide. Just curious, tho... what's wrong with just running remastersys backup or remastersys dist... or simply altering the /usr/bin/remastersys script if it isn't exactly what you want??
    Last edited by grndslm; February 13th, 2011 at 01:52 PM.

  10. #10
    Join Date
    Sep 2005
    Beans
    228

    Re: Remastersys Guide - Create Your Own Ubuntu-based Distro

    UPDATED...

    - Fixed /etc/remastersys.conf path.
    - Added STATIC DNS (OpenDNS) section
    - Added USB PERSISTENCE section.
    - Found one more thing for me to look into -- restricted firmware.

    I've always bought Intel-based laptops because I knew they had open source drivers. Yesterday, I ran across a lappy with Broadcom wireless (yucky!). The firmware and "firmware cutter" were obviously not on the LiveCD, so I couldn't get online. I'm not around the computer at the moment, but I'm wondering if anybody else has remastered a LiveCD with the firmware already in place at /lib/firmware/ ?? Would Jockey still be needed to enable the driver? ... or would it then be capable of auto-detection on boot from the CD/DVD?
    Last edited by grndslm; February 13th, 2011 at 01:52 PM.

Page 1 of 8 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •