I have to create a new filesystem /dev/hda and mount it on /writable in openwrt, may i know where to change the code, am new to openwrt please help on this.
currently in my openwrt i have only
Filesystem Size Used Available Use% Mounted on
/dev/root 102.4M 32.7M 67.6M 33% /
tmpfs 4.0M 1.9M 2.1M 47% /tmp
/dev/sda1 15.7M 4.9M 10.5M 32% /boot
/dev/sda1 15.7M 4.9M 10.5M 32% /boot
tmpfs 512.0K 0 512.0K 0% /dev
faser
August 25, 2022, 6:29am
2
What is the filesystem of the disk? Or you are asking how to format a disk?
For mounting suggest to read up on https://openwrt.org/docs/techref/block_mount
Hi faser thanks for your reply.
i have downloaded the latest openwrt code and add few of my application and compiled,
am installing that image in virtual machine. for me filesystem /dev/hda4 as to mount on /writable
For eg:
/dev/hda4 400.0M 32.3M 367.7M 8% /writable
Actually am replacing buildroot with openwrt,
Hi faser,
i need to do a code change in such a way that after installing openwrt on my virtual machine the o/p of df -h command will be
df -h
Filesystem Size Used Available Use% Mounted on
/dev/hda2 141.6M 117.1M 17.5M 87% /
/dev/hda1 38.7M 749.0K 36.0M 2% /boot
/dev/hda4 400.0M 32.3M 367.7M 8% /writable
/dev/hda4 400.0M 32.3M 367.7M 8% /writable/data/webs-certs/cert.pem
/dev/hda4 400.0M 32.3M 367.7M 8% /writable/data/webs-certs/key.pem
if you're using x86, why not simply extend the main partition ?
and why would you mount the same disk three times, in the same spot ?
faser
August 25, 2022, 9:31am
6
All information to do so are in the documentation I linked above.
Assume i need to create just .
/dev/hda4 400.0M 32.3M 367.7M 8% /writable
can you please explain briefly what code changes need to do in openwrt
what code changes ?
it's mounted, what do you need ?
and did you read the previously provided link ?
yes /etc/fstab configuration need to a change which consists of below.
filesystem mountpoint type options dump pass
not sure what and all arguments need to paa here
frollic
August 25, 2022, 10:30am
10
googled man fstab ?
if you're lazy, add the mount command to the local startup script,
then you don't need to figure out the fstab syntax.
there's probably a luci addon for doing it, too,
1 Like
Thanks frollic for help , adding mount command in rc.local file will do the job for me right ?
Mounting Block Devices This pages discuses the advanced details and underlying operation. For general usage, see fstab. Overview The mounting of block devices is handled by the block-mount source package, which contains the block-mount and...
Install blockd
. Execute block detect
. Copy UCI section matching /dev/hda4
. Add it to the /etc/config/fstab
. Set enabled
to 1
.
Pico
August 27, 2022, 6:24pm
15
there is also an installable LuCi GUI blade for managing fstab/mount points (I cant remember the package name)