[pocket-linux] Chapter 3: RAMdisk: Incomplete write
David Horton
dhorton at speakeasy.net
Wed May 12 08:58:12 CDT 2004
The 'export CC="gcc -mcpu=i386"' tells the C compiler to generate code that will run on a 386 processor. That way you can build a program on a fast 686 machine and still run it on an old box. If you run a program on the same box you build it on then it should not matter if 'export CC="gcc -mcpu=i386"' is used or not.
Dave
> -----Original Message-----
> From: nrh2 at aber.ac.uk [mailto:nrh2 at aber.ac.uk]
> Sent: Wednesday, May 12, 2004 10:51 AM
> To: 'Support for Pocket Linux Guide'
> Subject: Re: [pocket-linux] Chapter 3: RAMdisk: Incomplete write
>
> Hi
> Just read through your script, although i havent done pocket linux in
> a few months everything looks o.k to me, tho just nitpicking, why
> havent you included the following line from the 2.1 book
>
> export CC="gcc -mcpu=i386"
>
> not sure, but that could possibly be your error?
>
> (made stupid error similary myself)
>
> Nathan
>
> > Hi, some more info
> >
> > If I use the image disk for ROOT, I am able to start up.
> > So I am pretty sure that the error must be somewhere in the root disk
> >
> > Here is the script I am using to make the root disk. I am running it
> > as root
> > I hope somebody sees the mistake
> >
> > ##############START#############
> > #!/bin/sh
> >
> > MPF=/media/floppy
> > MPR=/media/ramDisk
> > DBF=/home/bettes/Documents/bash-2.05a
> > LastPWD=$PWD
> >
> >
> > #Format Ramdisk on ram7
> > echo "Format RamDisk"
> > echo "*************"
> > umount /dev/ram7
> > dd if=/dev/zero of=/dev/ram7 bs=1k count=4096
> > mke2fs -m0 /dev/ram7
> > mount /dev/ram7 /media/ramDisk
> >
> > #Compiling sources
> > echo "Compiling Sources"
> > echo "********************"
> > cd $DBF
> > make distclean
> > ./configure --enable-minimal-config --host=i386-pc-linux-gnu
> > make
> > strip bash
> >
> > cd $LastPWD
> >
> > #create all directories on the ramDisk
> > echo "Creating Directories"
> > echo "********************"
> > mkdir $MPR/bin
> > mkdir $MPR/dev
> > mkdir $MPR/lib
> >
> > #make the devices in dev
> > echo "Creating Devices"
> > echo "****************"
> > mknod $MPR/dev/console c 5 1
> >
> > #copying the files
> > echo "Copying Files"
> > echo "*************"
> > cp $DBF/bash $MPR/bin/
> >
> > cd $MPR/bin
> > ln -s bash sh
> > cd $LastPWD
> >
> > strip --strip-unneeded -o $MPR/lib/libdl.so.2 /lib/libdl.so.2
> > strip --strip-unneeded -o $MPR/lib/libc.so.6 /lib/libc.so.6
> > strip --strip-unneeded -o $MPR/lib/ld-linux.so.2 /lib/ld-linux.so.2
> >
> > #Setting file permissions
> > chmod 744 $MPR/lib/*
> >
> > #create image of ramDisk
> > echo "Make RamDisk Image"
> > echo "******************"
> > umount /dev/ram7
> > dd if=/dev/ram7 of=./root_ch3_image bs=1k
> >
> > rm ./root_ch3_image.gz
> > gzip -9 ./root_ch3_image
> >
> > #Format floppy
> > echo "Copy Image to floppy"
> > echo "********************"
> > umount /dev/fd0
> > dd if=./root_ch3_image.gz of=/dev/fd0 bs=1k
> >
> > #############END##############
> >
> > On Friday 30 April 2004 17:21, Bart wrote:
> >> Hi,
> >>
> >> I survived chapter 2 and moved to chapter 3.
> >> I am compiling kernel 2.6.XX and using GRUB as a loader
> >>
> >> Now I am having a strange problem
> >> After the bootdisk has been loaded I get
> >>
> >> > VFS: Insert root floppy disk to be loaded into RAM disk and press
> >> ENTER
> >>
> >> I do that and the next messages are
> >>
> >> >RAMDISK: Compressed image found at block 0
> >> >RAMDISK: Incomplete write (-28 != 32768) 4194304
> >> >VFS: Insert root floppy and press ENTER
> >>
> >> Then I press enter and i got
> >>
> >> >Kernel panic: VFS: Unable to mount root on fd0
> >>
> >> I don't see the mistake. :-(
> >>
> >>
> >> Bettes
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Pocket-Linux mailing list
> >> Pocket-Linux at ufo.chicago.il.us
> >> http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux
> >
> >
> > _______________________________________________
> > Pocket-Linux mailing list
> > Pocket-Linux at ufo.chicago.il.us
> > http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux
> >
>
>
> _______________________________________________
> Pocket-Linux mailing list
> Pocket-Linux at ufo.chicago.il.us
> http://ufo.chicago.il.us/cgi-bin/mailman/listinfo/pocket-linux
>
More information about the Pocket-Linux
mailing list