Difference between revisions of "Talk:Archiso"

From ArchWiki
Jump to: navigation, search
(Aufs2)
(46 intermediate revisions by 10 users not shown)
Line 1: Line 1:
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!
+
==Archiso doesn't work on non stock kernel==
  
--[[User:Svenstaro|Svenstaro]] 19:14, 3 June 2009 (EDT)
+
I've been having on and off issues when building ISOs with archiso and the other day when I was working on one I did a pacman -Syu before working but didn't reboot. I was running on the stock kernel at that point because the linux-ck kernel had not updated yet. My ISO built fine. Later that day I rebooted and was now running on the updated linux-ck kernel and suddenly the build process would simply die without any errors, even with the -v option. Right after installing all the custom packages, a dd output appears and then a mkfs.vfat version message appears and that's where it dies. Rebooting back to the stock arch kernel fixed the issue. I'm guessing it has something to do with hardcoded names or something like that in the build scripts.
  
== One little change ==
+
Is this normal behaviour? I don't mind using the stock kernel on the ISOs I build but I figured I'd at least be able to build them on a different one.
  
What about changing line 5 of the makefile to the following:
+
On that note, is it possible to use a kernel other than the stock one within the ISOs we build?  
 
+
[[User:Biltong|Biltong]] ([[User talk:Biltong|talk]]) Sun May 6 2012, 21:47 SAST
PACKAGES="`cat packages.list|grep -v '\#'` $(BOOTLOADER)"
+
 
+
which enables comments in the package list file and makes them lots more readable? -- [[User:GermanTrainFreak|GermanTrainFreak]] 12:57, 16 July 2009 (EDT)
+
 
+
Yes, it's a good idea! The good way may be:
+
 
+
<nowiki>
+
PACKAGES="$(shell egrep -v ^[[:space:]]*\(\#\|$$\) packages.list)"
+
</nowiki>
+
 
