hi,
i want to execute
tune2fs -O ^has_journal /dev/mmcblk0p2
e4fsck –f /dev/mmcblk0p2
during bootup before sd card is mounted.
pi should continue boot process even if something goes wrong, since i have to pay for remote hands on service.
where would you put these commands in?
- DougieLawson
- Posts: 42635
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Disabling ext4 journaling remote
You should build a new SDCard (as a clone of the original), get a USB SDCard reader and use your secondary system with the primary mounted in the USB reader to set journalling on your primary system. It's less risky, it's less likely to destroy everything.
Also you really DO NOT want journalling on an SDCard. Consider moving your rootfs to a USB device.
Also you really DO NOT want journalling on an SDCard. Consider moving your rootfs to a USB device.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Disabling ext4 journaling remote
too late.
wrote a systemd unit to do it, forgot to set timeout there.
machine is already down, and now i'm waiting for hands on call...

wrote a systemd unit to do it, forgot to set timeout there.
machine is already down, and now i'm waiting for hands on call...

- DougieLawson
- Posts: 42635
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Disabling ext4 journaling remote
Eh?sirko wrote:... now i'm waiting for hands on call...
Get a second SDCard and a USB reader. Build a fresh copy of Raspbian on the new card, use that with the USB reader to rescue your original card from the damage you've done to it.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Disabling ext4 journaling remote
pi is located in a foreign data center. no physical access.
Re: Disabling ext4 journaling remote
I know that you probably consider it a virtue, but you have wasted another two posts in this thread. The intent of the commands in the original post was to disable journalling. You are advising the poster to do exactly the thing he wanted to do, but without answering his question of how to achieve it remotely.DougieLawson wrote:Also you really DO NOT want journalling on an SDCard.
Also, if you think that having ext4 journalling on an SD Card is a bad thing, why on earth are you revealing that to a first poster on the forums, and not to ShiftPlusOne or whoever makes the Foundation's images these days?
There is no before card is mounted, really. Pi images generally boot without using an initramfs. There may be a time early in the boot sequence when the filesystem is still read-only, but messing with the boot scripts strikes me as far more dangerous than doing the job manually.sirko wrote:during bootup before sd card is mounted.
Log in using SSH. Stop any databases and other applications that will dislike suddenly losing filesystem access. Then use the kernel's Magic SysRq feature to force the system read-only, make the change, and reboot.
Code: Select all
sudo -i
echo u > /proc/sysrq-trigger
echo s > /proc/sysrq-trigger
tune2fs -O ^has_journal /dev/mmcblk0p2
e2fsck -fy /dev/mmcblk0p2
echo s > /proc/sysrq-trigger
echo b > /proc/sysrq-trigger
Re: Disabling ext4 journaling remote
Thank you, jojopi.
Exactly what I was looking for.
And now I know, why machine did not reboot. Forgot the y for fsck...
Exactly what I was looking for.
And now I know, why machine did not reboot. Forgot the y for fsck...
Re: Disabling ext4 journaling remote
I tried the command "tune2fs -O ^has_journal /dev/mmcblk0p" on my Raspberry Pi 3 and got the following error.
Attempt to read block from filesystem resulted in short read while
trying to open "location address" Could this be a zero-length partition?
Any ideas on why I got that error message? And any other recommendations for disabling journaling?
Attempt to read block from filesystem resulted in short read while
trying to open "location address" Could this be a zero-length partition?
Any ideas on why I got that error message? And any other recommendations for disabling journaling?
Re: Disabling ext4 journaling remote
I checked my drivers by df command.
/dev/mmcb1k0p6 of /boot
/dev/mmcb1k0p5 of /media/pi/settings
Could you please share which one I should use 5 or 6?
/dev/mmcb1k0p6 of /boot
/dev/mmcb1k0p5 of /media/pi/settings
Could you please share which one I should use 5 or 6?
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: Disabling ext4 journaling remote
Have you used NoobS to install Raspbian ??
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: Disabling ext4 journaling remote
I reinstalled the OS from Noobs.
Any help? I am running a Ubiquiti Controller on Raspberry Pi 3 Model B and want to increase the life of my SD card.
Any help? I am running a Ubiquiti Controller on Raspberry Pi 3 Model B and want to increase the life of my SD card.
Re: Disabling ext4 journaling remote
Amazing solution, jojopi! Worked like a charm, when I thought it couldn't be done at all. Mad props and thanks much!