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/11/16 20:17] – [Expanding root filesystem] ignore stderr vgaeteradocs:guide-user:installation:openwrt_x86 [2023/12/12 11:24] – [Expanding root partition] optimize code vgaetera
Line 148: 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 245: 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>
  • Last modified: 2024/12/11 21:31
  • by efahlgren