+
== 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. --[[User:Svenstaro|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. --[[User:Svenstaro|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
+
 
+
== Memtest ==
+
 
+
Change the memtest label in the isolinux configuration file isolinux.cfg:
+
<nowiki>
+
$ vim boot-files/isolinux/isolinux.cfg
+
 
+
...
+
LABEL memtest86+
+
KERNEL /boot/memtest86+/memtest.bin
+
</nowiki>
+
 
+
add memtest86+ package to the packages list packages.list:
+
<nowiki>
+
$ vim packages.list
+
 
+
...
+
memtest86+
+
</nowiki>
+
 
+
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''
+
 
+
''Idea?''
+
 
+
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!
+
 
+
<nowiki>
+
$ vim boot-files/isolinux/isolinux.cfg
+
 
+
...
+
LABEL memtest86+
+
KERNEL /boot/memtest86+/memtest
+
</nowiki>
+
 
+
== adding a user on boot with useradd ==
+
<nowiki>
+
useradd -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie
+
</nowiki>
+
i found this line to be not functional. I had to use the "-m" switch of useradd as
+
<nowiki>
+
useradd -m -u 1000 -g users -G storage,floppy,optical,audio,video,network,games,wheel,disk -d /home/archie archie
+
</nowiki>
+
to be able to add a predefined user on boot using rc.local and useradd. anyone likes to comment on this?
+
 
+
== Strange behavior ==
+
 
+
With cdrom, there's a problem. First, all seems ok:
+
<nowiki>
+
$ 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
+
</nowiki>
+
 
+
But, if you do, and you can:
+
 
+
<nowiki>
+
# eject /dev/sr0
+
</nowiki>
+
 
+
''the eject command is executed and, then, the system crash...''
+
 
+
 
+
With hard disk, all is ok:
+
<nowiki>
+
$ 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
+
</nowiki>
+
 
+
Now, if you start with both, hard disk and cdrom:
+
<nowiki>
+
$ 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
+
</nowiki>
+
 
+
All seems again ok: the hard disk is used and cdrom seems useless...
+
''But, again, if you redo the eject command, the system crash...''
+
 
+
''Idea?''
+
 
+
== 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 ==
+
 
+
Hi,
+
 
+
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:
+
<nowiki>
+
qemu-kvm -enable-kvm -localtime -m 512 -hda myarch-1.00-i686.iso -boot c
+
</nowiki>
+
 
+
But when running qemu with cdrom, it isn't:
+
<nowiki>
+
qemu-kvm -enable-kvm -localtime -m 512 -cdrom myarch-1.00-i686.iso -boot d
+
</nowiki>
+
It's falling back to interactive prompt.
+
 
+
Idea?
+
 
+
:: Yes, there are a bug/(or not have a feature) in qemu that with cdrom in IDE mode (default) the command (READ DISC INFORMATION) fails [https://bugzilla.redhat.com/show_bug.cgi?id=609049 | Bug 609049], use instead an SCSI cdrom that works OK, this is with -drive file=xyz.iso,if=scsi,media=cdrom,boot [[User:Djgera|Djgera]] 10:52, 13 July 2010 (EDT)
+
 
+
== 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.
+
--[[User:kYd|kYd]] 10:50, 16 February 2011 (EST)
+
 
+
It's explained in the main article: [[Archiso#packages.list]]. See the tip. Just add it to your local repo. --[[User:Svenstaro|Svenstaro]] 10:53, 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? -- --[[User:kYd|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. --[[User:Svenstaro|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? -- [[User:Kynikos|Kynikos]] 16:56, 16 April 2011 (EDT)
+
 
+
== Conflicting Dependencies? ==
+
 
+
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. --[[User:Svenstaro|Svenstaro]] 21:45, 1 May 2011 (EDT)
+
 
+
Just to follow up you were correct, replacing dcron with cronie solved the issue.  Thank you.
+
 
+
== Packages ==
+
 
+
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 "".
+
 
+
--[[User:Svenstaro|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.
+
 
+
--[[User:Svenstaro|Svenstaro]] 21:19, 16 May 2011 (EDT)
+
 
+
I've made it a little cleaner, and produced a patch (maybe it could be improved).
+
I am not sure which mailing it should be posted to, so I'll leave it here in case any one else finds it useful or wants to pick up on it:
+
 
+
patch: http://codepad.org/BN0KpTPy
+
raw changes: http://codepad.org/SxAGaczy
+
 
+
--kYd 00:57, 8 June 2011 (BST)
+
 
+
== Encryption ==
+
 
+
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?
+
 
+
Thanks.
+
 
+
I wouldn't know how to solve this cleanly. Ask Djgera.  --[[User:Svenstaro|Svenstaro]] 22:30, 18 May 2011 (EDT)
+
 
+
== Aufs2 ==
+
 
+
Aufs2 is no longer working in 2.6.39, so it is impossible to create a working image.
+
 
+
Is there anyway around this, or is it a case of just waiting?
+
 
+
I came here looking for info on this, currently I am working around it by having a custom local repository with the kernel version 2.6.38 package along with aufs2 and aufs2-util packages (still had both in package cache, you probably will too).  See the note I added a while ago on the wiki page in the packages section for brief instruction and links.
+
 
+
Please see and test my archiso changes, it does not use aufs2 ;) See http://mailman.archlinux.org/pipermail/arch-releng/2011-June/001807.html [[User:Djgera|Djgera]]
+

Revision as of 15:24, 27 February 2013

Archiso doesn't work on non stock kernel

I've been having on and off issues when building ISOs with archiso and the other day when I was working on one I did a pacman -Syu before working but didn't reboot. I was running on the stock kernel at that point because the linux-ck kernel had not updated yet. My ISO built fine. Later that day I rebooted and was now running on the updated linux-ck kernel and suddenly the build process would simply die without any errors, even with the -v option. Right after installing all the custom packages, a dd output appears and then a mkfs.vfat version message appears and that's where it dies. Rebooting back to the stock arch kernel fixed the issue. I'm guessing it has something to do with hardcoded names or something like that in the build scripts.

Is this normal behaviour? I don't mind using the stock kernel on the ISOs I build but I figured I'd at least be able to build them on a different one.

On that note, is it possible to use a kernel other than the stock one within the ISOs we build? Biltong (talk) Sun May 6 2012, 21:47 SAST