Commit Graph

119 Commits

Author SHA1 Message Date
ColorfulRhino
d638276fcc partitioning: Reduce commit mount option for btrfs and ext4 to 120
Mount option `commit=600` (=10 minutes) seems pretty high.
Reduce it to 120 for ext4 (default for ext4 is `commit=5`)
and 120 for btrfs (default for btrfs is `commit=30`) to reduce
risk of losing data on power loss.

Sources:
- https://www.kernel.org/doc/html/latest/admin-guide/ext4.html
- https://wiki.archlinux.org/title/Btrfs#Commit_interval
- https://btrfs.readthedocs.io/en/latest/Administration.html
2024-07-09 11:31:51 +02:00
Igor Pecovnik
a2f9e1f1e5 Add a big warning and additional check when wiping target destination 2024-07-04 21:35:12 +02:00
Igor Pecovnik
26867787e5 Armbian-install: add option to wipe target destination 2024-07-04 21:35:12 +02:00
Igor Pecovnik
c7aec57e1c armbian-install should do rsync --one-file-system
Any mounted directory should not be copied but also mounted on the new boot device when booting
2024-03-02 21:01:26 +01:00
SteeManMI
0cba1d16bf
Fix ddbr to handle current lsblk output (#6290)
Changes to be committed:
	modified:   packages/bsp/common/usr/sbin/ddbr
2024-02-20 16:49:29 -05:00
Igor
95dc76ae87 Enhance default boot partition size for installer
This will prevent running into "No space left on device" pretty soon.
2023-09-19 20:07:44 +02:00
Phani Pavan Kambhampati
823738dedd Update armbian-add-overlay
added another case to handle stray spaces and to not add a space if no overlays are already present.
2023-08-18 17:11:51 +02:00
Markus Hoffrogge
5072966b44
armbian-install: use consistent logfile name and align the according /usr/lib folder name (#5340)
* armbian-install: The log file should be named identical to the originally called install script

- the log file should be named as:
  - /var/log/armbian-install.log if script armbian-install was originally called
  - /var/log/nand-sata-install.log
- same for directory /usr/lib/nand-sata-install:
  - rename this directory to /usr/lib/armbian-install
  - create a symbolic link nand-sata-install to this folder for backward compatibility
    in a subsequent commit
- abort script armbian-install with an error message:
  - if file ${EX_LIST} does not exist
  - if dir ${BOOTLOADER} does not exist
- remove the "beta" from the version title of armbian-install

* Add symlink /usr/lib/nand-sata-install to /usr/lib/armbian-install
2023-06-19 22:04:01 +02:00
Igor
9467736a64 Remove doubled swap creation 2023-04-22 10:05:10 +02:00
Markus Hoffrogge
142dec4618 Fix $sduuid being overlapped by a probable emmc device existing
- if $emmccheck is not empty, then exclude this
  from the lookups for $sdblkid
- simplified $sduuid assignment within a single line

closes AR-1611
2023-03-20 13:31:06 +01:00
Markus Hoffrogge
0bd6fea636 Fix $sduuid to be of format UUID=uuid
- this issue was introduced by commit 7e9ebe1
- the variable sduuid is supposed to start with "UUID="
- fixed now by prepending UUID= to $sduuid, if the "raw" $sduuid is not empty

closes AR-1611
2023-03-20 13:31:06 +01:00
Igor Pečovnik
7f5c20d75c
Bugfix: GRUB installation failed to install on UEFI systems (#4758)
- removing "removable" paramter
- UUID from EFI partition was not found
2023-01-28 00:14:51 +01:00
Markus Hoffrogge
1a59152009
armbian-install: further fixes plus MTD char driven flash support (#4596)
* Fix variable $root_partition_device to be a device path

- variable $root_partition_device is intended to be a
  device path as /dev/$root_partition_device_name

* Fix determination and usage of variable $sduuid

- a) lookup mmc devices excluding the mmc device probably providing
     the current root partition
- b) if there is no sduuid determined by this lookup,
     then lookup any mmc partition matching /dev/mmcblk*p1
- c) move the sduuid calculation to the script header
     to enable usage for scenario selection filtering
- d) hide installation scenario #1 selection,
     if $sduuid is empty, since $sduuid is essential for that scenario

* Hide current root partition device from destination selection

- add new variable $root_partition_name
- use this variable to filter current root partition
  from destination selection in check_partitions()

* Fix behavior in case of no available partition

- The logic in check_partitions() in case of no available
  partition is improved not to fail for a hidden reason
  and UX for fresh disk devices is improved
