morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus
Log | Files | Refs | Submodules | README | LICENSE

commit 2e4302af8889b917a793e5a31b4971e30782e038
parent 7034872a564a412b7c07478169b2742724d73620
Author: sin <sin@2f30.org>
Date:   Mon, 16 Sep 2013 12:23:55 +0100

Add create-bootable

Diffstat:
MREADME | 3+++
Acreate-bootable | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Adata/mbr.bin | 0
Adata/syslinux/hdt.c32 | 0
Adata/syslinux/menu.c32 | 0
Adata/syslinux/reboot.c32 | 0
6 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -12,4 +12,7 @@ Login with `root' and an empty password. Some of the packages are pulled from http://dl.2f30.org/morpheus-pkgs/ others are cloned from http://git.2f30.org. +After you've created the rootfs you can build a bootable image +with `sudo ./build-bootable'. + Enjoy! diff --git a/create-bootable b/create-bootable @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Ensure you've loaded the loop module with max_part=15 + +dd if=/dev/zero of=morpheus-boot.img bs=256MB count=1 +fdisk morpheus-boot.img <<< ' +o +n +p +1 + + +a +w' + +lodev=$(losetup -f --show morpheus-boot.img) || exit 1 +partition="$lodev"p1 +mkfs.ext4 $partition || exit 1 +mount $partition /mnt || exit 1 + +cp -dar root/* /mnt +extlinux --install /mnt/boot +cp data/syslinux/* /mnt/boot + +dd if=data/mbr.bin conv=notrunc bs=440 count=1 of=$lodev + +cat << EOF > /mnt/boot/extlinux.conf +DEFAULT morpheus +PROMPT 0 +TIMEOUT 50 + +UI menu.c32 + +MENU TITLE Morpheus + +LABEL morpheus + MENU LABEL Morpheus + LINUX /boot/bzImage + APPEND root=/dev/sda1 init=/init quiet rw +LABEL hdt + MENU LABEL HDT (Hardware Detection Tool) + COM32 hdt.c32 +LABEL reboot + MENU LABEL Reboot + COM32 reboot.c32 +EOF + +umount /mnt +sleep 3 +losetup -d $lodev diff --git a/data/mbr.bin b/data/mbr.bin Binary files differ. diff --git a/data/syslinux/hdt.c32 b/data/syslinux/hdt.c32 Binary files differ. diff --git a/data/syslinux/menu.c32 b/data/syslinux/menu.c32 Binary files differ. diff --git a/data/syslinux/reboot.c32 b/data/syslinux/reboot.c32 Binary files differ.