Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:installation:openwrt_x86 [2023/07/09 17:20] – [Packages to consider on x86] add watch dog and sort darksky2docs:guide-user:installation:openwrt_x86 [2023/12/12 11:24] – [Expanding root partition] optimize code vgaetera
Line 38: Line 38:
  
 NVMe SSD support is available since OpenWrt 21.02. NVMe SSD support is available since OpenWrt 21.02.
 +
 +===== Packages to consider on x86 =====
 +OpenWrt has a minimalist philosophy regarding packaging strategy due to limited space on embedded devices.  For many x86 machines, disk space is likely not a limiting factor.  Users coming from desktop distros where thousand of modules are provided in the default image, might be surprised to see that on OpenWrt, the default number of drivers is also minimal.  Therefore, it may be necessary to identify and obtain the needed modules for things like: storage controllers (SATA/USB etc.), sound module, crypto modules, video modules, etc.
 +
 +One strategy to identify needed modules is to boot into a live Linux distro (for example [[https://archlinux.org/download|Arch Linux]]) and inspect the output of ''lsmod'' or ''lspci -vvv | grep driver'' and then search for corresponding OpenWrt kmod packages.
 +
 +Another option if building your own image is to build all modules ''ALL_KMODS=y'' and see what works.  Newer hardware may not be supported out-of-the-box.
 +
 +Beyond the kmods, some common packages to consider installing on x86 are listed below:
 +  * For CPU/APU microcode updates for AMD processors, [[:packages:pkgdata:amd64-microcode]] and for Intel processors, [[:packages:pkgdata:intel-microcode]].
 +  * For disk monitoring, [[:packages:pkgdata_owrt21_2:smartmontools]], see: [[:docs:guide-user:additional-software:smartmontools]]
 +  * For hardware monitoring, [[:packages:pkgdata:lm-sensors]]
 +  * For hardware watchdog support, see: [[:docs:guide-user:hardware:watchdog]]
 +  * For kernel entropy, [[:packages:pkgdata:rng-tools]], see: [[:docs:guide-user:services:rng]]
  
 ===== Installation ===== ===== Installation =====
Line 119: Line 133:
  
 ===== Expanding root partition and filesystem ===== ===== Expanding root partition and filesystem =====
-See also: [[docs:guide-user:advanced:expand_root|Expanding root partition and filesystem Automated]]+See also: [[docs:guide-user:advanced:expand_root|Expanding root partition and filesystemAutomated]]
  
 ==== Expanding root partition ==== ==== Expanding root partition ====
 <WRAP important> <WRAP important>
-When installing OpenWRT on a VM, be sure to [[docs:guide-user:virtualization:qemu#preparation|expand the underlying disk image]] before expanding the partition.+When installing OpenWrt on a VM, be sure to [[docs:guide-user:virtualization:qemu#preparation|expand the underlying disk image]] before expanding the partition.
 </WRAP> </WRAP>
  
Line 134: Line 148:
  
 # Identify disk name and partition number # Identify disk name and partition number
-echo -e "ok\nfix"parted -l ---pretend-input-tty+parted -l -s
  
 # Expand root partition # Expand root partition
-parted -s /dev/sda resizepart 2 100%+parted -f -s /dev/sda resizepart 2 100%
  
 # Apply changes # Apply changes
Line 159: Line 173:
  
 # Map loop device to root partition # Map loop device to root partition
-losetup /dev/loop1 /dev/sda2+losetup /dev/loop0 /dev/sda2 2> /dev/null
  
 # Expand root filesystem # Expand root filesystem
-resize2fs -f /dev/loop1+resize2fs -f /dev/loop0
  
 # Apply changes # Apply changes
Line 231: Line 245:
  
 <code bash> <code bash>
-# Install packages 
-opkg update 
-opkg install lsblk 
- 
 # Update GRUB configuration # Update GRUB configuration
-BOOT_DEV="$(sed --e "\|\s/boot\s.*$|{s///p;q}" /etc/mtab)" +ROOT_BLK="$(readlink -f /sys/dev/block/"$(awk -e \ 
-BOOT_PART="${BOOT_DEV##*[^0-9]}" +'$9=="/dev/root"{print $3}' /proc/self/mountinfo)")" 
-DISK_DEV="${BOOT_DEV%${BOOT_PART}}" +ROOT_DISK="/dev/$(basename "${ROOT_BLK%/*}")
-ROOT_DEV="${DISK_DEV}$((BOOT_PART+1))+ROOT_DEV="/dev/${ROOT_BLK##*/}" 
-ROOT_UUID="$(lsblk --o PARTUUID ${ROOT_DEV})"+ROOT_UUID="$(partx --o UUID "${ROOT_DEV}" "${ROOT_DISK}")"
 sed -i -r -e "s|(PARTUUID=)\S+|\1${ROOT_UUID}|g" /boot/grub/grub.cfg sed -i -r -e "s|(PARTUUID=)\S+|\1${ROOT_UUID}|g" /boot/grub/grub.cfg
 </code> </code>
Line 351: Line 361:
 Example ''CONFIG_TARGET_KERNEL_PARTSIZE=128 CONFIG_TARGET_ROOTFS_PARTSIZE=512''. Example ''CONFIG_TARGET_KERNEL_PARTSIZE=128 CONFIG_TARGET_ROOTFS_PARTSIZE=512''.
  
-==== Packages to consider on x86 ==== 
-  * For CPU/APU microcode updates for AMD processors, [[:packages:pkgdata:amd64-microcode]] and for Intel processors, intel-microcode. 
-  * For disk monitoring, [[:packages:pkgdata_owrt21_2:smartmontools]], see: [[:docs:guide-user:additional-software:smartmontools]] 
-  * For hardware monitoring, [[:packages:pkgdata:lm-sensors]] 
-  * For hardware watchdog support, see: [[:docs:guide-user:hardware:watchdog]] 
-  * For kernel entropy, [[:packages:pkgdata:rng-tools]], see: [[:docs:guide-user:services:rng]] 
  • Last modified: 2024/12/11 21:31
  • by efahlgren