Installing Xfce4 by ondev with sdcard: passwd fails (partition 2 full?)
I try to install Xfce4 on device samsung-serranove by on-device-installer on a sdcard.
Preparing the sdcard on a host PC by pmbootstrap works. Booting the sdcard in the device works, calamares starts, entering password, etc. After calamares unpacked the rootfs, an error pops up saying that the installation failed because of the command 'sh -c passwd user' failed with output: 'New password: Retype new password: passwd: Authentication token manipulation error passwd: password unchanged'.
Interestingly, installing Xfce4 on QEMU with ondev works. And installing MATE on samsung-serranove by ondev on sdcard works too. But the above mentioned combination does not work.
After some digging, it looks to me like the second partition of the sdcard is full after calamares unpacks the rootfs. When setting up the user, command passwd in this line seems to fail because there is no space left to write.
When adding extra space at pmbootstrap init, it does work.
I had a closer look at pmbootstrap (without extra space) and got the following (log file attached at the end, should be reproducable without the device):
pmbootstrap init
- channel: edge
- device: samsung-serranove
- kernel: mainline-modem
- ui: xfce4
pmbootstrap install --ondev --sdcard /dev/sdX
...
*** (3/7) PREPARE INSTALL BLOCKDEVICE ***
(native) create samsung-serranove-boot.img (256M)
(native) create samsung-serranove-root.img (815M)
...
*** (6/7) PREPARE INSTALL BLOCKDEVICE ***
...
(native) partition /dev/install (boot: 256M, reserved: 1015M, root: the rest)
...
sudo parted /dev/sdX print
...
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 256MB 1015MB 759MB primary ext4
3 1271MB 32.0GB 30.7GB primary ext4
I guess the reserved partition 1015M is the root.img 815M + 200M because of this line.
However, as the parted output shows, the values 256M for p1 and 1015M for p2 are the end of the partitions, not the size. The size of p2 1015-256=759 being smaller than the root.img size of 815 might be the reason for p2 being full after calamares unpacking.