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 [2022/12/22 18:24] – [Which image to chose?] fix typo/cleanup palebloodsky | 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. | To use the whole available space of your sdcard, you probably have to resize your partition. | ||
| === squashfs image === | === squashfs image === | ||
| - | To resize | + | |
| - | In this example, the squashfs partiton | + | As with mounting |
| - | | + | |
| - | - On your computer, resize the squashfs partition, for example with '' | + | First, make sure the partition |
| - | - Loop mount the underlying f2fs partition | + | |
| - | - Run filesystem checks < | + | < |
| - | - Resize f2fs filesystem < | + | DEVICE= ### Set this appropriately - e.g. /dev/sda |
| - | Now your filesystem should be recognized with the correct size. | + | PARTITION=" |
| + | sudo cfdisk " | ||
| + | |||
| + | # Create a loop device | ||
| + | # See libfstools/ | ||
| + | FS_SIZE=" | ||
| + | FS_OFFSET=" | ||
| + | LOOP_DEVICE=" | ||
| + | |||
| + | # Now, resize... you may need to fsck first, though. | ||
| + | sudo fsck " | ||
| + | sudo resize2fs " | ||
| + | </ | ||
| === ext4 image === | === ext4 image === | ||
| - | You can us gparted to resize and extend the partitions. | + | |
| + | You can use gparted to resize and extend the partitions. | ||
| To do it online, follow the procedure in [[http:// | To do it online, follow the procedure in [[http:// | ||
| + | Example, to resize ''/ | ||
| + | < | ||
| + | parted | ||
| + | p | ||
| + | resizepart 2 32GB | ||
| + | q | ||
| + | </ | ||
| + | Next, you may need to repair your device (perhaps say yes to all interactive queries): | ||
| < | < | ||
| mount -o remount,ro / #Remount root as Read Only | mount -o remount,ro / #Remount root as Read Only | ||
| - | tune2fs -O^resize_inode /dev/device | + | tune2fs -O^resize_inode /dev/mmcblk0p2 |
| - | fsck.ext4 /dev/device | + | fsck.ext4 /dev/mmcblk0p2 |
| - | + | </ | |
| - | #reboot | + | Now, '' |
| - | resize2fs /dev/device | + | < |
| + | resize2fs /dev/mmcblk0p2 | ||
| </ | </ | ||
| Line 85: | 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 | + | " |
| - | ---- | + | } --> |