You are not logged in.

#1 2011-04-06 12:11:39

mshenrick
Member
Registered: 2011-03-08
Posts: 14

[SOLVED] Custom Archiso problems

(this may be the wrong board)

Hi,
I am trying to make my own custom arch iso, by following the archiso wiki article. I go to compile it and get this error:

 Makefile:46: *** missing separator.  Stop. 

I assume it is talking about the 46th line, but what do I need to change?

This is the 46th Line:

     cp -r "$(WORKDIR)"/iso/syslinux "$(WORKDIR)"/iso/boot 

and here is the entire makefile

#### Change these settings to modify how this ISO is built.
#  The directory that you'll be using for the actual build process.
WORKDIR=work
# INSTALL_DIR -> max 8 chars.
INSTALL_DIR=myarch
COMPRESS=gzip
LABEL=MYARCH
#  A list of packages to install, either space separated in a string or line separated in a file. Can include groups.
PACKAGES="$(shell cat packages.list) syslinux"
# The name of our ISO. Does not specify the architecture!
NAME=myarch
# Version will be appended to the ISO.
VER=1.00
# Kernel version. You'll need this. Don't change it.
kver_FILE=$(WORKDIR)/root-image/etc/mkinitcpio.d/kernel26.kver
# Architecture will also be appended to the ISO name.
ARCH?=$(shell uname -m)
# Current working directory
PWD:=$(shell pwd)
# This is going to be the full name the final iso/img will carry
FULLNAME="$(PWD)"/$(NAME)-$(VER)-$(ARCH)

# Default make instruction to build everything.
all: myarch

# The following will first run the base-fs routine before creating the final iso image.
myarch: base-fs
    mkarchiso -L "$(LABEL)" -D $(INSTALL_DIR) -c $(COMPRESS) -p syslinux iso "$(WORKDIR)" "$(FULLNAME)".iso

# This is the main rule for make the working filesystem. It will run routines from left to right. 
# Thus, root-image is called first and syslinux is called last.
base-fs: root-image boot-files initcpio overlay iso-mounts syslinux

# The root-image routine is always executed first. 
# It only downloads and installs all packages into the $WORKDIR, giving you a basic system to use as a base.
root-image: "$(WORKDIR)"/root-image/.arch-chroot
"$(WORKDIR)"/root-image/.arch-chroot:
root-image:
    mkarchiso -D $(INSTALL_DIR) -c $(COMPRESS) -p $(PACKAGES) create "$(WORKDIR)"

# Rule for make /boot
boot-files: root-image
    cp -r "$(WORKDIR)"/root-image/boot "$(WORKDIR)"/iso/
    cp -r boot-files/* "$(WORKDIR)"/iso/ # mkarchiso will look for "$(WORKDIR)"/iso/syslinux/syslinux.cfg
    # During the boot, syslinux will look for /boot/syslinux/syslinux.cfg, because /boot/syslinux/ directory exists
     cp -r "$(WORKDIR)"/iso/syslinux "$(WORKDIR)"/iso/boot 
    # Based on mkarchiso
     sed "s|%ARCHISO_LABEL%|$(LABEL)|g; s|%INSTALL_DIR%|$(INSTALL_DIR)|g;" -i "$(WORKDIR)"/iso/boot/syslinux/syslinux.cfg; 

# Rules for initcpio images
initcpio: "$(WORKDIR)"/iso/boot/kernel26.img
"$(WORKDIR)"/iso/boot/kernel26.img: mkinitcpio.conf "$(WORKDIR)"/root-image/.arch-chroot
    mkdir -p "$(WORKDIR)"/iso/boot
    mkinitcpio -c ./mkinitcpio.conf -b "$(WORKDIR)"/root-image -k `uname -r` -g $@

# See: Overlay
overlay:
    mkdir -p "$(WORKDIR)"/overlay/etc/pacman.d
    cp -r overlay "$(WORKDIR)"/
    wget -O "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/
    sed -i "s/#Server/Server/g" "$(WORKDIR)"/overlay/etc/pacman.d/mirrorlist

# Rule to process isomounts file.
iso-mounts: "$(WORKDIR)"/$(INSTALL_DIR)/isomounts
"$(WORKDIR)"/$(INSTALL_DIR)/isomounts: isomounts root-image
    sed "s|@ARCH@|$(ARCH)|g" isomounts > $@

# This routine is always executed just before generating the actual image. 
syslinux: root-image
    mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)
    mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/syslinux
    cp -PR $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/$(INSTALL_DIR)/syslinux/
    cp -PR $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/$(INSTALL_DIR)/syslinux/

# In case "make clean" is called, the following routine gets rid of all files created by this Makefile.
clean:
    rm -rf "$(WORKDIR)" "$(FULLNAME)".img "$(FULLNAME)".iso

.PHONY: all myarch
.PHONY: base-fs
.PHONY: root-image boot-files initcpio overlay iso-mounts
.PHONY: syslinux
.PHONY: clean

Last edited by mshenrick (2011-05-07 09:32:21)

Offline

#2 2011-05-05 12:41:36

walterjwhite
Member
Registered: 2011-05-01
Posts: 207

Re: [SOLVED] Custom Archiso problems

Hi,

I had the same problem - please make sure you follow the instructions carefully ...

The problem is that apparently Makefiles use tabs and not spaces, make sure every line is indented with a tab or not indented.


Walter

Offline

Board footer

Powered by FluxBB