Expanding rootfs

I've installed OpenWrt x86 on a laptop with a 60GB disk. It has two partitions, one of which I expanded to 58GB from the original installation but I don't have any space on which to install packages. How do I make use of the free space on the second partition?

The 'easiest' way would be to use the buildroot to build the image yourself and set a bigger rootfs size there. The setting involved is CONFIG_TARGET_ROOTFS_PARTSIZE=5000 where the number is the size in MB. This is the most foolproof way, as your partitions will get replaced upon upgrade, so flashing a stock image would resize them to the stock size again afaik.

Did you resize the rootfs partition or the kernel partition? The kernel partition is the smaller one. You won't be able to install any packages there.

Thanks for the reply. I'm fairly new to OpenWrt and don't know anything about building the image myself, but would give it a go if I found a simple step by step guide.

I did resize the rootfs partition, but suspect I did something wrong because whenever I use
opkg install PKG
I get
Only have 0kb available on filesystem /overlay

Maybe the partition /dev/sda2 has not been mounted correctly... I tried looking at /etc/fstab but that doesn't exist, so have no idea how partitions get mounted.

This should get you going: https://openwrt.org/docs/guide-developer/build-system/start

I've looked at this before but got a bit lost with it....

I was thinking of trying to install the Build System on FreeBSD and the instructions at
https://openwrt.org/docs/guide-developer/build-system/install-buildsystem
do mention BSD but the link https://openwrt.org/docs/howto/buildroot.exigence.bsd doesn't get very far..

Alternatively I might try Arch Linux as a host and wondered if there was a simple way of gathering the toolchain.

pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils

Don't complicate things further. If you need to pick a Unix-like OS then stick with the most recent Debian or Ubuntu, which are known to be stable and not a moving target like Arch Linux, and follow the instructions.

I've got as as far installing the toolchain and have run:

git clone https://git.lede-project.org/source.git

both on Arch Linux and FreeBSD, so I guess I'm ready to start building... Not sure what comes next.
I want to build x86-generic so do I go to the ~/source/target/linux/x86 directory and run

make generic

??

Not sure where or when to run

git checkout lede-17.01

balanga,

After: git clone https://git.lede-project.org/source.gi't
make sure your in the right path , ie. 'cd sourc'e before all following commands.
Also make sure you don't run the commands from user root, as described @ the bottom of: https://openwrt.org/docs/guide-developer/build-system/install-buildsystem

Optional are the following commands:

./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make prereq

You can do a checkout, like: git checkout 17.0.4
Next do: make menuconfig
which will menu through all openwrt options for a build, like: Base support, kernel options, etc.
Also additional packages like: Luci, nano, usb-support, tor, etc.
How i did this for a ZyXEL router can be found here: http://dgcomsys.noip.me/phpbb/viewtopic.php?f=19&t=53

When finished, options will be saved.
Next perform: make
This will build a openwrt-firmware for specified options above.

On any error, rerun: make -j1 V=s
This will explain most errors.

Hopefully get you further.

Regards, DG.