Hi thar! If you guys have any questions or trouble when following this guide, please do post it here, I will come back to you!
--Svenstaro 19:14, 3 June 2009 (EDT)
- 1 One little change
- 2 List of packages to be installed
- 3 Can't boot - problem with udev?
- 4 Memtest
- 5 adding a user on boot with useradd
- 6 Strange behavior
- 7 LiveCD for different architecture or dual-architecture iso possible?
- 8 Udev and iso label
- 9 baseline profile (for current archiso.git )
- 10 Installing non repo/AUR packages?
- 11 Move to main article?
- 12 Conflicting Dependencies?
- 13 Packages
- 14 Encryption
One little change
What about changing line 5 of the makefile to the following:
PACKAGES="`cat packages.list|grep -v '\#'` $(BOOTLOADER)"
which enables comments in the package list file and makes them lots more readable? -- GermanTrainFreak 12:57, 16 July 2009 (EDT)
Yes, it's a good idea! The good way may be:
PACKAGES="$(shell egrep -v ^[[:space:]]*\(\#\|$$\) packages.list)"
List of packages to be installed
Is it possible to preview list of packages to be installed? Sometimes you want to check if all expected dependencies are to be installed.
Where are downloaded packages stored (cache)? In host system or in new directories to be part of iso? Reason why I'm asking this is that if you build the same iso many times (testing, tweaking the final image), It would be convenient NOT to download the same packages again and again.
I found that host's /var/log/pacman.log contains log from installation of packages in newly created disk - This can be useful (to know), when you need to check what has been installed.
mkarchiso uses your host's system package cache so you do not in fact have to download packages multiple times. You can change the cache dir IIRC. mkarchiso basically just calls mkarchroot and you might want to have a look at both scripts. You can see a list of packages by enabling the verbose flag. It should then state everything as if you were running the commands manually. --Svenstaro 13:26, 22 January 2010 (EST)
Can't boot - problem with udev?
Hi, I cant boot the image. Errors it gives:
... :: Loading udev ... error binding control socket, seems udevd is already running ... ::Passing control to Arch Linux Initscripts... Please Wait /bin/run-init: opening console: No such file or directory Kernel panic - not syncing: Attempted to kill init! ...
From my understanding, udev failed to create console in /dev/. I wonder how it works for you....
If this is the case, the isolinux line archisolabel=XXX didn't get correctly overridden by the proper device. Do you have a recent git checkout of archiso? You will need the standard date utility or the creation will break. You can override the label with mkarchiso -L but I recommend you do not. If it still breaks, please write here again. --Svenstaro 13:37, 22 January 2010 (EST)
me too! i always end up with a kernel panic short term after hook [udev] and i got no clue. tried it via qemu and usb, usb sdb1 have been automaticly labeled via image per dd (ARCH_201005). i don't know how to how to solve the puzzle. are there some more informations like, you have to check this or that. or what is most likely mistaken. checking out forums and discussion didn't bring new ideas along. i got no chance for the 'ln -s /dev/archiso -thing' because kernel-panic happens before. so no dropping to ramfs. btw. what is the mkarchiso script trying to do (via make all) with /dev/sr0? there are no clues in this wiki for this call. hope someone can help. thanks a lot!! best to you all, icky
Change the memtest label in the isolinux configuration file isolinux.cfg:
$ vim boot-files/isolinux/isolinux.cfg ... LABEL memtest86+ KERNEL /boot/memtest86+/memtest.bin
add memtest86+ package to the packages list packages.list:
$ vim packages.list ... memtest86+
and rebuild the iso...
But when start memtest86+ at boot prompt, a lot of "0104" are displayed on screen... memtest.bin is ok when started with qemu -kernel work/iso/boot/memtest86+/memtest.bin
The new version of memtest (4.10) is just out...
After some research on the internet, found http://forum.canardpc.com/showthread.php?p=3204262 that fixes the problem: just remove .bin extension!
$ vim boot-files/isolinux/isolinux.cfg ... LABEL memtest86+ KERNEL /boot/memtest86+/memtest
adding a user on boot with useradd
useradd -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie
i found this line to be not functional. I had to use the "-m" switch of useradd as
useradd -m -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie
to be able to add a predefined user on boot using rc.local and useradd. anyone likes to comment on this?
With cdrom, there's a problem. First, all seems ok:
$ qemu-kvm -cdrom test.iso -boot d # cat /proc/mounts ... /dev/disk/by-label/arch_xxxx /bootmnt udf... /dev/loop0 /tmpfs/mnt/overlay squashfs... /dev/loop1 /tmpfs/mnt/root-image squashfs.. /dev/disk/by-label/arch_xxxx /bootmnt udf... ... # readlink -e /dev/disk/by-label/arch_xxxx /dev/sr0
But, if you do, and you can:
# eject /dev/sr0
the eject command is executed and, then, the system crash...
With hard disk, all is ok:
$ qemu-kvm -hda test.iso -boot c # cat /proc/mounts ... /dev/disk/by-label/arch_xxxx /bootmnt udf... /dev/loop0 /tmpfs/mnt/overlay squashfs... /dev/loop1 /tmpfs/mnt/root-image squashfs.. /dev/disk/by-label/arch_xxxx /bootmnt udf... ... # readlink -e /dev/disk/by-label/arch_xxxx /dev/sda1
Now, if you start with both, hard disk and cdrom:
$ qemu-kvm -hda test.iso -boot c -cdrom test.iso # cat /proc/mounts ... /dev/disk/by-label/arch_xxxx /bootmnt udf... /dev/loop0 /tmpfs/mnt/overlay squashfs... /dev/loop1 /tmpfs/mnt/root-image squashfs.. /dev/disk/by-label/arch_xxxx /bootmnt udf... ... # readlink -e /dev/disk/by-label/arch_xxxx /dev/sda1
All seems again ok: the hard disk is used and cdrom seems useless... But, again, if you redo the eject command, the system crash...
LiveCD for different architecture or dual-architecture iso possible?
Is it possible to build a LiveCD for a different architecture than the installed one? Means is it possible to build an i686 LiveCD on an x86_64 system or vice versa? And is it already possible to build the new dual-architecture LiveCD? -- cyberpatrol 22:53, 26 April 2010 (EDT)
Udev and iso label
Udev doesn't see the cdrom label or doesn't build the link in /dev/disk/by-label/.
Image is booting when running qemu with hda:
qemu-kvm -enable-kvm -localtime -m 512 -hda myarch-1.00-i686.iso -boot c
But when running qemu with cdrom, it isn't:
qemu-kvm -enable-kvm -localtime -m 512 -cdrom myarch-1.00-i686.iso -boot d
It's falling back to interactive prompt.
baseline profile (for current archiso.git )
This is a minimal profile for archiso.
aufs2 aufs2-util syslinux
union / auto noauto 0 0 devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs nodev,nosuid 0 0
@ARCH@/overlay.sqfs @ARCH@ / squashfs @ARCH@/root-image.sqfs @ARCH@ / squashfs
HOOKS="base udev archiso scsi sata usb filesystems usbinput" COMPRESSION="xz"
LABEL arch LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz26 APPEND initrd=/%INSTALL_DIR%/boot/%ARCH%/archiso.img archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
ver=$(shell date +%Y.%m.%d) WORKDIR=work NAME=myarch INSTALL_DIR=myarch COMPRESS=xz ARCH?=$(shell uname -m) PWD=$(shell pwd) FULLNAME=$(PWD)/$(NAME)-$(ver)-$(ARCH).iso PACKAGES="$(shell cat packages.list)" kver_FILE=$(WORKDIR)/root-image/etc/mkinitcpio.d/kernel26.kver all: myarch-iso # Rules for each type of image myarch-iso: $(FULLNAME) $(FULLNAME): base-fs mkarchiso -D $(INSTALL_DIR) -c $(COMPRESS) iso $(WORKDIR) $@ # This is the main rule for make the working filesystem. base-fs: root-image bootfiles initcpio overlay iso-mounts # Rules for make the root-image for base filesystem. root-image: $(WORKDIR)/root-image/.arch-chroot $(WORKDIR)/root-image/.arch-chroot: mkarchiso -D $(INSTALL_DIR) -p base create $(WORKDIR) mkarchiso -D $(INSTALL_DIR) -p $(PACKAGES) create $(WORKDIR) # Rule for make /boot bootfiles: root-image mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH) cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ mkdir -p $(WORKDIR)/iso/syslinux cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/syslinux/ cp boot-files/syslinux/syslinux.cfg $(WORKDIR)/iso/syslinux/syslinux.cfg # Rules for initcpio images initcpio: $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/archiso.img $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot mkdir -p $(WORKDIR)/iso/$(INSTALL_DIR)/boot/$(ARCH)/ mkinitcpio -c ./mkinitcpio.conf -b $(WORKDIR)/root-image -k $(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2) -g $@ # overlay filesystem overlay: cp -r overlay $(WORKDIR)/ # Rule to process isomounts file. iso-mounts: $(WORKDIR)/iso/$(INSTALL_DIR)/isomounts $(WORKDIR)/iso/$(INSTALL_DIR)/isomounts: isomounts root-image sed "s|@ARCH@|$(ARCH)|g" isomounts > $@ # Clean-up all work clean: rm -rf $(WORKDIR) $(FULLNAME) .PHONY: all myarch-iso .PHONY: base-fs .PHONY: root-image bootfiles initcpio overlay iso-mounts .PHONY: clean
Installing non repo/AUR packages?
Is it possible to install packages that do not come from the repos or AUR? I have many packages that aren't in the repos, I can't figure out how I would have to compile/install them to have them in the ISO. --kYd 10:50, 16 February 2011 (EST)
Thanks, I've read that and managed to get some packages from AUR installed, but I don't see how creating a local repo will allow me to install packages that I have to compile myself as pacman doesn't manage these, right? -- --kYd 10:58, 16 February 2011 (EST)
Of course I'm assuming you have created a PKGBUILD for it. You really shouldn't install plain upstream without a PKGBUILD. If you absolutely have to do that, just set the DESTDIR for the make install to the overlay directory. --Svenstaro 11:00, 16 February 2011 (EST)
Move to main article?
You seem to be maintaining this talk page as an expansion to the main article: why don't you consider moving the useful parts of this page to the main article, for example in a Troubleshooting section? -- Kynikos 16:56, 16 April 2011 (EDT)
As of late whenever I try to make the image it always errors out complaining about conflicting dependencies. I have been using the same configurations that have worked for months now only making minor changes here and there, and it has never done this before (except when there actually was conflicting dependencies). It happens when there are no packages in the packages.list file, when I tried using the sample /usr/share/archiso/syslinux-iso directory, and even after reinstalling archiso. Any ideas what's going on here?
It's most probably the cronie/dcron conflict which you currently get if you run [testing]. When pacman tries to install the base group it gets a conflict with dcron and dies because pacman doesn't do dependency resolution during group installation. It's a pacman bug. For now, manually install packages from the group but replace dcron with cronie. --Svenstaro 21:45, 1 May 2011 (EDT)
Just to follow up you were correct, replacing dcron with cronie solved the issue. Thank you.
Do packages need to be installed, or downloaded (present in pacmans cache), on the host system in order for archiso to install them to the to the overlay, or will it fetch them if needed?
Also, would it be possible to check for errors in the packages.list before going on to install them; there have been times when I have added a new package to the end of the list and spelt the name wrong, or the package name has changed, only for archiso to error out after a few minutes complaining that it can't find them package. Checking if all pacakges in packages.list exist first would save some time. Thanks.
--kYd 00:55, 17 May 2011 (BST)
It will use a cache and will fetch everything until all dependencies are resolved.
You can easily add that check yourself using pacman -Sqi on each package in a loop and comparing the output to "".
--Svenstaro 20:23, 16 May 2011 (EDT)
Thanks, I added the following to line 123 of mkarchiso (my bash skills are minimal, but it seems to work):
cat packages.list | while read line do echo "checking $line" if $(pacman -Ssq "$line") == "" ; then echo " $i package not found" killall mkarchiso fi done
--kYd 02:20, 17 May 2011 (BST)
You should consider making that bit a little nicer, making a patch and sending it off to the mailing list.
--Svenstaro 21:19, 16 May 2011 (EDT)
I'm trying to get encryption up and running; however, I have ran into a problem that is stopping me from completing the setup: the generated image expects the partition to have a label, but obviously luks formatted partitions can not be labelled, so once booting, and after entering the passphrase, I'm stuck at "Waiting 30 seconds for /dev/disk/by-label/..."
Is there any way I can get around this?