Difference between revisions of "Disk creation"

From MAGEEC
Jump to: navigation, search
(Created page with "A page just listing the commands necessary to create a ubuntu MAGEEC iso. * https://help.ubuntu.com/community/LiveCDCustomization == Prepare and chroot stage # Setup chroo...")
 
Line 3: Line 3:
 
* https://help.ubuntu.com/community/LiveCDCustomization
 
* https://help.ubuntu.com/community/LiveCDCustomization
  
== Prepare and chroot stage
+
== Prepare and chroot stage ==
  
 
  # Setup chroot
 
  # Setup chroot
Line 65: Line 65:
 
  exit
 
  exit
  
== Set up plymouth
+
== Set up plymouth ==
  
 
  # Edit plymouth
 
  # Edit plymouth
Line 79: Line 79:
 
  find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
 
  find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
  
== Build iso
+
== Build iso ==
 
  # Follow steps on first link
 
  # Follow steps on first link

Revision as of 09:52, 18 January 2014

A page just listing the commands necessary to create a ubuntu MAGEEC iso.

Prepare and chroot stage

# Setup chroot
sudo cp /etc/resolv.conf edit/etc/
sudo cp /etc/hosts edit/etc/
sudo mount --bind /dev/ edit/dev
sudo chroot edit bash
# Inside the chroot
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
# Install packages
add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
add-apt-repository ppa:terry.guo/gcc-arm-embedded
sed -i 's/saucy/raring/' /etc/apt/sources.list.d/terry_guo-gcc-arm-embedded-saucy.list
apt-get update
apt-get -y install python-setuptools && easy_install pyusb
apt-get -y dist-upgrade && apt-get -y install gcc-avr build-essential gdb-avr avr-libc avrdude git vim arduino python-numpy python-scipy gcc-arm-none-eabi nautilus-open-terminal autoconf automake autotools-dev libtool libusb-1.0-0-dev libusb-0.1-4
# Edit unity
# Change background
# copy file into /usr/share/backgrounds/...
# Remove ubiquity
apt-get purge ubiquity
# Add files to desktop
cd /etc/skel
mkdir Desktop
rm example.desktop
cd Desktop
git clone https://github.com/libopencm3/libopencm3
git clone https://github.com/jpallister/stlink
git clone https://github.com/jpallister/stm32f4-energy-monitor/
git clone https://github.com/mageec/beebs
# Make smaller if need to put on 1gb usb
# purge libreoffice thunderbird
# Clean
apt-get clean
rm /etc/hosts
touch /etc/hosts
rm /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc
#rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
umount /proc || umount -lf /proc
umount /sys
umount /dev/pts
exit

Set up plymouth

# Edit plymouth
cd extract-cd/casper
mkdir lztempdir 
cd lztempdir
lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames
# copy mageec theme into /lib/plymouth/themes
# link default.plymouth to mageec.plymouth
cp ../initrd.lz ../inird.lz.orig
find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz

Build iso

# Follow steps on first link