[pocket-linux] Problem Chapter 3: RAMDISK: incomplete write (-28 != 32768) 4194304

David Horton dhorton at speakeasy.net
Wed Oct 20 20:35:18 CDT 2004


Eric Wanchic wrote:
> -----Original Message-----
> From: pocket-linux-bounces at ufo.chicago.il.us
> [mailto:pocket-linux-bounces at ufo.chicago.il.us]On Behalf Of David Horton
> Sent: Wednesday, October 20, 2004 2:21 PM
> To: Support for Pocket Linux Guide
> Subject: Re: [pocket-linux] Problem Chapter 3: RAMDISK: incomplete write
> (-28 != 32768) 4194304
> 
> 
> 
>>>3.3.3 -
>>>  bash# ldd bash
>>>    linux-gate.so.1 => (0xffffe000)
>>>    libdl.so.2 => /lib/libdl.so.2 (0x40034000)
>>>    libc.so.6 => /lib/tls/libc.so.6 (0x40037000)
>>>    /lib/ld-linux.so.2 => /lib/ld-linux/so/2 (0x40000000)
>>>
>>
>>linux-gate.so.1 is something that might be giving you problems.  I have not
> 
> encountered this library >>
> 
>>requirement when building BASH from source.  Is it possible that you copied
> 
> the /bin/bash that came with
> 
>>your distro rather than the one you compiled?  I think somebody else did
> 
> this once and it caused a
> 
>>similar problem.
>>
> 
> 
> I did an Bash# ldd /bin/bash. This is what it looked like:
> 
>    bash# ldd bash
>      linux-gate.so.1 => (0xffffe000)
>      libreadline.so.4 => /lib/libreadline.so.4 (0x40034000)
>      libhistory.so.4 => /lib/libhistory.so.4 (0x40060000)
>      libncurses.so.5 => /lib/libncurses.so.5 (0x40067000)
>      libdl.so.2 => /lib/libdl.so.2 (0x40034000)
>      libc.so.6 => /lib/tls/libc.so.6 (0x40037000)
>      /lib/ld-linux.so.2 => /lib/ld-linux/so/2 (0x40000000)
>

This is odd.  Here is the ldd output for my build of BASH 3.0 that I 
built from source:

thing2:~/staging/bin# ldd bash
         libdl.so.2 => /lib/libdl.so.2 (0x40014000)
         libc.so.6 => /lib/libc.so.6 (0x40018000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I am also surprised to see libncurses as this should not be included 
when using the --enable-minimal-config option.


> 
> Yes, linux-gate.so.1 is a funny file I'm not 100% sure about. Before my
> previous post on this, my websearch showed that it was a "phantom" file. So
> naturally I am igonring it, but maybe I can't. hmm. Is there a way to
> compile bash without it needing to link to linux-gate.so.1?
> 

If you get tired of trying to figure it out and just want a binary of 
BASH you are more than welcome to download precompiled stuff from the 
Architect project.  Go to 
http://www.happy-monkey.net/architect/bin-pkgs/ and get 
bash-mini-2.05a.i386.tar.gz.  It is compiled with the same options as 
Pocket Linux.

> 
>>>3.3.4 -
>>>  ...
>>>  mkdir /mnt/lib/tls
>>>  bash# strip --strip-unneeded -o /mnt/lib/libdl.so.2 /lib/libdl.so.2
>>>
>>>  bash# strip --strip-unneeded -o /mnt/lib/dl-linux.so.2
> 
> /lib/dl-linux.so.2
> 
>>>  bash# strip --strip-unneeded -o /mnt/lib/tls/libc.so.6
> 
> /lib/tls/libc.so.6
> 
>>>  bash# chmod +x /mnt/lib/*
>>>
>>>  bash# chmod +x /mnt/lib/tls/*
>>>
>>>
>>
>>Try putting all the libraries in /mnt/lib and don't create /mnt/lib/tls.
> 
> The dynamic linker, ld-linux,
> 
>>always checks /lib and /usr/lib directories by default.
>>
> 
> 
> Sorry, no go. interestng to note, I did a search on all three of these
> libraries. There was only one instance of each except for libc.so.6. It
> could be found in /lib, /lib/tls, and /lib/i686. Each were different sizes.
> I tried copying the other from /lib, but still no go.
> 
> 

I have the /lib/tls and /lib/i686 directories on my Redhat 9 box.  I 
think it's the same library compiled for different CPU architectures. 
For example, the stuff in /lib/i686 is optimized for Pentium II and higher.

There is also a glibc package precompiled at the same address as I gave 
for the BASH binary.  You can try it out if you like.

>>>------------------------
>>>
>>>I created a new floppy, formatted it, and coppied the image again, no go.
> 
> I
> 
>>>looked at the draft for v.3.0 and entered the grub prompt manually. Still
> 
> no
> 
>>>go.
>>>
>>>Google searching doesn't bring much that I can work with here. Any
>>>suggestions on what to do next? Thanks
>>>
>>>Eric
>>>
>>
>>I think once you fix the library problems it should work fine.
>>
>>Good Luck,
>>Dave
> 
> 
> Sorry, still no go :(
> 
> Other things I tried.
> 3.3.1 -
>   bash# dd if=/dev/zero of=/dev/ram7 bs=1k count=64000 (as opposed to count
> 4096. Why? Every time I exported the image to ~/phase2-image, it would in
> and out 64000. This was also found as a ram disk value under menuconfig for
> kernel 2.6.8.1)
> 

Sorry, I missed the part about the ramdisk proplem earlier.  Try using 
these instructions to create the image.

bash# cd /
bash# dd if=/dev/zero of=/dev/ram7 bs=1k count=4096
bash# mke2fs -m0 /dev/ram7 4096
bash# mount /dev/ram7 /mnt
bash# cp -dpR ~/staging/* /mnt
bash# umount /dev/ram7
bash# dd if=/dev/ram7 of=~/phaseX-image bs=1k count=4096
bash# gzip -9 ~/phaseX-image

The difference is the 'mke2fs -m0 /dev/ram7 4096' command has a 4096 at 
the end which tells mke2fs to stop after 4096 Kbytes and the 'dd 
if=/dev/ram7 of=~/phaseX-image bs=1k count=4096' has been changed to 
tell dd to stop after 4096 Kbytes using count=4096.  These are the new 
instructions for the guide version 3.0 preview.


> Other -
> Tried the RootDisk image for chapter 3. That did work. Is that using bash
> 3.0?

The diskette images are fairly old, so it's still BASH 2.05a.

> 
> I'm braindead tonight. :P Hopfully there'll be other things to try tomarrow.
> Thanks guys.
> 
> 

Good Luck!

Dave



More information about the Pocket-Linux mailing list