# 32 bit diskless node with 64 bit server [Solved]

## feynman

Yesterday I finally got an old computer to pxe boot after months of trying to learn how (that gentoo diskless boot guide is more self consistent and updated than all the ubuntu diskless boot guides put together!) Well, almost. I have the kernel hanging at 

Switching to clocksource tsc

After 5 lines of

request_module: runaway loop modprobe binfmt-464c

After doing some research, and some failed attempts to disable time stamp counting in the kernel, I concluded that the problem was the modprobe lines--which I read meant that the modules were built for 64 bit computers. I tried chrooting into my clients root directory, but I got "/bin/bash" no such file or directory. There is such a file or directory. I can run /node/192.168.1.2/bin/bash just fine! Anyway, I am guessing this is because I did not do one of those make2fs things that turn it into a "block device." 

So then what are my options? Should I install the 32 bit gentoo system on another hard drive/partition and copy it over? It seems like there should be a more direct way.

Any ideas?Last edited by feynman on Wed Nov 30, 2011 8:16 pm; edited 2 times in total

----------

## Hu

You can get that bogus "No such file or directory" when the program to be run specifies a dynamic loader that is not present.  This can happen when you try to mix 32 bit and 64 bit environments improperly.  To be sure that we understand the situation:The diskless node can only run 32-bit code.

You built a 32-bit kernel for it.

You pointed it to a 64-bit user environment.Is this accurate?  What is the output of emerge --info ; file /node/192.168.1.2/bin/bash?

This has nothing to do with filesystem setup.

----------

## feynman

 *Quote:*   

> To be sure that we understand the situation:
> 
> The diskless node can only run 32-bit code. 
> 
> You built a 32-bit kernel for it. 
> ...

 

Yes, yes, and yes.

I will post the output of 

```
emerge --info ; file /node/192.168.1.2/bin/bash
```

But it will probably not be for another 10 hours or so. I have a long day today, and my desktop is not accessible at the moment.

----------

## feynman

emerge --info ; file /node/192.168.1.2/bin/bash give me:

```

Portage 2.1.10.11 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6-gentoo x86_64) ================================================================= System uname: Linux-3.0.6-gentoo-x86_64-AMD_Athlon-tm-_5200_Dual-Core_Processor-with-gentoo-2.0.3 Timestamp of tree: Sun, 27 Nov 2011 22:00:01 +0000 app-shells/bash: 4.1_p9 dev-lang/python: 2.7.2-r3, 3.1.4-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.12.2 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 3dnowprefetch abm amd64 apic atlas blas clflush cmov cmp_legacy constant_tsc cr8_legacy cx16 cx8 de extapic extd_apicid fftw fpu fxsr fxsr_opt gpm gsl ht ibs lahf_lm lapack lbrv lm mca mce misalignsse mmx mmxext monitor mpi msr mtrr multilib ncurses nonstop_tsc nopl npt nrip_save nx osvw pae pam pat pdpe1gb pge pni popcnt pse pse36 python rdtscp rep_good sep skinit sse sse2 sse4a svm svm_lock symlink syscall tcpd tsc vme wdt" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS /node/192.168.1.2/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

```

I would love to know what exactly you are looking for in that.

----------

## Hu

I wanted confirmation that you had a 64 bit user environment.  I now have that confirmation.  You must use a 32 bit user environment if you use a 32 bit kernel.  Since you have a working Gentoo system with IA32 emulation, you can install a 32 bit chroot directly.  Pick a filesystem which has enough space for the 32 bit environment.  Make a new directory.  Treat that directory the same way that the Gentoo handbook treats /mnt/gentoo.  Skip over the handbook steps relating to making partitions and filesystems.

----------

## feynman

 *Quote:*   

> Treat that directory the same way that the Gentoo handbook treats /mnt/gentoo. Skip over the handbook steps relating to making partitions and filesystems.

 

Huh...Why had that not occurred to me before? Anyway, I still want to clarify:

I take it the current directory /node/192.168.1.2 will do? 

I take it when you say leave out the part about making the file systems you mean to skip the make2fs part

If so, then why exactly? If I am making a new partition, should I not have to do the make2fs step like I did in when making the root file system of the server. Forgive me if I missed a good resource, but I had trouble understanding what exactly make2fs did. I take it that allocating the memory in the master boot record (the fstab if I am not mistaken) just told the computer where to look for the files, and the make2fs actually formated that portion of the memory. A friend told me that it had something to do with making the necessary header files for a filesystem. That was enough of an explanation for me to node my head in acceptance, but neither him nor I truly understood what this entailed.

So anyway, what does this do and why is/not necessary to do so in this case?

Again, if I am missing some obvious "low level linux stuff for n00bs" tutorial please send me a link so I am not wasting anyone's time.

Thanks.

----------

## Hu

 *feynman wrote:*   

>  *Quote:*   Treat that directory the same way that the Gentoo handbook treats /mnt/gentoo. Skip over the handbook steps relating to making partitions and filesystems. 
> 
> Huh...Why had that not occurred to me before? Anyway, I still want to clarify:
> 
> I take it the current directory /node/192.168.1.2 will do? 

 Yes, but you will need to clear out all the 64 bit code in that directory before you begin.  If you have the space, I suggest moving that directory aside so that you can refer back to any useful configuration files it may have.  You can remove it when you are satisfied that you do not need any further information from it.

 *feynman wrote:*   

> I take it when you say leave out the part about making the file systems you mean to skip the make2fs part
> 
> If so, then why exactly? If I am making a new partition, should I not have to do the make2fs step like I did in when making the root file system of the server.

 

Yes, skip the mke2fs step.  You do not have a new partition, so there is no place to put the new filesystem.  I assumed for simplicity that all your diskless roots will be in /node and that you have already formatted /node appropriately.  If you want to have a separate partition just for the diskless roots, then you can make one in some otherwise free space and create a filesystem there.

 *feynman wrote:*   

> Forgive me if I missed a good resource, but I had trouble understanding what exactly make2fs did. I take it that allocating the memory in the master boot record (the fstab if I am not mistaken) just told the computer where to look for the files, and the make2fs actually formated that portion of the memory. A friend told me that it had something to do with making the necessary header files for a filesystem. That was enough of an explanation for me to node my head in acceptance, but neither him nor I truly understood what this entailed.
> 
> So anyway, what does this do and why is/not necessary to do so in this case?

 That is a very rough approximation.  You may find Wikipedia: MBR useful.  In short, the MBR doubles as the partition table for the first four partitions.  Those partitions each specify a (start,length) pair.  Data written into a partition needs to be organized if you want to get it back later.  Filesystems, such as

ext2/ext3/ext4/xfs can provide that organization.  Once you have created a partition to define where data goes, you create a filesystem to define how the data is stored.  Then, you mount that filesystem so that you can use common tools to place files into the new filesystem.

By listing devices and mountpoints in /etc/fstab, you provide a way for the system to automatically mount your filesystems in their usual places at boot.  Without that, you would need to drop into a rescue shell and do the mount, mount, chroot sequence on every boot.

----------

