Specifications
$ df -h /home/wd/.gvfs
Filesystem Size Used Avail Use% Mounted on
gvfs-fuse-daemon 0 0 0 - /home/wd/.gvfs
$ sudo df -h /home/wd/.gvfs
df: `/home/wd/.gvfs': Permission denied
df: no file systems processed
14.1.4. 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:
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.
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
2.
Format the partititons:
bash-3.00# mkswap /dev/sda1
bash-3.00# mke2fs -j -m1 /dev/sda2
3.
Mount the file system:
bash-3.00# mount /dev/sda2 /mnt
4.
Copy the content of the (NFS) root file system into the mounted file system:
bash-3.00# tar --one-file-system -c -f - / | ( cd /mnt ; tar xpf - )
5.
Adjust /etc/fstab for the disk file system:
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
6.
Adjust /etc/rc.sysinit for running from local disk; remove the following comments:
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`
7.
14.1.4. Installation on Local Harddisk 153