You are not logged in.
First I posted this as a reply in [semi-FIXED]Errors with "AIF" in (daily) releng netinstall iso's ? but some user told me to create a new post for avoiding necro-bumping, so...
Basically, what is related to the above post and that I mention here, is a method for remastering an official archlinux iso. If you don't want to check the post, this is what I'm talking about:
Here is what I did to re-build the official "archlinux-2011.08.19-netinstall-x86_64.iso"...
# as root for everything: mkdir /mnt/archiso mkdir /mnt/root-image-tmp mkdir /root-image # mount -o loop /iso/archlinux-2011.08.19-netinstall-x86_64.iso /mnt/archiso cp -a /mnt/archiso /customiso cd /customiso/arch/x86_64 cp root-image.fs.sfs /root-image cd /root-image unsquashfs root-image.fs.sfs cd squashfs-root mount root-image.fs /mnt/root-image-tmp # # "cd /mnt/root-image-tmp" and make any "static" changes only; ie: add your aif configs/files, directories,..., to /mnt/root-image-tmp ... # cd / umount /mnt/root-image-tmp cd /root-image mv root-image.fs.sfs root-image.fs.sfs.old mksquashfs squashfs-root root-image.fs.sfs cp -f root-image.fs.sfs /customiso/arch/x86_64 cd /customiso genisoimage -l -r -J -V "ARCH_201108" -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o ~/arch-custom.iso .
I tried it with some files for testing and it works perfect, thanks to scjet user.
But now I have a problem and wonder if you can help me.
I want to add some packages to pacman /var/cache/pacman/pkg/ for installing them offline from my remastered iso, but when I try to copy them to the mounted root-image.fs it can't copy all of my desired packages because there's no free space.
I ran df -h and get this:
/dev/loop0 701M 701M 0 100% /mnt/root-image-tmp
It isn't the total output but clearly shows that the filesystem has a defined size of 701M and i need more space for my iso.
Please help me....
1. Can I increase this size for the mounted system?.
2. How can I increase it?
3. Can i use a DVD for my remastered iso?
4. There's another way for installing almost 400 packages offline?
Thanks for your help!!!
Last edited by lenieco (2012-10-18 00:36:13)
Offline
Did you do
cp -a /mnt/archiso /customiso
etc.?
Last edited by karol (2012-10-17 22:12:39)
Offline
yes, I did all those steps, first copying some txt files to the iso and it worked.
Later, i repeated the process, but after mounting root-image.fs to /mnt/root-image-tmp, I tried something like
cp /home/user/folder_with_packages/* /mnt/root-image-tmp/var/cache/pacman/pkg
but I couldn´t copy all the packages because free space wasn't enough...
Offline
If you only want to added files on /var/cache/pacman/pkg/ , simply create and squashfs image with these files, then add this image to the iso, and edit aitab.. Thats all.
Offline
Weird.
I'm using the 32-bit image and
$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
...
/dev/loop0 udf 180M 180M 0 100% /mnt/archiso
/dev/loop1 ext4 504M 234M 271M 47% /mnt/root-image-tmp
so there's some free space in there.
Last edited by karol (2012-10-17 22:16:18)
Offline
Yes, initially there's free space, but as I start copying files to the mounted systen, logically the free space decrease.
And because of the available space is determined, in your case 504Mb (don't know why is differente from mine - 701M), I can't copy anymore files when it gets full....
What I want to do is increase the available space for it to be enough to my needs, if I require more than 700M, I supose the iso can be burned in to a DVD....
Offline
hello, do you read my post?
Offline
Sorry, I just read your answer, but right now I don't know how should I "edit aitab", it'll be very useful for me if you can give me more info about your solution...
Gracias...
Offline
Sorry, I just read your answer, but right now I don't know how should I "edit aitab", it'll be very useful for me if you can give me more info about your solution...
Gracias...
Not sure what info do you need: https://wiki.archlinux.org/index.php/Archiso#aitab
Can you find the file in question?
Offline
mkdir /tmp/new_iso
cd /tmp/new_iso
bsdtar -x -f ~/archlinux-2012.10.06-dual.iso
echo "var-cache-pacman-pkg /var/cache/pacman/pkg any xz none 0" >> arch/aitab
mksquashfs </PATH/TO/PACKAGE/DIR> arch/any/var-cache-pacman-pkg.sfs -noappend -comp xz
xorriso -as mkisofs \
-iso-level 3 \
-full-iso9660-filenames \
-volid "ARCH_201210" \
-appid "Arch Linux Live/Rescue CD" \
-publisher "Arch Linux <http://www.archlinux.org>" \
-preparer "prepared by mkarchiso" \
-eltorito-boot isolinux/isolinux.bin \
-eltorito-catalog isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
--efi-boot EFI/archiso/efiboot.img \
-isohybrid-mbr /tmp/new_iso/isolinux/isohdpfx.bin \
-output "/tmp/archlinux-2012.10.06-dual-remastered.iso" \
/tmp/new_iso
Por nada
Last edited by djgera (2012-10-18 00:01:23)
Offline
lenieco wrote:Sorry, I just read your answer, but right now I don't know how should I "edit aitab", it'll be very useful for me if you can give me more info about your solution...
Gracias...
Not sure what info do you need: https://wiki.archlinux.org/index.php/Archiso#aitab
Can you find the file in question?
yes, but i'm not sure about this field:
<sfs_comp>
SquashFS compression type { gzip | lzo | xz }. A special value of "none" denotes no usage of SquashFS.
how can I know it?
Should I make the squashfs image with something like this?
mksquashfs /home/user/folder_with_packages cache.fs.sfs
Offline
(updated wiki was out-of-date)
Always up-to-date docs is at https://projects.archlinux.org/archiso. … ADME.build
Clarification:
<img>, <mnt>, <arch>, <fs_type> => build time options (mkarchiso) AND runtime options (archiso hook)
<sfs_comp>, <fs_size> => build time options (mkarchiso), ignored at runtime (archiso hook)
Last edited by djgera (2012-10-17 23:33:39)
Offline
PS: should note that in this simple way, /var/cache/pacman/pkg will be read-only. If you want read-write location, should first create an img.fs then compress it with squashfs
Offline
PS: should note that in this simple way, /var/cache/pacman/pkg will be read-only. If you want read-write location, should first create an img.fs then compress it with squashfs
In this case, the fact that this be a read-only location it means that anything can be written to /var/cache/pacman/pkg in the iso.... am I right?
if so, there's no problem because it isn´t supposed to be written during the distro's installation.
But if i need to have a read-write location, should I make this image using something like dd and mkfs? Could you tell me how?....
Gracias por tu ayuda.
Offline
Well in the ISO is not posible, at all, I guess you want to say during runtime...
More steps but simple...
echo "var-cache-pacman-pkg /var/cache/pacman/pkg any xz ext4 0" >> arch/aitab
truncate -s <SIZE>M arch/any/var-cache-pacman-pkg.fs
mkfs.ext4 -O ^has_journal -m 0 -F arch/any/var-cache-pacman-pkg.fs
tune2fs -c 0 -i 0 arch/any/var-cache-pacman-pkg.fs
mkdir arch/any/var-cache-pacman-pkg
mount arch/any/var-cache-pacman-pkg.fs arch/any/var-cache-pacman-pkg
cp -aT </PATH/TO/PACKAGE/DIR>/ arch/any/var-cache-pacman-pkg/
umount arch/any/var-cache-pacman-pkg
rmdir arch/any/var-cache-pacman-pkg
mksquashfs arch/any/var-cache-pacman-pkg.fs arch/any/var-cache-pacman-pkg.fs.sfs -noappend -comp xz
rm arch/any/var-cache-pacman-pkg.fs
Where <SIZE> should be a at least 10% more of "du -sm </PATH/TO/PACKAGE/DIR>", (because filesystem overhead) + your desired free space. This is just an estimation.
Note that last field in aitab is 0, but as said before does not care for runtime purposes.
Last edited by djgera (2012-10-18 00:25:21)
Offline
Well in the ISO is not posible, at all, I guess you want to say during runtime...
More steps but simple...
echo "var-cache-pacman-pkg /var/cache/pacman/pkg any xz ext4 0" >> arch/aitab truncate -s <SIZE>M arch/any/var-cache-pacman-pkg.fs mkfs.ext4 -O ^has_journal -m 0 -F arch/any/var-cache-pacman-pkg.fs tune2fs -c 0 -i 0 arch/any/var-cache-pacman-pkg.fs mkdir arch/any/var-cache-pacman-pkg mount arch/any/var-cache-pacman-pkg.fs arch/any/var-cache-pacman-pkg cp -aT </PATH/TO/PACKAGE/DIR>/ arch/any/var-cache-pacman-pkg/ umount arch/any/var-cache-pacman-pkg rmdir arch/any/var-cache-pacman-pkg mksquashfs arch/any/var-cache-pacman-pkg.fs arch/any/var-cache-pacman-pkg.fs.sfs -noappend -comp xz rm arch/any/var-cache-pacman-pkg.fs
Where <SIZE> should be a at least 10% more of "du -sm </PATH/TO/PACKAGE/DIR>", (because filesystem overhead) + your desired free space. This is just an estimation.
Note that last field in aitab is 0, but as said before does not care for runtime purposes.
Ok man. You are great.
Muchas gracias... suerte....
Offline
Genial, por nada.
Please mark this as [SOLVED]
Offline