OpenWrt Forum Archive

Topic: How to take advantage my hardware resource of x86 with openwrt ?

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

below are part of my x86 resource:
    memory   :   4GB DDR3 1600MHz
    hard disk :   250 GB SATA3

when I runed openwrt on x86 and use commandline tool,such as 'top' and 'df'
to wathch the state of it, I found that the virtual memory is <1GB and the rootfs
total size is 50MB,thus my question is how to use my hardware resource sufficiently?

I make and install my openwrt on x86 follow the below steps like these:
1. make a usb linux system, I use slitaz here.
2. and build the specific image of openwrt for my x86 device.I use xxx-ext4.img here.
    enter make menuconfig-> target image-> ....
    then copy the image file to usb storage.
3. booting my x86 via usb, and use dd tools to write my image.
     3.1   use mkfs.ext4 tools to format whole space of my 250GB hard disk.<!!!!!>
             mkfs.ext4 /dev/sda
     3.2   dd if=/xx/xx-ext4.img of=/dev/sda
4. then my x86 device can run, and I use the 'df' and 'top' to check my device's basic state.
    thus I found that my space available size is only 50MB, and the virtual memory size is <1GB.


PunBB bbcode test

(Last edited by banglang.huang on 22 May 2013, 10:46)

robthebrew wrote:

How have you partitioned the had drive?
Take a look here:
http://wiki.openwrt.org/doc/howto/usb.storage

I think I should explain my target for more detail.

I make and install my openwrt on x86 follow the below steps like these:

1. make a usb linux system, I use slitaz here.

2. and build the specific image of openwrt for my x86 device.I use xxx-ext4.img here.

    enter make menuconfig-> target image-> ....

    then copy the image file to usb storage.

3. booting my x86 via usb, and use dd tools to write my image.

     3.1   use mkfs.ext4 tools to format whole space of my 250GB hard disk.<!!!!!>
             mkfs.ext4 /dev/sda

     3.2   dd if=/xx/xx-ext4.img of=/dev/sda

4. then my x86 device can run, and I use the 'df' and 'top' to check my device's basic state.
    thus I found that my space available size is only 50MB, and the virtual memory size is <1GB.

p1

banglang.huang wrote:

     3.2   dd if=/xx/xx-ext4.img of=/dev/sda

This will cause your /dev/sda to have an exact image of /xx/xx-ext4.img. If the image is 1KB and the /dev/sda ia 1TB, then it will become a 1KB partition, IIRC.

What you want is to mount the /xx/xx-ext4.img some where and then use cp utility to copy all the files on the mounted partition to your /dev/sdaX (where X is the partition of your sda device).

mazilo wrote:
banglang.huang wrote:

     3.2   dd if=/xx/xx-ext4.img of=/dev/sda

This will cause your /dev/sda to have an exact image of /xx/xx-ext4.img. If the image is 1KB and the /dev/sda ia 1TB, then it will become a 1KB partition, IIRC.

What you want is to mount the /xx/xx-ext4.img some where and then use cp utility to copy all the files on the mounted partition to your /dev/sdaX (where X is the partition of your sda device).

may be there exist other better solution.

here is my screen shot .
P3

I hope so.

mazilo wrote:

I hope so.

I want to use the rest of hard-disk spare space,and enlarge my tmpfs partition.

(Last edited by banglang.huang on 22 May 2013, 02:45)

mazilo wrote:
banglang.huang wrote:

     3.2   dd if=/xx/xx-ext4.img of=/dev/sda

This will cause your /dev/sda to have an exact image of /xx/xx-ext4.img. If the image is 1KB and the /dev/sda ia 1TB, then it will become a 1KB partition, IIRC.

What you want is to mount the /xx/xx-ext4.img some where and then use cp utility to copy all the files on the mounted partition to your /dev/sdaX (where X is the partition of your sda device).


please have a look at the topic picture, I upload it in recent.

robthebrew wrote:

How have you partitioned the had drive?
Take a look here:
http://wiki.openwrt.org/doc/howto/usb.storage

please have a look at the topic picture, I upload it in recent.

I have the same question as banglang.huang.  Already solved ? PLS let me know ,thanks.

One solution is do as mazilo says and cp the files over.
Another is to create a partition of the same size as the img file you want to dd on to it. That will leave another partition for other use.

robthebrew wrote:

One solution is do as mazilo says and cp the files over.
Another is to create a partition of the same size as the img file you want to dd on to it. That will leave another partition for other use.

OK , I have made a better solution, just format the reset space( as ext4 or jffs2) and mount it when the system boot.

robthebrew wrote:

One solution is do as mazilo says and cp the files over.
Another is to create a partition of the same size as the img file you want to dd on to it. That will leave another partition for other use.


Hi robthebrew,

        I used "top" tool to check my physic memory usage, but found that , the totoal size is only more than 1GBytes while it is running with a 4GBytes DDR3 memory. Is the linux using the default value ? I want to enlarge the totoal physic memory show in the "top" menu. how can I make it?

The discussion might have continued from here.