View previous topic :: View next topic |
Author |
Message |
wjb l33t
Joined: 10 Jul 2005 Posts: 631 Location: Fife, Scotland
|
Posted: Mon Mar 22, 2021 1:26 pm Post subject: |
|
|
If you don't need to persist anything, you could boot direct into an iso image, a bit like using a Live CD.
e.g. this is how I have SystemRescueCD running from my grub menu:
Code: |
menuentry "System Rescue ISO (64-bit)" {
set isofile="/root/sysrescue/systemrescuecd-x86-5.3.2.iso"
search --label --set loc rootfs
loopback loop ($loc)$isofile
linux (loop)/isolinux/rescue64 copytoram setkmap=uk isoloop=$isofile pci=noaer
initrd (loop)/isolinux/initram.igz
}
|
"rootfs" is the label of the partition where /root lives, and the "linux" line sets up the particular boot parameters I want. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Tue Mar 30, 2021 7:01 am Post subject: |
|
|
mounty1 wrote: | Thanks for all the replies but I didn't make clear some details of the application.
The device is this which we buy in bulk for about AU$200 each. They are installed in staff accommodation in remote mine camps and the users are FIFO (fly in, fly out) miners who just wanna watch their programming OK. They are fitted behind the TV set and there's no space for a UPS and bearing in mind that these rooms can easily reach 50 degrees Celcius in the daytime, a UPS with its attendant risk of battery leakage (however slight) is a non-starter. There's also the matter of how you mount a relatively heavy and bulky UPS on the wall behind the TV. The PC has a 12 V 3 A power pack so it can theoretically draw 36 W although typically I suppose 20 W. When we install, we are doing so in the 100s or even 1000s so every cost item, including the technician's time in each room, has to be factored-in.
Even a capacitative UPS is a significant complication as we'd need one we could fit inline with the power pack, i.e., has the same coaxial power connections as the PC.
As for power loss, that's out of our control and is just a feature of these remote locations. We have to live with it. |
The best way is not to have a root file system, just look at openwrt, or in your case at (open|libre|core)elec, the rootfs is on a squashfs, only the storage partition is writable. The most resistant fs is FAT it is so stupid simple that files might be lost data consistency is not guaranteed but it survives anything. _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
PlatinumTrinity Tux's lil' helper
Joined: 10 Mar 2020 Posts: 100
|
Posted: Tue Mar 30, 2021 10:13 am Post subject: |
|
|
I was thinking about this today and I realized that over the years I've never lost data to power loss. I live in a place with a pretty unstable power grid. I usually went with the default file system for whatever OS I was using: FAT, NTFS, ext2/3/4, a few others. I never had any issue with it losing data or not being able to recover the data. Even the OS would boot most of the time.
Maybe I'm lucky. For most of my life the only thing between the grid and my PC was a cheap $10 power strip from Wal-Mart.
I know people have more important data than me and systems that need to be up all of the time. I'm not saying UPS and some bullet proof set-up for file storage isn't a good thing. For a home PC it seems like overkill for most people to worry about it. You should have backups of important stuff anyway. |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3698 Location: Rasi, Finland
|
Posted: Tue Mar 30, 2021 10:31 am Post subject: |
|
|
Yes. But OP needed a software solution. No extra hardware at all. The main priority is that the system should be able to recover from hard poweroffs during next boot.
Which gives me an idea...
mounty1: If it's possible to modify the initramfs so that before mounting real root a process would check if the filesystem was not umnounted properly. And if not then display a BIG FAT NOTICE about how to power off the device properly, while in the background run checks to the fs. You could even add a fake delay there so that users of the devices would understand they powered it off the wrong way and also mention them to power the devices off proper way and not leaving them on 24/7 because of the bad "power grid".
Also inside initramfs you have the opportunity to reflash the real root partition if the fs there was too corrupted from the last hard power off.
Still updates to the system (or root image) are the sore point of this. _________________ ..: Zucca :..
My gentoo installs: | init=/sbin/openrc-init
-systemd -logind -elogind seatd |
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|