- Fix the calculation of $FREE_SPACE for devices without or
  with an empty partition table
- Ask the user to proceed AFTER the minimum free capacity
  required is verified
- Improve the logic for auto-creating initial partitions
  as follows:
    1. Check for a minimum free space of 4GB for a partition
    2. Ask user to proceed with auto-created partition(s) or not
    3. Distinguish between UEFI and non UEFI device
    4. Create a partition of full free size for non UEFI devices also

* Add support for MTD char driven flash

- replace $spicheck by $mtdcheck
- add probable MTD char device partitions to $mtdcheck
- update comments and dialog content:
  - replace "SPI Flash" by "MTD Flash"
- replace call of "create_armbian 'spi' ..." by "create_armbian 'mtd' ..."
- update description for /dev/nand1 /dev/nand2 as "legacy SUNXI NAND"
- additional parameters passed to import function "write_uboot_platform_mtd":
   $3 - Log file name
   $4 - SPACE separated list of all MTD device partition(s)
2022-12-23 21:58:19 +01:00
Markus Hoffrogge
893ed2347d
Fix for selecting non formatted target partitions (#4577)
- function check_partitions():
  - remove file system filter on lsblk commands
    for listing probable target partitions
  - fix typo "Destnation" -> "Destination"
  - fix indentation on if scopes

fixes #4576
2022-12-19 07:34:23 +01:00
Oleg
0de2891bcd
fix install mode SPI for extlinux.conf (#4553) 2022-12-12 08:14:50 +01:00
Igor Pečovnik
854834e166
armbian-install: limit automated swap creation to 16Gb (#4528) 2022-12-06 09:47:30 +01:00
Igor Pečovnik
d66e8205ed
Replace nand-sata-install with symlink to armbian-install (#4529) 2022-12-06 09:47:20 +01:00
Werner
2ee2fd3d73
Fix faulty lsblk argument (#4466)
https://forum.armbian.com/topic/24554-armbian-install-fails-due-to-bad-lsblk-argument/#comment-153675
2022-11-20 23:00:34 +01:00
Joe Khoobyar
f3d26f123a
AR-1398: Fix wrong error message when missing fs tools (#4424) 2022-11-12 07:10:00 +01:00
Igor Pečovnik
157b7c56e5
Installation fix when /var/log.hdd/journal exists (#4371) (#4382)
* Fix to flush volatile journald to prevent full /var/log at startup

* re-introduce directory / in non-rsync copy, and exclude journal* in this copy
Note: this may need some testing if someone doesn't use rsync

* Fix for non-rsync copy to Disk, since journal cannot be copied onto itself

* Backed up journal files are removed with vacuum, so no need to delete them separately

* Make room at boot by removing old logs, in addition to the removal later
every 15 minutes

* remove old archived journal files modified more than 1 day ago

* make sure volatile logging is used, since journald sometimes turns persistent at boot
remove unused commented lines in ramlog

* Fix check for configured journald volatile logging

* revert #3799, the rsync --delete

* Exclude /var/log/journal from install, and create empty /var/log/journal directory when it exists during install

Co-authored-by: dennis laptop <dennis@smartstatetechnolgy.nl>
Co-authored-by: Igor Pečovnik <igorpecovnik@users.noreply.github.com>

Co-authored-by: Dennis <bijwaard@gmail.com>
Co-authored-by: dennis laptop <dennis@smartstatetechnolgy.nl>
2022-11-05 08:22:20 +01:00
Joe Khoobyar
ead3409f95
fix for #4323 in newer script too 2022-10-23 13:41:25 -04:00
Joe Khoobyar
e3df506959
a fix for #4323 2022-10-23 13:34:37 -04:00
Igor Pečovnik
1d5a1f242f
Remove ext2 and ext3 filesystem option from armbian-install (#4285)
* Remove ext2 and ext3 filesystem option from armbian-install

* Bugfix
2022-10-15 10:46:20 +02:00
Igor Pečovnik
7afa645b38
Improve ARM64 UEFI support (#4271)
* Root partition is not recognised properly

* Add support for ARM64 UEFI install

Work if installed to eMMC, installs also to NVME (T4), but u-boot fails to init PCI. Also u-boot 2022.10

Needs more testings.

* Lets clean the drive before
2022-10-13 18:34:05 +02:00
Igor Pečovnik
0c85794ba4
Add support for UEFI install with a new script armbian-install (#4227)
* Add preliminary support for UEFI install to nand-sata-install

Signed-off-by: Igor <igor@armbian.com>

* Add symbolic link

* Hardening and cleaning

* Removing obsolete NAND support

- create swal size of memory
- enable hibernation (S4) to have additional power saving mode
- enable GRUB search for another OS

* Move nand cleaning into separate commit

* Add support for UEFI install to eMMC

* Add support for install to empty UEFI target

Tested install to eMMC powered UP Square board

* Add UEFI improved script as standalone armbian-config

Once we are happy with functionality, remove the old and add a link

* Switch to a single 32 MB offset scheme.

* Improve readme

Signed-off-by: Igor <igor@armbian.com>
2022-10-07 17:57:21 +02:00
Oleg
6123307c2a
fix buid kernel 5.19.2\5.18.8 (#4088) 2022-08-19 18:10:30 +02:00
Rosen Penev
fdf73a025b
some shellcheck fixes (#4013)
* bsp: remove useless cats treewide

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* bsp: replace egrep with grep -E

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-07-25 11:39:11 +02:00
Oleg
d227b6d3a4
fix message install use extlinux.conf (#3556) 2022-03-24 20:54:59 +01:00
Oleg
dc54b0c2c6
fix install emmc (#3532) 2022-03-12 23:15:47 +01:00
Oleg
a037db891e
add utils ddbr for create\restore full backup eMMC (#3406) 2022-02-10 15:32:57 +01:00
Oleg
7d69cfeb6e
fix install u-boot to eMMC (#3448) 2022-02-02 10:49:41 +01:00
Oleg
3f8da052e8
fixes the manual launch of the installation script from USB media (#3377) 2022-01-05 17:54:30 +01:00
Piotr Szczepanik
0069ad60a6
Preliminary support for rockchip rk35xx boards (#3111) 2021-09-15 22:08:39 +02:00
Aristo Chen
905cf37bd3
Enlarge dialog size to prevent string cut off (#3141) 2021-09-12 19:26:33 +02:00
Oleg
1e5133dd2b
fix u-boot sector station (#2999) 2021-07-12 09:32:35 +02:00
Laurent
a9f5c0a050
AR-315: Add support for GPT table inside nand-sata-install (#2856) 2021-06-10 11:49:29 +02:00
Aristo Chen
78894792a5
Update URLs (#2870)
* Update URLs

* Update URLs

* Update URLs
2021-06-10 11:27:51 +02:00
Oleg
20c06c0ba3
fix install-nand for extlinux.conf (#2775) 2021-04-15 01:16:13 +02:00
lanefu
3369a0d538
Merge pull request #2608 from ChrisDumont/fix-alignment
fix arithmetic to align filesystem sizes to 16MiB (not 16KiB)
2021-04-11 15:02:29 -04:00
Chris Dumont
5bbf2f0396 Fix arithmetic to align filesystem sizes to 16MiB on nand devices. 2021-04-03 10:18:23 -07:00
tparys
37c324975f
Detect overlay capability from uboot boot.cmd (#2628) 2021-02-22 21:50:50 +01:00
Lukas Pirl
4e25b7257b
remove mount option "nodiratime" where "noatime" is given (#2645)
mount option "noatime" implies "nodiratime", see, e.g.:
https://github.com/torvalds/linux/blob/v5.11/fs/inode.c#L1807-L1808
2021-02-22 21:49:04 +01:00
Werner
053fb76d61
Fix typo 2020-12-15 15:03:19 +01:00
Duncan Bellamy
4a689f8b89
change DEFAULT_BOOTSIZE to 256 for nand-sata-install and debootstrap.sh (#2437) 2020-12-10 21:17:13 +01:00
Duncan Bellamy
4947f95b46
nand-sata-install increase DEFAULT_BOOTSIZE to 200 as 96 is not enough to upgrade (#2425) 2020-12-10 11:47:09 +01:00
Piotr Szczepanik
25b6709991 Added SPI flashing to nand-sata-install's SPI -> SATA, USB, NVMe option 2020-10-17 23:38:05 +02:00
Piotr Szczepanik
e0686d5359 Enabled user overlays for rk3399 family 2020-08-06 22:10:29 +02:00
Piotr Szczepanik
dc1b17aeac Enable ROCK Pi S overlays support in armbian-add-overlay 2020-06-28 22:18:27 +02:00
Piotr Szczepanik
e0bb0f294f
Allow install to SD NAND for ROCK Pi S (#2045) 2020-06-20 22:34:28 +02:00
useful64
b37d63a481
Enable user overlays on rockchip64 based boards (#1931)
User overlays are working fine on this boards (I have already tested on rock64).
Added the possibility to use on rockchip64 based boards.
Changed "if" to "case" to facilitate adding more supported boards.
2020-05-01 08:57:01 +02:00