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:installation_methods:sd_card [2023/03/31 05:43] – [Expanding the filesystem] wryun | docs:guide-user:installation:installation_methods:sd_card [2024/02/12 12:06] – external edit | ||
|---|---|---|---|
| Line 46: | Line 46: | ||
| == other images == | == other images == | ||
| * ubifs-sdcard.img.gz | * ubifs-sdcard.img.gz | ||
| + | |||
| + | ==== Mounting a squashfs filesystem locally ==== | ||
| + | |||
| + | If you insert your newly flashed SD card into a Linux machine, it will be easy to mount the read only squashfs partition but it won't know about the overlay, which is not even in the partition table but instead located immediately after the squashfs filesystem in the same partition. You therefore need to mount the overlay as a loopback device. You can discover the offset by running losetup on the device, or calculate the offset yourself by inspecting the filesystem. | ||
| + | |||
| + | < | ||
| + | # Setup the loop back device. | ||
| + | # See libfstools/ | ||
| + | DEVICE= ### Set this appropriately - e.g. /dev/sda | ||
| + | PARTITION=" | ||
| + | FS_SIZE=" | ||
| + | FS_OFFSET=" | ||
| + | LOOP_DEVICE=" | ||
| + | |||
| + | # Now mount both partitions (remember, you may need to unmount any automatic mounts) | ||
| + | mkdir -p /mnt/base / | ||
| + | sudo mount " | ||
| + | sudo mount " | ||
| + | sudo mount -o noatime, | ||
| + | </ | ||
| + | |||
| + | This should leave you with a writable filesystem in / | ||
| ==== Expanding the filesystem ==== | ==== Expanding the filesystem ==== | ||
| - | To use the whole available space of your sdcard, you probably have to resize your partition. | ||
| - | === squashfs image on booted system === | + | To use the whole available space of your sdcard, you probably have to resize your partition. |
| - | To resize the squashfs-image one has to know the offset of the hidden f2fs filesystem. | + | === squashfs image === |
| - | In this example, the squashfs partiton is ''/ | + | |
| - | - You can find the offset, by running '' | + | |
| - | - On your computer, resize the squashfs partition, for example with '' | + | |
| - | - Loop mount the underlying f2fs partition (( If you are already using a loop device, you may have to use another number that loop0 )) < | + | |
| - | - Run filesystem checks < | + | |
| - | - Resize f2fs filesystem < | + | |
| - | Now your filesystem should be recognized with the correct size. | + | |
| - | === squashfs image on computer === | + | As with mounting the overlay above, to resize it you'll need the offset of the hidden f2fs or ext4 filesystem (depending |
| - | If you want to resize | + | First, make sure the partition is not mounted, then do something like: |
| < | < | ||
| Line 116: | Line 130: | ||
| ===== Devices with this installation method ===== | ===== Devices with this installation method ===== | ||
| - | ---- datatable ---- | + | <!-- ToH: { |
| - | cols : Brand, Model, Versions, Supported Current Rel_releasecurrent, Installation method(s)_method-installations, Comment installation, Device Page_page, Device Techdata_pageid | + | " |
| - | dynfilters | + | " |
| - | filter | + | " |
| - | filter | + | " |
| - | sort : Brand | + | " |
| - | limit : 25 | + | " |
| - | ---- | + | } --> |