Skip to content

Instantly share code, notes, and snippets.

@kalxas
Forked from gdamjan/README
Created July 23, 2016 00:15
Show Gist options
  • Save kalxas/bb6b51c2cccd30e93228ecc80d90a9fb to your computer and use it in GitHub Desktop.
Save kalxas/bb6b51c2cccd30e93228ecc80d90a9fb to your computer and use it in GitHub Desktop.

Revisions

  1. @gdamjan gdamjan revised this gist Mar 22, 2016. 1 changed file with 0 additions and 0 deletions.
    Binary file added kika-wallpaper.png
    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.
  2. @gdamjan gdamjan revised this gist Oct 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
    sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash
    sudo mount -t overlay overlay -olowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive
    sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive

    # customize the live fs with systemd-nspawn (a better chroot)
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive
  3. @gdamjan gdamjan revised this gist Oct 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ sudo rm /tmp/custom/newlive/var/lib/dbus/machine-id
    # prepare new image content
    sudo rsync -av --exclude casper/filesystem.squashfs /tmp/custom/iso/ /tmp/custom/newiso/

    sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashfs -noappend # -b 1048576 -comp xz -Xdict-size 100%
    sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashfs -noappend -b 1048576 -comp xz -Xdict-size 100%
    printf $(sudo du -s --block-size=1 /tmp/custom/newlive | cut -f1) | sudo tee /tmp/custom/newiso/casper/filesystem.size

    # remove leftovers
  4. @gdamjan gdamjan revised this gist Oct 24, 2015. 2 changed files with 4 additions and 4 deletions.
    4 changes: 2 additions & 2 deletions make-iso
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,9 @@ sudo genisoimage -r -cache-inodes -J -l \
    -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    -o /tmp/custom-image.iso /tmp/custom/newiso/
    sudo isohybrid /tmp/custom-image.iso

    # optionaly update syslinux/isolinux.bin and syslinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below

    sudo dd if=/tmp/new-image.iso of=/dev/sdb bs=4M status=progress
    sudo dd if=/tmp/custom-image.iso of=/dev/sdb bs=4M status=progress
    4 changes: 2 additions & 2 deletions qemu-test
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    qemu-system-x86_64 -enable-kvm -m 2048 -drive file=/tmp/new-image.iso,media=cdrom,format=raw
    qemu-system-x86_64 -enable-kvm -m 2048 -bios OVMF-pure-efi.fd -drive file=/tmp/new-image.iso,media=disk,format=raw
    qemu-system-x86_64 -enable-kvm -m 2048 -drive file=/tmp/custom-image.iso,media=cdrom,format=raw
    qemu-system-x86_64 -enable-kvm -m 2048 -bios OVMF-pure-efi.fd -drive file=/tmp/custom-image.iso,media=disk,format=raw
  5. @gdamjan gdamjan revised this gist Oct 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp php5-cli firmware-b43-installer
    nspawn apt-get remove --purge unity-webapps-common thunderbird 'libreoffice*'
    nspawn apt-get auto-remove --purge
    nspawn apt-get autoremove --purge
    nspawn apt-get clean

    ROOT=/tmp/custom/newlive
  6. @gdamjan gdamjan revised this gist Oct 24, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,8 @@ nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-updates
    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp php5-cli firmware-b43-installer
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get remove --purge unity-webapps-common thunderbird 'libreoffice*'
    nspawn apt-get auto-remove --purge
    nspawn apt-get clean

    ROOT=/tmp/custom/newlive
  7. @gdamjan gdamjan revised this gist Oct 24, 2015. 3 changed files with 9 additions and 8 deletions.
    6 changes: 3 additions & 3 deletions README
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    # first, get the iso from http://releases.ubuntu.com/

    # make working dir hierarchy in /tmp (you'll need enough ram for this)
    sudo mkdir -p /tmp/custom/{_fs,_work,iso,newiso,newlive,project}
    sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
    sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_fs
    sudo mount -t overlay overlay -olowerdir=/tmp/custom/_fs,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive
    sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash
    sudo mount -t overlay overlay -olowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive

    # customize the live fs with systemd-nspawn (a better chroot)
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive
    2 changes: 1 addition & 1 deletion make-iso
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ sudo genisoimage -r -cache-inodes -J -l \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    sudo isohybrid /tmp/new-image.iso
    sudo isohybrid /tmp/custom-image.iso

    # optionaly update syslinux/isolinux.bin and syslinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below

    9 changes: 5 additions & 4 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -15,10 +15,11 @@ nspawn apt-get install --no-install-recommends \
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get clean


    sudo rm /tmp/custom/newlive/etc/skel/examples.desktop
    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
    ROOT=/tmp/custom/newlive
    sudo rm $ROOT/etc/skel/examples.desktop
    sudo sed -i 's/us/us,mk/' $ROOT/etc/default/keyboard
    sudo cp kika-wallpaper.png $ROOT/usr/share/backgrounds/warty-final-ubuntu.png
    sudo cp KIKA $ROOT/etc/NetworkManager/system-connections/

    # lets rename these so it's the same for syslinux and isolinux (usb & cd)
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
  8. @gdamjan gdamjan revised this gist Oct 23, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-updates

    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp php5-cli firmware-b43-installer
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get clean

  9. @gdamjan gdamjan revised this gist Oct 23, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/res

    DISTRO=`nspawn lsb_release -sc`
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO universe multiverse"
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-security universe multiverse"
    nspawn add-apt-repository "deb http://security.ubuntu.com/ubuntu $DISTRO-security universe multiverse"
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-updates universe multiverse"

    nspawn apt-get update
  10. @gdamjan gdamjan revised this gist Oct 23, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,7 @@ sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashf
    printf $(sudo du -s --block-size=1 /tmp/custom/newlive | cut -f1) | sudo tee /tmp/custom/newiso/casper/filesystem.size

    # remove leftovers
    sudo umount /tmp/custom/iso /tmp/custom/_fs /tmp/custom/newlive
    sudo umount /tmp/custom/_fs /tmp/custom/newlive /tmp/custom/iso
    sudo rm -rf /tmp/custom/newiso

    # /tmp/custom/project now has the delta of your changes, you could keep it for later reuse
  11. @gdamjan gdamjan revised this gist Oct 23, 2015. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,19 @@ alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/res
    --setenv=RUNLEVEL=1 \
    --setenv=http_proxy=http://192.168.88.49:3142'

    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe multiverse"'
    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-security universe multiverse"'
    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates universe multiverse"'

    DISTRO=`nspawn lsb_release -sc`
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO universe multiverse"
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-security universe multiverse"
    nspawn add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO-updates universe multiverse"

    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get clean


    sudo rm /tmp/custom/newlive/etc/skel/examples.desktop
    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
  12. @gdamjan gdamjan revised this gist Oct 23, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,8 @@ alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/res
    --setenv=http_proxy=http://192.168.88.49:3142'

    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe multiverse"'
    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-security universe multiverse"'
    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates universe multiverse"'
    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
  13. @gdamjan gdamjan revised this gist Oct 23, 2015. 2 changed files with 6 additions and 6 deletions.
    9 changes: 6 additions & 3 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,16 @@
    sudo cp ubuntu-all.list /tmp/custom/newlive/etc/apt/sources.list.d/ubuntu-all.list
    sudo rm /tmp/custom/newlive/etc/skel/examples.desktop
    alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf \
    -D /tmp/custom/newlive \
    --setenv=RUNLEVEL=1 \
    --setenv=http_proxy=http://192.168.88.49:3142'

    alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 --setenv=http_proxy=http://192.168.88.49:3142 -D /tmp/custom/newlive'
    nspawn add-apt-repository '"deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe multiverse"'
    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get clean

    sudo rm /tmp/custom/newlive/etc/skel/examples.desktop
    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png

    3 changes: 0 additions & 3 deletions ubuntu-all.list
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    deb http://archive.ubuntu.com/ubuntu/ wily multiverse universe
    deb http://security.ubuntu.com/ubuntu/ wily-security multiverse universe
    deb http://archive.ubuntu.com/ubuntu/ wily-updates multiverse universe
  14. @gdamjan gdamjan revised this gist Oct 23, 2015. 3 changed files with 11 additions and 8 deletions.
    4 changes: 2 additions & 2 deletions make-iso
    Original file line number Diff line number Diff line change
    @@ -3,12 +3,12 @@ VOLUME_NAME="Ubuntu KIKA"
    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

    sudo genisoimage -r -cache-inodes -J -l \
    -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
    -b syslinux/isolinux.bin -c syslinux/boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    sudo isohybrid /tmp/new-image.iso

    # optionaly update isolinux/isolinux.bin and isolinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below
    # optionaly update syslinux/isolinux.bin and syslinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below

    sudo dd if=/tmp/new-image.iso of=/dev/sdb bs=4M status=progress
    3 changes: 0 additions & 3 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,6 @@ sudo mkfs.vfat -n kika-101 /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

    sudo mount /dev/sdb1 /mnt
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg

    sudo rsync -av /tmp/custom/newiso/ /mnt
    sudo syslinux -d syslinux /dev/sdb1

    12 changes: 9 additions & 3 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,16 @@ alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/res
    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    nspawn apt-get remove --purge --auto-remove thunderbird 'libreoffice*'
    nspawn apt-get clean

    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
    sudo cp kika-logo-splash.png /tmp/custom/newiso/isolinux/splash.png
    sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # lets rename these so it's the same for syslinux and isolinux (usb & cd)
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg

    sudo cp kika-logo-splash.png /tmp/custom/newiso/syslinux/splash.png
    sudo sed -i '/^ui / d' /tmp/custom/newiso/syslinux/syslinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/syslinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg
  15. @gdamjan gdamjan revised this gist Oct 23, 2015. 4 changed files with 10 additions and 7 deletions.
    5 changes: 3 additions & 2 deletions README
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    # get the iso first
    # first, get the iso from http://releases.ubuntu.com/

    # make working dir hierarchy in /tmp (you'll need enough ram for this)
    sudo mkdir -p /tmp/custom/{_fs,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
    sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_fs
    sudo mount -t overlay overlay -olowerdir=/tmp/custom/_fs,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive

    # customize the live fs (a better chroot)
    # customize the live fs with systemd-nspawn (a better chroot)
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive

    apt-get update
    2 changes: 2 additions & 0 deletions make-iso
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    VOLUME_NAME="Ubuntu KIKA"

    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

    sudo genisoimage -r -cache-inodes -J -l \
    -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    5 changes: 1 addition & 4 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,10 @@
    sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    sudo sfdisk /dev/sdb <<EOF
    /dev/sdb1 : start= 2048, size= 6291456, type=b, bootable
    /dev/sdb2 : start= 6293504, size= 8857664, type=83
    EOF

    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.vfat -n kika-101 /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

    sudo mount /dev/sdb1 /mnt
    5 changes: 4 additions & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,7 @@ nspawn apt-get install --no-install-recommends \
    nspawn apt-get clean

    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp ~/Downloads/kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
    sudo cp kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
    sudo cp kika-logo-splash.png /tmp/custom/newiso/isolinux/splash.png
    sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg
  16. @gdamjan gdamjan revised this gist Oct 23, 2015. 2 changed files with 4 additions and 4 deletions.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # get the iso first

    sudo mkdir -p /tmp/custom/{_fs,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.04-desktop-amd64.iso /tmp/custom/iso
    sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
    sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_fs
    sudo mount -t overlay overlay -olowerdir=/tmp/custom/_fs,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive

    6 changes: 3 additions & 3 deletions ubuntu-all.list
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    deb http://archive.ubuntu.com/ubuntu/ vivid multiverse universe
    deb http://security.ubuntu.com/ubuntu/ vivid-security multiverse universe
    deb http://archive.ubuntu.com/ubuntu/ vivid-updates multiverse universe
    deb http://archive.ubuntu.com/ubuntu/ wily multiverse universe
    deb http://security.ubuntu.com/ubuntu/ wily-security multiverse universe
    deb http://archive.ubuntu.com/ubuntu/ wily-updates multiverse universe
  17. @gdamjan gdamjan revised this gist Oct 21, 2015. 2 changed files with 4 additions and 1 deletion.
    1 change: 0 additions & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,6 @@ sudo rsync -av --exclude casper/filesystem.squashfs /tmp/custom/iso/ /tmp/custom

    sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashfs -noappend # -b 1048576 -comp xz -Xdict-size 100%
    printf $(sudo du -s --block-size=1 /tmp/custom/newlive | cut -f1) | sudo tee /tmp/custom/newiso/casper/filesystem.size
    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

    # remove leftovers
    sudo umount /tmp/custom/iso /tmp/custom/_fs /tmp/custom/newlive
    4 changes: 4 additions & 0 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,11 @@ sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2
    sudo mount /dev/sdb1 /mnt
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg

    sudo rsync -av /tmp/custom/newiso/ /mnt
    sudo syslinux -d syslinux /dev/sdb1

    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

    sudo umount /mnt
    sudo dd if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdb
  18. @gdamjan gdamjan revised this gist Oct 7, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -2,10 +2,10 @@ sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxb
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    sudo sfdisk /dev/sdb
    sudo sfdisk /dev/sdb <<EOF
    /dev/sdb1 : start= 2048, size= 6291456, type=b, bootable
    /dev/sdb2 : start= 6293504, size= 8857664, type=83
    <ctrl-d>
    EOF

    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2
  19. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ sudo rm /tmp/custom/newlive/var/lib/dbus/machine-id
    # prepare new image content
    sudo rsync -av --exclude casper/filesystem.squashfs /tmp/custom/iso/ /tmp/custom/newiso/

    sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashfs -noappend
    sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashfs -noappend # -b 1048576 -comp xz -Xdict-size 100%
    printf $(sudo du -s --block-size=1 /tmp/custom/newlive | cut -f1) | sudo tee /tmp/custom/newiso/casper/filesystem.size
    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

  20. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,4 @@ nspawn apt-get install --no-install-recommends \
    nspawn apt-get clean

    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo sed -i 's/^XKBOPTIONS=.*/XKBOPTIONS="grp:alt_shift_toggle"/' /tmp/custom/newlive/etc/default/keyboard
    sudo cp ~/Downloads/kika-wallpaper.png /tmp/custom/newlive/usr/share/backgrounds/warty-final-ubuntu.png
  21. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxb
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    sudo sfidsk /dev/sdb
    sudo sfdisk /dev/sdb
    /dev/sdb1 : start= 2048, size= 6291456, type=b, bootable
    /dev/sdb2 : start= 6293504, size= 8857664, type=83
    <ctrl-d>
    @@ -11,9 +11,9 @@ sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

    sudo mount /dev/sdb1 /mnt
    sudo rsync -av /tmp/custom/newiso/ /mnt
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg
    sudo rsync -av /tmp/custom/newiso/ /mnt
    sudo syslinux -d syslinux /dev/sdb1
    sudo umount /mnt
    sudo dd if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdb
  22. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 4 additions and 6 deletions.
    10 changes: 4 additions & 6 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,11 @@
    sudo cp ubuntu-all.list /tmp/custom/newlive/etc/apt/sources.list.d/ubuntu-all.list
    sudo rm /tmp/custom/newlive/etc/skel/examples.desktop

    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive \
    apt-get update
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive \
    apt-get install --no-install-recommends \
    alias nspawn='sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 --setenv=http_proxy=http://192.168.88.49:3142 -D /tmp/custom/newlive'
    nspawn apt-get update
    nspawn apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive \
    apt-get clean
    nspawn apt-get clean

    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo sed -i 's/^XKBOPTIONS=.*/XKBOPTIONS="grp:alt_shift_toggle"/' /tmp/custom/newlive/etc/default/keyboard
  23. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion make-usb
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,11 @@ sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxb
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    sudo sfidsk /dev/sdb
    /dev/sdb1 : start= 2048, size= 6291456, type=b, bootable
    /dev/sdb2 : start= 6293504, size= 8857664, type=83
    <ctrl-d>

    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

  24. @gdamjan gdamjan revised this gist Oct 6, 2015. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion make-usb
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

    sudo mount /dev/sdb1 /mnt
    sudo rsync -av /tmp/custom/newiso/
    sudo rsync -av /tmp/custom/newiso/ /mnt
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg
    sudo syslinux -d syslinux /dev/sdb1
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --set
    apt-get update
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive \
    apt-get install --no-install-recommends \
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp
    git vim-nox python-pip python3-pip ipython3-notebook ipython-notebook haskell-platform clisp firmware-b43-installer
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive \
    apt-get clean

  25. @gdamjan gdamjan revised this gist Oct 6, 2015. 4 changed files with 29 additions and 23 deletions.
    14 changes: 1 addition & 13 deletions README
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    # get the iso
    VOLUME_NAME="Ubuntu KIKA"
    # get the iso first

    sudo mkdir -p /tmp/custom/{_fs,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.04-desktop-amd64.iso /tmp/custom/iso
    @@ -27,19 +26,8 @@ sudo mksquashfs /tmp/custom/newlive /tmp/custom/newiso/casper/filesystem.squashf
    printf $(sudo du -s --block-size=1 /tmp/custom/newlive | cut -f1) | sudo tee /tmp/custom/newiso/casper/filesystem.size
    (cd /tmp/custom/newiso && find . -type f -print0 | xargs -0 md5sum | grep -v "\./md5sum.txt" ) | sudo tee /tmp/custom/newiso/md5sum.txt

    # optionaly update isolinux/isolinux.bin and isolinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below

    # make iso
    sudo genisoimage -r -cache-inodes -J -l \
    -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    sudo isohybrid /tmp/new-image.iso

    # remove leftovers
    sudo umount /tmp/custom/iso /tmp/custom/_fs /tmp/custom/newlive
    sudo rm -rf /tmp/custom/newiso

    # sudo dd if=/tmp/new-image.iso of=/dev/sdb bs=4M status=progress
    # /tmp/custom/project now has the delta of your changes, you could keep it for later reuse
    12 changes: 12 additions & 0 deletions make-iso
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    VOLUME_NAME="Ubuntu KIKA"

    sudo genisoimage -r -cache-inodes -J -l \
    -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    sudo isohybrid /tmp/new-image.iso

    # optionaly update isolinux/isolinux.bin and isolinux/*.c32 with newer from syslinux, might make it more compatible with isohybrid below

    sudo dd if=/tmp/new-image.iso of=/dev/sdb bs=4M status=progress
    15 changes: 15 additions & 0 deletions make-usb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw -O ^has_journal /dev/sdb2

    sudo mount /dev/sdb1 /mnt
    sudo rsync -av /tmp/custom/newiso/
    sudo mv /tmp/custom/newiso/isolinux /tmp/custom/newiso/syslinux
    sudo mv /tmp/custom/newiso/syslinux/isolinux.cfg /tmp/custom/newiso/syslinux/syslinux.cfg
    sudo syslinux -d syslinux /dev/sdb1
    sudo umount /mnt
    sudo dd if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sdb
    11 changes: 1 addition & 10 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -10,13 +10,4 @@ sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --set
    apt-get clean

    sudo sed -i 's/us/us,mk/' /tmp/custom/newlive/etc/default/keyboard
    sudo sed -i 's/^XKBOPTIONS=.*/XKBOPTIONS="grp:alt_shift_toggle"/' /tmp/custom/newlive/etc/default/keyboard

    sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxboot
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw /dev/sdb2
    # see https://damjan.softver.org.mk/wiki/BootUSB
    sudo sed -i 's/^XKBOPTIONS=.*/XKBOPTIONS="grp:alt_shift_toggle"/' /tmp/custom/newlive/etc/default/keyboard
  26. @gdamjan gdamjan revised this gist Oct 6, 2015. 2 changed files with 7 additions and 2 deletions.
    3 changes: 3 additions & 0 deletions README
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,11 @@ sudo mount -t overlay overlay -olowerdir=/tmp/custom/_fs,upperdir=/tmp/custom/pr
    sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive

    apt-get update
    apt-get upgrade
    apt-get install --no-install-recommends ...
    ...
    apt-get purge ...
    apt-get autoremove --purge
    apt-get clean
    <ctrl-d>
    sudo rm /tmp/custom/newlive/root/.bash_history
    6 changes: 4 additions & 2 deletions prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -16,5 +16,7 @@ sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxb
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    # sudo mkfs.ext4 -L casper-rw /dev/sdb2
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    sudo mkfs.vfat /dev/sdb1
    sudo mkfs.ext4 -L casper-rw /dev/sdb2
    # see https://damjan.softver.org.mk/wiki/BootUSB
  27. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion prepare-programming-101.txt
    Original file line number Diff line number Diff line change
    @@ -16,5 +16,5 @@ sudo sed -i '/^ui / d' /tmp/custom/newiso/isolinux/isolinux.cfg # disable gfxb
    sudo sed -i 's/quiet splash/quiet splash persistent/' /tmp/custom/newiso/isolinux/txt.cfg /tmp/custom/newiso/boot/grub/grub.cfg

    # make persistent usb
    # fdisk /dev/sdb # n <enter> <enter> <enter> w
    # sudo fdisk /dev/sdb # n <enter> <enter> <enter> <enter> w
    # sudo mkfs.ext4 -L casper-rw /dev/sdb2
  28. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README
    Original file line number Diff line number Diff line change
    @@ -38,4 +38,5 @@ sudo isohybrid /tmp/new-image.iso
    sudo umount /tmp/custom/iso /tmp/custom/_fs /tmp/custom/newlive
    sudo rm -rf /tmp/custom/newiso

    # sudo dd if=/tmp/new-image.iso of=/dev/sdb bs=4M status=progress
    # /tmp/custom/project now has the delta of your changes, you could keep it for later reuse
  29. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ sudo genisoimage -r -cache-inodes -J -l \
    -boot-load-size 4 -boot-info-table \
    -V "$VOLUME_NAME" \
    -o /tmp/new-image.iso /tmp/custom/newiso/
    # sudo isohybrid --uefi /tmp/new-image.iso
    sudo isohybrid /tmp/new-image.iso

    # remove leftovers
    sudo umount /tmp/custom/iso /tmp/custom/_fs /tmp/custom/newlive
  30. @gdamjan gdamjan revised this gist Oct 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # get the iso
    VOLUME_NAME="Ubuntu remix"
    VOLUME_NAME="Ubuntu KIKA"

    sudo mkdir -p /tmp/custom/{_fs,_work,iso,newiso,newlive,project}
    sudo mount -o loop ~/Downloads/ubuntu-15.04-desktop-amd64.iso /tmp/custom/iso