Giter Site home page Giter Site logo

Comments (18)

MichaIng avatar MichaIng commented on June 19, 2024 1

Hmm, so why does it not detect the 2nd partition correctly when it runs on 1st boot 🤔. Will do some tests.

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024 1

Sorry for the delay, I wasn't able to get back as quickly as I'd hoped.

I flashed the nightly with dietpi.txt on DIETPISETUP and it looks like it worked. The install is still running, but:

# cat fs_partition_resize.log
Removed "/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service".
[ INFO ] Detected root drive /dev/mmcblk1 with root partition 1
[ INFO ] Detected trailing DietPi setup partition /dev/mmcblk1p2
mount: /dev/mmcblk1p2 mounted on /tmp/tmp.4AmXwr9tcD.
'/tmp/tmp.4AmXwr9tcD/dietpi.txt' -> '/boot/dietpi.txt'
'/tmp/tmp.4AmXwr9tcD/dietpi-wifi.txt' -> '/boot/dietpi-wifi.txt'
umount: /tmp/tmp.4AmXwr9tcD (/dev/mmcblk1p2) unmounted
rmdir: removing directory, '/tmp/tmp.4AmXwr9tcD'

The partition table has been altered.
Disk /dev/mmcblk1: 14.59 GiB, 15665725440 bytes, 30597120 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: 0xdf614d0f

Old situation:

Device         Boot Start     End Sectors   Size Id Type
/dev/mmcblk1p1 *    32768 1579847 1547080 755.4M 83 Linux

/dev/mmcblk1p1: 
New situation:
Disklabel type: dos
Disk identifier: 0xdf614d0f

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk1p1 *    32768 30597119 30564352 14.6G 83 Linux

The partition table has been altered.
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/mmcblk1p1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk1p1 is now 3820544 (4k) blocks long.

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

Can you check the log file:

cat /var/tmp/dietpi/logs/fs_partition_resize.log

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

Possibly related to #6822

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024
# cat /var/tmp/dietpi/logs/fs_partition_resize.log                                                                              
Removed "/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service".                                                             
Disk /dev/mmcblk1: 14.59 GiB, 15665725440 bytes, 30597120 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: 0x97d97bfa                                               
                                                                          
Old situation:                                                            
                                                                          
Device         Boot   Start     End Sectors   Size Id Type                
/dev/mmcblk1p1 *      32768 1579791 1547024 755.4M 83 Linux               
/dev/mmcblk1p2      1579792 1581839    2048     1M  c W95 FAT32 (LBA)     
                                                                          
/dev/mmcblk1p1:                                                           
New situation:                                                            
Disklabel type: dos                                                       
Disk identifier: 0x97d97bfa                                               
                                                                          
Device         Boot   Start     End Sectors   Size Id Type                
/dev/mmcblk1p1 *      32768 1579791 1547024 755.4M 83 Linux               
/dev/mmcblk1p2      1579792 1581839    2048     1M  c W95 FAT32 (LBA)     
                                                                          
The partition table has been altered.                                     
resize2fs 1.47.0 (5-Feb-2023)                                             
The filesystem is already 193378 (4k) blocks long.  Nothing to do!

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

Can you check this output:

lsblk -nrbo FSTYPE,LABEL /dev/mmcblk1 | tail -1

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

vfat DIETPISETUP

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

And this returns "true", right?

[[ $(lsblk -nrbo FSTYPE,LABEL /dev/mmcblk1 | tail -1) == 'vfat DIETPISETUP' ]] && echo true

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024
# [[ $(lsblk -nrbo FSTYPE,LABEL /dev/mmcblk1 | tail -1) == 'vfat DIETPISETUP' ]] && echo true
true

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

Hmm, this is the condition in the script to copy configs from and the FAT partition. So this all looks like it should, and hence should work. No idea why it was skipped 🤔.

Is this still the first boot session? Hence is there still the journalctl showing the system logs from first boot? It should not be possible, but probably somehow the 2nd partition is detected way later, after the script ran already.

I'll try to replicate and add some more (debug) output to the script. However, based on what we see the only explanation is that the condition did not match did does match now according to your test.

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

Interesting tidbits from startup journal:
Partitions are in place before userspace starts:

Dec 30 22:08:22 DietPi kernel: mmc_host mmc2: card is non-removable.  
Dec 30 22:08:22 DietPi kernel: mmc_host mmc2: Bus speed (slot 0) = 375000Hz (slot req 400000Hz, actual 375000HZ div = 0)
Dec 30 22:08:22 DietPi kernel: mmc1: SDHCI controller on fe310000.mmc [fe310000.mmc] using ADMA
Dec 30 22:08:22 DietPi kernel: mmc_host mmc2: Bus speed (slot 0) = 50000000Hz (slot req 100000000Hz, actual 50000000HZ div = 0)
Dec 30 22:08:22 DietPi kernel: mmc1: new HS200 MMC card at address 0001                                                                             
Dec 30 22:08:22 DietPi kernel: mmcblk1: mmc1:0001 58A431 14.6 GiB                                                                                   
Dec 30 22:08:22 DietPi kernel:  mmcblk1: p1 p2                                                                                                      
Dec 30 22:08:22 DietPi kernel: mmcblk1boot0: mmc1:0001 58A431 4.00 MiB                                                                              
Dec 30 22:08:22 DietPi kernel: mmcblk1boot1: mmc1:0001 58A431 4.00 MiB
Dec 30 22:08:22 DietPi kernel: mmcblk1rpmb: mmc1:0001 58A431 4.00 MiB, chardev (236:0)

It starts at least. (I skipped a bunch of generic startup services in the middle)

