You are not logged in.

#1 2011-05-13 00:46:31

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

custom arch iso, Makefile:28: *** missing separator. Stop.

Hello. I am making a custom iso/installer for Arch. As far as I can tell I've followed the instructions on the wiki to a T. The below thread has helped me but I'm still getting this error after removing all tabs in vim Makefile.
https://bbs.archlinux.org/viewtopic.php?id=116350

This is my 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=mydir
COMPRESS=gzip
LABEL=MY_ARCH
#  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

I'm lost as to how to fix it. All of the lines that are not actual commands have had the initiating tab removed.

The wiki page is here: https://wiki.archlinux.org/index.php/Ar … ive_medium

Any help is appreciated.

Brittany

Offline

#2 2011-05-13 02:02:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

Just a wild guess:

# The following will first run the base-fs routine before creating the final iso# image.

Why do you have that second '#'?

Wai,t you have removed tabs? All indents within the makefile are with tabs. Using spaces gives a missing separator error.
https://wiki.archlinux.org/index.php/Ar … ive_medium (the first warning)

Some lines are not indented (the first one below) and some (the second line in the example below) have to be indented with a tab:

myarch: base-fs
    mkarchiso -L "$(LABEL)" -D $(INSTALL_DIR) -c $(COMPRESS) -p syslinux iso "$(WORKDIR)" "$(FULLNAME)".iso

Last edited by karol (2011-05-13 02:08:27)

Offline

#3 2011-05-13 02:42:52

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

I didn't add spaces. I remove the tabs so that the commands would be flush with the edge of the document. That's what that other thread said to do. Ok I'll recopy the makefile even though it didn't work. I don't know what else to do to get it to run. I'm using vim not a text editor. Thanks.

Offline

#4 2011-05-13 02:58:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

xdunlapx wrote:

I didn't add spaces. I remove the tabs so that the commands would be flush with the edge of the document. That's what that other thread said to do. Ok I'll recopy the makefile even though it didn't work. I don't know what else to do to get it to run. I'm using vim not a text editor. Thanks.

vim is a text editor ...

https://bbs.archlinux.org/viewtopic.php … 64#p929264

walterjwhite wrote:

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

Some lines are not indented at all. The ones that are indented, use tabs.

Offline

#5 2011-05-13 10:45:46

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

tongue I know vim is a text editor. The wiki page states that I have to use vim instead of a gui text editor.

When I copied the wiki Makefile it gave the same error but on a different line. So that's why I removed the tabs.

Offline

#6 2011-05-13 10:49:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

If it fails again, try this one.

Offline

#7 2011-05-13 19:31:27

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

I copied the Makefile from the wiki. I'm getting Makefile:46: *** missing separator. Stop.

I saw the link you provided karol and I don't understand what to do with it. It goes over my head unfortunately.

The reason I am doing making my own iso is because it would be much easier to format and reinstall than using the standard arch install iso. I don't do well with text-based installers for whatever reason. Always had problems with them. I apparently tend to skip part of the install when I use a text-based installer, which is what happened the first (and only time so far) that I've installed Arch. But I used the core disk instead of the net-install. Maybe the net-install would be easier somehow? That's what I hear.

Any further help would be appreciated.

Offline

#8 2011-05-14 07:04:54

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

Re: custom arch iso, Makefile:28: *** missing separator. Stop.

Ok I've given up on this. I'll attempt using larch.

Offline

Board footer

Powered by FluxBB