Skip to main content.
Navigation:
DENX
>
DULG
>
ELDKInstallationOnLocalHarddisk
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=ELDKInstallationOnLocalHarddisk }% Installation on Local Harddisk Question:: I have a local harddisk drive connected to my target board. Can I install the ELDK on it and run it like a standard Linux distribution? Answer:: Yes, this is possible. It requires only minor adjustments. The following example assumes you are using a SCSI disk drive, but the same can be done with standard SATA or PATA drives, too: 1 Boot the target with root file system over NFS. 1 Create the necessary partitions on your disk drive: you need at last a swap partition and a file system partition. <verbatim> bash-3.00# fdisk -l Disk /dev/sda: 36.9 GB, 36951490048 bytes 64 heads, 32 sectors/track, 35239 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sda1 1 978 1001456 82 Linux swap / Solaris /dev/sda2 979 12423 11719680 83 Linux /dev/sda3 12424 23868 11719680 83 Linux /dev/sda4 23869 35239 11643904 83 Linux </verbatim> 1 Format the partititons: <verbatim> bash-3.00# mkswap /dev/sda1 bash-3.00# mke2fs -j -m1 /dev/sda2 </verbatim> 1 Mount the file system: <verbatim> bash-3.00# mount /dev/sda2 /mnt </verbatim> 1 Copy the content of the (NFS) root file system into the mounted file system: <verbatim> bash-3.00# tar --one-file-system -c -f - / | ( cd /mnt ; tar xpf - ) </verbatim> 1 Adjust ==/etc/fstab== for the disk file system: <verbatim> bash-3.00# vi /mnt/etc/fstab bash-3.00# cat /mnt/etc/fstab /dev/sda2 / ext3 defaults 1 1 /dev/sda1 swap swap defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 </verbatim> 1 Adjust ==/etc/rc.sysinit== for running from local disk; remove the following comments: <verbatim> bash-3.00# diff -u /mnt/etc/rc.sysinit.ORIG /mnt/etc/rc.sysinit --- /mnt/etc/rc.sysinit.ORIG 2007-01-21 04:37:00.000000000 +0100 +++ /mnt/etc/rc.sysinit 2007-03-02 10:58:22.000000000 +0100 @@ -460,9 +460,9 @@ # Remount the root filesystem read-write. update_boot_stage RCmountfs -#state=`LC_ALL=C awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts` -#[ "$state" != "rw" -a "$READONLY" != "yes" ] && \ -# action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw / +state=`LC_ALL=C awk '/ \/ / && ($3 !~ /rootfs/) { print $4 }' /proc/mounts` +[ "$state" != "rw" -a "$READONLY" != "yes" ] && \ + action $"Remounting root filesystem in read-write mode: " mount -n -o remount,rw / # Clean up SELinux labels if [ -n "$SELINUX" ]; then </verbatim> 1 Unmount disk: <verbatim> bash-3.00# umount /mnt </verbatim> 1 Reboot, and adjust boot arguments to use disk partition as root file system <verbatim> => setenv diskargs setenv bootargs root=/dev/sda2 ro => setenv net_disk 'tftp ${loadaddr} ${bootfile};run diskargs addip addcons;bootm' => saveenv </verbatim> 1 Boot with these settings <verbatim> => run net_disk </verbatim>
14.1.3. .gvfs: Permission Denied
1. Abstract
14.1.5. System Include Files Missing
Prev
Home
Next