site  contact  subhomenews

Full install: f.s. check at bootup

July 16, 2012 — BarryK
For a full installation of Puppy to hard drive, including the SD-card installations for the ARM boards, also known as PUPMODE=2, if there is an abnormal shutdown then there is supposed to be an automatic f.s. check at next bootup. Except that it was broken.

There is no initrd, and the first thing that executes at bootup is /sbin/init in the main f.s. This is a script, that normally passes execution to Busybox init and bootup happens normally.

However, if there is an abnormal shutdown, then the file /fsckme.flg exists at bootup and the /sbin/init script goes into a f.s.-check mode. This consists of creating a ramdisk with a mini-Linux distro on it, "pivot_root" into it, then do a f.s. check of the main partition.

This mechanism was broken, and on the Raspberry Pi Puppy alpha3 it was not happening at all.

I have fixed it, Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/6dccd3e818

However, avoid deliberate abnormal shutdowns. Really, they should be avoided completely. If there is one, having a journaled f.s. will not save you from possible file corruption. A f.s. repair at bootup will not save you from potential file corruption either. I wrote about this on my blog recently.

Comments

ARM
Username: Sage
FYI: Today's DWW: "Debian Last week we covered the introduction of new 64-bit ARM architecture support to the Linux kernel. ARM processors have a reputation for low energy usage and have gained widespread use in embedded systems and hobbyist projects like the Raspberry Pi. So where can fans of ARM processors go to find distributions which support their favourite architecture? Carla Schroder has put together a list of Linux distributions with ARM ports. The Arch, Debian, Fedora and Ubuntu projects each get a nod. Users interested in Slackware are also in luck. Are you running Linux on ARM? Let us know which distribution you are using in the comments section. "

Question
Username: Dewbie
"[i]if there is an abnormal shutdown then there is supposed to be an automatic f.s. check at next bootup. Except that it was broken.[/i] Barry: Does this apply to [u]all[/u] Puppy versions with filesystem check? Thanks.

abnormal shutdown
Username: K Godt
"ADVANCED pup-5xx /sbin/init : http://murga-linux.com/puppy/viewtopic.php?t=67844 Where i would like some feedback ! Cannot say anything but on ext4 once "all" my browsers vanished and newly i was missing a file also .. Have no troubles with todays HDD-133 abnormal shutdown but on a MWDMA-HDD-16 once apparently because of too low SWAP Speed . The xwin /etc/.XLOADED is "unfortunately" obsolete . Pizzasgood make a very good job on Puppy though :happy:.

Woof fix
Username: BarryK
"[i]Does this apply to all Puppy versions with filesystem check? Thanks.[/i] Yes, it is a Woof fix, applies to all builds. However, it might have worked before, for some builds, just not quite right. Also, there was one RasPi specific problem that I fixed, the lack of a hardware clock.

Re advanced /sbin/init
Username: BarryK
"K Godt, My init script now checks the size of the ramdisk and requires >= 20000 KB. I like your extra logic to look at filesystem check interval.


Tags: woof