You are not logged in.
Problem: I am getting an error:
chroot: failed to run command ‘/bin/bash’: Exec format error
while attempting to follow wiki topic "Remastering the Install ISO"
My environment is i686 packages on fully updated Arch Linux install.
My arch iso is from here http://mirrors.gigenet.com/archlinux/is … 1-dual.iso
The context of the error is precisely as follows, at the end:
# mkdir /mnt/archiso
# mount -t iso9660 -o loop /home/steve/Downloads/archlinux-2015.03.01-dual.iso /mnt/archiso
mount: /dev/loop0 is write-protected, mounting read-only
$ cd ~
$ mkdir customiso
$ cp -a /mnt/archiso/ ./customiso
$ cd customiso/archiso/arch/x86_64/
$ unsquashfs airootfs.sfs
Parallel unsquashfs: Using 2 processors
1 inodes (262144 blocks) to write
[=============================================================================================|] 262144/262144 100%
created 1 files
created 1 directories
created 0 symlinks
created 0 devices
created 0 fifos
# cd /home/steve/customiso/archiso/arch/x86_64/
# mount -o loop squashfs-root/airootfs.img mnt
# mount -o loop squashfs-root/airootfs.img mnt
# arch-chroot mnt /bin/bash
chroot: failed to run command ‘/bin/bash’: Exec format error
FYI, I have read this info https://wiki.archlinux.org/index.php/Ch … rch-chroot
Plus, I use chroot on every install without this trouble.
Does this error have anything to do with setarch? Here is what I tried:
setarch i686 arch-chroot mnt /bin/bash
chroot: failed to run command ‘/bin/bash’: Exec format error
# setarch x86_64 arch-chroot mnt /bin/bash
setarch: x86_64: Unrecognized architecture
I verified bash is at /bin/bash
The wiki article directories appear to vary slightly from the downloaded iso, but I adjusted to them, I hope, correctly.
Is it even possible to follow the wiki section "Modifying the X86_64 system" on a i686 install?
I hope I have not overlooked something simple.
Any pointers or tips appreciated as always.
Steve.
Last edited by stevepa (2015-03-15 01:31:20)
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline
I believe you need to boot into an i686 install to chroot into an i686 system.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I believe you need to boot into an i686 install to chroot into an i686 system.
No, this isn't true. You can use linux32 to emulate an i686 environment from x86_64. You can't do the reverse however (chroot into x86_64 from i686) which is what the OP is attempting.
Last edited by falconindy (2015-03-13 23:00:14)
Offline
Thank you Mr. Falcon. That was my suspicion.
I did not see that proviso on the wiki page but maybe it was common sense.
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline
Oh, so it is Mr Falcon now?
Offline
Thank you Mr. Falcon. That was my suspicion.
I did not see that proviso on the wiki page but maybe it was common sense.
It does say
Requirements:
Matching architecture environments; i.e. the chroot from and chroot to. The architecture of the current environment can be discovered with: uname -m (e.g. i686 or x86_64).
Offline
See the note: https://wiki.archlinux.org/index.php/Ch … ing_chroot
Offline
If I may update my experience about archiso.
First, I love it! Thanks to those who created or maintain archiso.
As my first foray, I just added the package 'vim-minimal' to packages.both and ran the build script (because I dislike nano).
After about 10 minutes, it quit, and I burned the image to a flash drive, booted it, and vim was in the live system.
Kind of gives a beginner a taste of creating an Arch Linux install 'spin'. Granted, a hardly improved spin.
Update 2: Just thought I would add some build times on a modern laptops
Lenovo Thinkpad T440p i5 4GB SSD profile=releng
time ./build.sh -v
[mkarchiso] INFO: Done! | 611M out/archlinux-2015.03.14-dual.iso
real 6m38.869s
user 12m38.920s
sys 0m48.213s
Lenovo X220 i5 8GB SSD profile=baseline
time ./build.sh -v
[mkarchiso] INFO: Done! | 223M out/archlinux-2015.03.14-x86_64.iso
real 2m10.040s
user 4m53.380s
sys 0m26.313s
Lenovo X220 i5 8GB SSD profile=releng (stock)
[mkarchiso] INFO: Done! | 595M out/archlinux-2015.03.14-dual.iso
real 7m37.280s
user 14m21.257s
sys 1m8.783s
Last edited by stevepa (2015-03-15 04:09:17)
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline
stevepa wrote:Thank you Mr. Falcon. That was my suspicion.
I did not see that proviso on the wiki page but maybe it was common sense.
It does say
Requirements:
Matching architecture environments; i.e. the chroot from and chroot to. The architecture of the current environment can be discovered with: uname -m (e.g. i686 or x86_64).
You are absolutely right! My bad.
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline
On the wiki https://wiki.archlinux.org/index.php/Ta … not_enough
Regarding "Rebuilding the iso...not enough"
I can confirm this is correct.
The error I get is
[mkarchiso] INFO: Configuration settings
[mkarchiso] INFO: Command: run
[mkarchiso] INFO: Architecture: i686
[mkarchiso] INFO: Working directory: work/i686
[mkarchiso] INFO: Installation directory: arch
[mkarchiso] INFO: Run command: /root/customize_airootfs.sh
Generating locales...
en_US.UTF-8... done
Generation complete.
usermod: no changes
useradd: user 'arch' already exists
Will look for a solution.
Tks
Last edited by stevepa (2015-03-14 04:09:05)
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline