[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building root filesystem instructions using debootstrap



On Mon, 2005-01-31 at 10:33 -0600, Quantum Scientific wrote:
> than once)  Whatever... they're volunteers, and don't have to care whether 
> anyone uses the project or not.  So why do they do a project in the first 
> place, wasting others' time?

I believe that everyone cares about people using the project.
Unfortunately for newbies, the project is under development, hence the
lack of documentation and/or aged docs. Fortunately, there is now a wiki
for all things documentation. This is a great avenue for frustrated and
proud developers to shout (brag) "Hey, I figured out how to use emDebian
for my project, here's how I did it!" That's the spirit of a collective
volunteer project.

No one sets out to intentionally waste someone else's time.
Documentation is always the last item on the todo list. If you're
frustrated with emDebian, wait a while. The work being done here is
ambitious, complicated and time-consuming. In the mean time, I'd suggest
using debootstrap, a self-compiled kernel and grub-install to make your
x86 compact flash parts. I'm not just going to give you the short
reference answer or RTFM. I'm going to take an hour out of my busy
Monday morning to help you and others get started using Debian on
embedded x86 systems. Eventually, emDebian will perform a similar
operation. Until then, use a 256M flash part ($20 newegg.com) and the
instructions below.

WARNING: If you don't understand any of these commands please read and
completely understand their use prior to execution. These commands will
render your workstation unusable very quickly if executed with incorrect
command line parameters. RECOMMENDATION: Build a root filesystem
development machine from an old computer that is NOT your primary
desktop. Chances are, at some point, you'll incorrectly execute a
command and cause a tremendous mess. Take it from my experience, this
will happen. An old laptop is perfect for creating bootable compact
flash parts. 


OK, let's get started. On your newly created root filesystem development
machine, log in as root.

dmesg # look for your CF part, mine is hde
cfdisk /dev/hde #delete all, make a partition, set bootable, write, exit
mkfs.ext3 /dev/hde1
mkdir /mnt/cf
mount /dev/hde1 /mnt/cf

debootstrap sarge /mnt/cf # edit /usr/lib/debootstrap/scripts/sarge 
                          # to remove unwanted packages, like man
                          # cdebootstrap also exists in testing

sync
du -sh /mnt/cf

cd /usr/src/linux
make bzImage
cp /usr/src/linux/arch/i386/boot/bzImage /mnt/cf/boot

grub-install --no-floppy --recheck --root-directory=/mnt/cf /dev/hde

cat > /mnt/cf/boot/grub/menu.lst << endofinput
default 0
timeout 1
root (hd0,0)

#serial --unit=1 --speed=115200
#terminal --timeout=0 serial
#hiddenmenu
#add console=ttyS1,115200 to kernel line below for serial console

title 2.4.27
    kernel /boot/bzImage root=/dev/hda1 ro hda=flash hdb=none hdc=none
hdd=none hde=none hdf=none hdg=none hdh=none hdi=none hdj=none hdk=none 
hdl=none 
endofinput

# edit /mnt/cf/etc/inittab to enable or disable the proper getty(s)
# edit /mnt/cf/etc/securetty to enable root logins on serial port or
# echo "ttyS1" >> /mnt/cf/etc/securetty

sync

umount /dev/hde1

Boot your board.


Hope this helps and thanks for your time,
Craig



-- 
------------------------------------------------------------
Dr. Craig Hollabaugh, craig@hollabaugh.com, 970 325 0509
Author of Embedded Linux: Hardware, Software and Interfacing
www.embeddedlinuxinterfacing.com



Reply to: