Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:installation:openwrt_x86 [2023/10/15 14:03] – add a link for intel-microcode to pkgdata. flygarn12 | docs: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 " | + | parted -l -s |
| # Expand root partition | # Expand root partition | ||
| - | parted -s /dev/sda resizepart 2 100% | + | parted |
| # Apply changes | # Apply changes | ||
| Line 173: | Line 173: | ||
| # Map loop device to root partition | # Map loop device to root partition | ||
| - | losetup /dev/loop1 /dev/sda2 | + | losetup /dev/loop0 / |
| # Expand root filesystem | # Expand root filesystem | ||
| - | resize2fs -f /dev/loop1 | + | resize2fs -f /dev/loop0 |
| # 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 -n -e "\|\s/ | + | ROOT_BLK="$(readlink |
| - | BOOT_PART="${BOOT_DEV## | + | '$9=="/dev/root"{print $3}' |
| - | DISK_DEV="${BOOT_DEV%${BOOT_PART}}" | + | ROOT_DISK="/dev/$(basename |
| - | ROOT_DEV=" | + | ROOT_DEV=" |
| - | ROOT_UUID=" | + | ROOT_UUID=" |
| sed -i -r -e " | sed -i -r -e " | ||
| </ | </ | ||