how to set kernel parameter 'fsck.mode=force'
#1
Hi,

I spent now several hours trying to find out by googling and search in this forum how to set the kernel parameter "fsck.mode=force" on the Pine A64. I tried to understand the boot process from the sunxi documentation but to be honest, the boot process of the pine a64 is like rocket science to me with all this parts like u-boot, initrd, kernel, etc.

I finally tried setting it in uEnv.txt but when I look at /proc/cmdline it's not applied. The system I'm running is debian with version "stretch/sid" and kernel image is "3.10.105-0-pine64-longsleep"

Can anyone in simple words explain me how to do this. I cannot be that hard, but it seems it's very hard to find instructions for this seemingly simple task.

Thanks to anyone who could she a light on this.

PS: Why is it so complicated on the PineA64 when on Raspberry I can just modify cmdline.txt and I'm done?
  Reply
#2
(05-09-2018, 02:57 AM)marcelser Wrote: PS: Why is it so complicated on the PineA64 when on Raspberry I can just modify cmdline.txt and I'm done?

Because it's not the Raspberry Pi! Tongue

I'm pretty sure what you're after is '/boot/efi/extlinux/extlinux.conf' where you'll see the list of parameters that are passed to the kernel.

If you can force a fsck may be a different thing... let us know how you go! Wink

(btw, initrd and the kernel stuff shouldn't be that much different to a normal PC, etc... it's the SPL and uboot that is different... and building and making changes there really is rocket science Angel )
  Reply
#3
(05-09-2018, 05:20 AM)pfeerick Wrote:
(05-09-2018, 02:57 AM)marcelser Wrote: PS: Why is it so complicated on the PineA64 when on Raspberry I can just modify cmdline.txt and I'm done?

Because it's not the Raspberry Pi!  Tongue

I'm pretty sure what you're after is '/boot/efi/extlinux/extlinux.conf' where you'll see the list of parameters that are passed to the kernel.

If you can force a fsck may be a different thing... let us know how you go!  Wink

(btw, initrd and the kernel stuff shouldn't be that much different to a normal PC, etc... it's the SPL and uboot that is different... and building and making changes there really is rocket science  Angel )

Thanks for trying to help, but there's no such thing as an 'efi' directory in boot partition, here's what "ls -l" actually shows:
Code:
total 2142
-rwxr-xr-x 1 root root    3129 Oct 24  2017 first-boot.log
-rwxr-xr-x 1 root root    3485 Jun 16  2017 first-boot.sh
-rwxr-xr-x 1 root root      28 Mar 11  2017 Image.version
-rwxr-xr-x 1 root root 1094464 Mar 11  2017 initrd.img
-rwxr-xr-x 1 root root 1076339 Nov 15 00:10 initrd_wait.img
-rwxr-xr-x 1 root root     571 Oct 24  2017 openhabian.conf
drwxr-xr-x 2 root root    2048 Mar 11  2017 pine64
drwxr-xr-x 2 root root    2048 Oct 24  2017 System Volume Information
-rwxr-xr-x 1 root root     218 May  9 11:04 uEnv.txt
-rwxr-xr-x 1 root root     214 Nov 15 00:35 uEnv.txt.working
[13:43:28] openhabian@openHABian:/boot$

Any ideas?

I finally did it. It was in the end uEnv.txt (but you have to add it to the first line not as separate line) but in the end in syslog it seems it did not repair it, what I see is this:

May 9 13:51:43 openHABian kernel: [ 0.000000] Kernel command line: console=tty0 console=ttyS0,115200n8 no_console_suspend mac_addr=b2:11:d4:e2:6d:c2 fsck.mode=force earlycon=uart,mmio32,0x01c28000 mac_addr= root=UUID=4ee1919c-77a3-4222-88cb-388c56afef93 ro rootwait
May 9 13:51:43 openHABian systemd-fsck[379]: fsck.fat 3.0.28 (2015-05-16)
May 9 13:51:43 openHABian systemd-fsck[379]: /dev/mmcblk0p1: 18 files, 6956/25541 clusters
May 9 13:51:43 openHABian kernel: [ 10.333694] EXT4-fs (sda1): warning: mounting fs with errors, running e2fsck is recommended
  Reply
#4
(05-09-2018, 05:20 AM)pfeerick Wrote: I'm pretty sure what you're after is '/boot/efi/extlinux/extlinux.conf' where you'll see the list of parameters that are passed to the kernel.

That only works on the Rock64...
  Reply
#5
I also added "fsck.repair=yes" as kernel option, nevertheless the root-fs (sda1) is never checked, just to boot partition which resides on the sd card. In the end I gave-up as other options like setting /forcefsck and alike didn't work.

I grabbed myself a live-cd booted it connected the sda1 in question an ran e2fsck. It's still disturbing that this cannot be run on the Pine A64 automatically
  Reply
#6
(05-09-2018, 07:34 AM)marcelser Wrote: I grabbed myself a live-cd booted it connected the sda1 in question an ran e2fsck. It's still disturbing that this cannot be run on the Pine A64 automatically

Can't this be done via fstab?
  Reply
#7
(05-09-2018, 06:29 AM)evilbunny Wrote:
(05-09-2018, 05:20 AM)pfeerick Wrote: I'm pretty sure what you're after is '/boot/efi/extlinux/extlinux.conf' where you'll see the list of parameters that are passed to the kernel.

That only works on the Rock64...

Yeah, I just realised this was about the pine64, not the rock64... for some reason thought it said rock64 or was in the rock64 subforum... whoopsie! And then it was on a openhab image also, which won't act quite the same as later pine64 images...

Anyway, it looks like the OP has it working, and yes, /etc/fstab would be the place to do it for secondary file systems... by setting that last parameter as 1 instead of 0 or 2.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  (ARCHIVED) Debian Jessie Images (3.10.102 BSP Kernel) New Release lenny.raposo-pine64.pro 259 197,512 05-21-2018, 06:30 AM
Last Post: Luke
Question Debian Jessie with 4.x.y kernel and complete hardware support? Spark 2 2,814 04-24-2017, 09:56 PM
Last Post: Spark
  Adding a missing kernel module spz2k 8 4,150 01-10-2017, 06:22 AM
Last Post: xalius
  NIC not visible after kernel update xleon 1 1,288 11-15-2016, 05:23 PM
Last Post: xleon
  Portrait mode {-DesT-} 7 2,639 08-22-2016, 09:11 PM
Last Post: MarkHaysHarris777
  [OUTDATED] Debian Jessie (4.7.0-rc1 Kernel) Images fire219 4 7,762 07-20-2016, 02:36 PM
Last Post: umiddelb
  i2c-bus kernel modules robertvaldimarsson 15 5,400 06-07-2016, 01:48 PM
Last Post: robertvaldimarsson
  Debian kernel upgrade question jl_678 2 1,911 04-18-2016, 05:54 PM
Last Post: jl_678

Forum Jump:


Users browsing this thread: 1 Guest(s)