raidboy Posted November 7, 2020 Posted November 7, 2020 RockPi4a. Installed busster current 5.8.6 armbian onto eMMC. Works fine. Now i figure out i need swap space (app needs more than the 1G mem i have). So i boot another image from SD an use gparted to shrink the first partition from the end to create 4GByte and create a swap partition in there. Now the board won't boot anymore (see attached file). Erased SPI, no difference. Partition table shows GPT and "MBR protective" (before and after resizing). so, whats the magic to create a bootable armbian disk if one needs different partitioning than just the "full disk one partition" layout ? Is this "uboot" hidden behind the only partition, there was a bunch of space unused after the partition that i used for the swap partition. Sorry if this was discussed before but uncle google and dr armbian search couldn't find anything for me ;-( armbian-failure.txt
raidboy Posted November 7, 2020 Author Posted November 7, 2020 apologies for double posting.. how did that happen, strange.
NicoD Posted November 7, 2020 Posted November 7, 2020 You don't need to create another partition for swap. You can create a swap file on the main partition. sudo fallocate -l 8G /swapfile Allocate 8GB for swapfile sudo chmod 600 /swapfile Give the correct rights for the swapfile sudo mkswap /swapfile Make it a swapfile sudo swapon /swapfile Turn on the swapfile sudo nano /etc/fstab Open fstab and add the line ... |_ /swapfile swap swap defaults 0 0 If you change the starting position of the filesystem it will not boot anymore. You should be able to change at the end.
raidboy Posted November 7, 2020 Author Posted November 7, 2020 Right. Not equally fast. But there can easily be other reasons for additional partitions. How do i get my eMMC bootable again ?
piter75 Posted November 7, 2020 Posted November 7, 2020 7 minutes ago, NicoD said: You don't need to create another partition for swap. You can create a swap file on the main partition. +1 14 minutes ago, raidboy said: Partition table shows GPT and "MBR protective" (before and after resizing). By default Armbian uses MBR so it's strange that you found GPT here. Spoiler root@rockpi-4b:~# fdisk -l /dev/mmcblk1 Disk /dev/mmcblk1: 29.8 GiB, 32010928128 bytes, 62521344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xa36b60c2 Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 32768 61896127 61863360 29.5G 83 Linux Looking at your logs I think that you did overwrite u-boot in the process. Your root partition starts at 2048 (0x800) sector instead of 32768 (0x8000) - which is Rockchip "standard". You may need to start over with a fresh image
raidboy Posted November 7, 2020 Author Posted November 7, 2020 actually even the SD installation image shows MBR and GPT in gdisk. Thanks for finding the 2048. No idea, i guess i must have messed um in gparted, didn't mean to move the start of the partition. So. There is nothing that should make bootstrap fail if i just change at the end of the disk and add partitions there ? Given how much i changed in my installation i guess i have to simply save the whole FW and restore to a fresh image copy... lets see.
raidboy Posted November 8, 2020 Author Posted November 8, 2020 ok. copied mmcblk1p1 partition file. copied fresh Armbian onto eMMC, booted from it. boot from SD again, resize mmcblk1p1 to former size (no change of 32768 start sector), copy back mmcblk1p1 saved partition. Boots fine. Also was able to add swap partition which automatically got used by armbian. Might be useful to consider some form of protective partition entry from 2048 to 32767 to avoid this type of mistake to happen...
Recommended Posts