Dec 30 22:08:22 DietPi systemd[1]: Starting dietpi-fs_partition_resize.service - DietPi-FS_partition_resize...
Dec 30 22:08:22 DietPi systemd[1]: systemd-firstboot.service - First Boot Wizard was skipped because of an unmet condition check (ConditionFirstBoot
=yes).
....
Dec 30 22:08:24 DietPi systemd[1]: Started systemd-rfkill.service - Load/Save RF Kill Switch Status.
Dec 30 22:08:24 DietPi systemd[1]: dietpi-fs_partition_resize.service: Deactivated successfully.    
Dec 30 22:08:24 DietPi systemd[1]: Finished dietpi-fs_partition_resize.service - DietPi-FS_partition_resize.
Dec 30 22:08:25 DietPi systemd[1]: Reached target local-fs-pre.target - Preparation for Local File Systems.
Dec 30 22:08:25 DietPi systemd[1]: Reached target swap.target - Swaps.

It goes into the automated startup after that, with a systemd reload and password changes, etc.

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

All good. When you run the script just now, it works?

/var/lib/dietpi/services/fs_partition_resize.sh
lsblk /dev/mmcblk1

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

Wow, yes. Worked fine.

# /var/lib/dietpi/services/fs_partition_resize.sh

The partition table has been altered.
Disk /dev/mmcblk1: 14.59 GiB, 15665725440 bytes, 30597120 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: 0x97d97bfa

Old situation:

Device         Boot Start     End Sectors   Size Id Type
/dev/mmcblk1p1 *    32768 1579791 1547024 755.4M 83 Linux

/dev/mmcblk1p1: 
New situation:
Disklabel type: dos
Disk identifier: 0x97d97bfa

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk1p1 *    32768 30597119 30564352 14.6G 83 Linux

The partition table has been altered.
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/mmcblk1p1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk1p1 is now 3820544 (4k) blocks long.
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk1     179:0    0 14.6G  0 disk 
└─mmcblk1p1 179:1    0 14.6G  0 part /

/dev/root 15G 710M 14G 6% /

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

I'm going to reflash it (alternate method still, using /boot/dietpi.txt) and run the resize from the console, see if I can get it to complete.

Wiping it again for testing later isn't a problem if you need it.

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

It worked well here with the testing image I just created, which adds some more debug information to the log:

root@SOQuartz:~# cat /var/tmp/dietpi/logs/fs_partition_resize.log
Removed "/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service".
[ INFO ] Detected root drive /dev/mmcblk0 with root partition 1
[ INFO ] Detected trailing DietPi setup partition /dev/mmcblk0p2
mount: /dev/mmcblk0p2 mounted on /tmp/tmp.yshnndojqZ.
'/tmp/tmp.yshnndojqZ/dietpi.txt' -> '/boot/dietpi.txt'
'/tmp/tmp.yshnndojqZ/dietpi-wifi.txt' -> '/boot/dietpi-wifi.txt'
umount: /tmp/tmp.yshnndojqZ (/dev/mmcblk0p2) unmounted
rmdir: removing directory, '/tmp/tmp.yshnndojqZ'

The partition table has been altered.
Disk /dev/mmcblk0: 119.38 GiB, 128177930240 bytes, 250347520 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: 0xdf614d0f

Old situation:

Device         Boot Start     End Sectors   Size Id Type
/dev/mmcblk0p1 *    32768 1579847 1547080 755.4M 83 Linux

/dev/mmcblk0p1:
New situation:
Disklabel type: dos
Disk identifier: 0xdf614d0f

Device         Boot Start       End   Sectors   Size Id Type
/dev/mmcblk0p1 *    32768 250347519 250314752 119.4G 83 Linux

The partition table has been altered.
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 15
The filesystem on /dev/mmcblk0p1 is now 31289344 (4k) blocks long.

root@SOQuartz:~#

This is a Samsung EVO Select 128 MB MB-ME128KA/EU SD card. It is the Model-A Baseboard, which has no onboard eMMC. Which baseboard do you use?

I have a Quartz64 Model A with an eMMC socket, which I could test. The other way round, could you test it with an SD card? In case, use the image here, so the log contains more information: https://dietpi.com/downloads/images/testing/
Ah, of course with this image, a test on eMMC would be likewise interesting, to see the lsblk output (included in the log) if the 2nd partition is not detected.

At least it is no bug with the scripts, but somehow a strange/slow detection of the 2nd partition of the eMMC.

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

Okay great, that is as it should be. Aside of using the new image, you did everything exactly as before? Not sure what solved it, since I did not change anything but the debug output. Probably there was a little quirk with the image, or the newer kernel shipped a fix/enhancement for the eMMC driver 🤔.

from dietpi.

disconn3ct avatar disconn3ct commented on June 19, 2024

Aside of using the new image, you did everything exactly as before?

100%. For completeness, here's the really long version. Twice before opening the bug, I tossed the emmc onto the reader and flashed it with rpi imager. After flashing I mounted, copied the config to the config partition, unmounted, removed it from the reader and installed it on the board. Power on via the turing web ui, wait for ssh to appear on the static IP. On the first failure, I just powered it down and reflashed as above. On the second, I got the serial console working and saw the interactive install (or maybe it was the interactive take-over.)

For the third try I put the dietpi.txt in place on both partitions. It ran the automated setup but skipped the resize.

Using the new image, I flashed with rpi, copied to the config partition only and it worked fine.

Thanks!

from dietpi.

MichaIng avatar MichaIng commented on June 19, 2024

Okay , I'll mark it as closed. Whatever the issue was 😄.

from dietpi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.