All Forums
 Embedded Linux
 Linux FAQ
 How can I run Full Debian without a Microdrive
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

rwhaley

628 Posts

Posted - 17 Jun 2004 :  14:06:51  Show Profile  Email Poster
How can I run Full Debian without a Microdrive?


Warning: this topic is out-of-date for newer boards. See post below for link to newer information.



If you are running 2.4.26-vrs1-pxa1-adsx1 or later, there are at least two convenient ways to run Debian without a Microdrive: by using either a USB hard drive or an NFS root file system.

USB hard drive. A USB hard drive can be used for a root file system. To do this:

1. Attach the USB hard drive to a PC or other system running Linux

2. Create partitions on the drive. You should create at least two partitions, one for / and another for swapping.

3. Make the file systems for / using the command 'mke2fs -j /dev/sda?' where ? is the partition for /.

4. Mount the new partition on some convenient mount point and untar the root file system found here into the partition.

5. On the new partition edit the file etc/fstab to reflect the swap and root partitions you have chosen

6. Unmount the partition

7. Make the swap partition using the command 'mkswap /dev/sda?' where ? is the swap partition.

8. Put the Linux kernel zImage on a PCMCIA flash card along with a cmdline.txt file like this:
    console=ttyS0,38400 rw root=/dev/sda? noinitrd

    where ? is the partition for /
    note: for BitsyX systems use ttyS1 instead of ttyS0

9. Attach the USB hard drive to your system, insert the PCMCIA flash card into the system and power up.

NFS root file system. An NFS root file system can be used to run full debian. To do this:

1. Work with your system administrator to export an NFS file system with at least 1Gbyte of free space. This file system should be exported with the 'no_root_squash' parameter. Note that 'no_root_squash' raises significant security issues that should be discussed with your system administrator.

2. Into this directory untar the root file system.
You can download the most recent root filesystem tarball from here .

3. In this directory edit the file etc/fstab to remove the swap entry and to add an entry for the nfs mounted root partition. This might look something like this:
    192.168.1.34:/home/debian_root / nfs

4. Put the Linux kernel zImage on a PCMCIA flash card along with a cmdline.txt file like this:
    console=ttyS0,38400 rw root=/dev/nfs nfsroot=192.168.1.34:/home/debian_root ip=dhcp

    note: for BitsyX systems use ttyS1 instead of ttyS0

5. Insert the PCMCIA flash card into your board, attach the ethernet cable and boot your system.

jmalone

61 Posts

Posted - 02 Jul 2004 :  09:21:07  Show Profile  Email Poster
In some cases, it's been found that using a USB hard drive will fail to boot because the USB drive isn't ready to be used by the time the kernel attempts to mount its root filesystem. The symptoms are that the kernel doesn't detect any partitions on the USB drive and then panics attempting to mount the root.

To fix this, you can use the standard initrd found here to give a delay when booting so that the USB drive has enough time to settle and initialize.

Place the initrd on your PCMCIA card (or in your on-board flash) as ramdisk.gz and use a cmdline.txt like this:

console=ttyS0,38400 rw root=/dev/sda? ramdisk_size=3300 initrd=0xA0800000,1200k

where ? is the partition for /
Go to Top of Page

rwhaley

628 Posts

Posted - 04 Aug 2004 :  11:41:37  Show Profile  Email Poster
Starting with 2.4.26_vrs1_pxa1_adsx2, the kernel will retry mounting the root file system. This should allow USB drives to be used for the root file system without need for an initrd.
Go to Top of Page

rwhaley

628 Posts

Posted - 23 Mar 2007 :  11:07:46  Show Profile  Email Poster
This topic was created prior to the u-boot bootloader. Consequently the examples use the old ADS bootloader files like cmdline.txt instead of u-boot files like root_config.txt. See this topic for lots of examples files that work with u-boot.
Go to Top of Page

adrian

17 Posts

Posted - 14 Jan 2008 :  11:32:20  Show Profile  Email Poster
For more recent coverage of this topic, see the Root File Systems.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000