You are not logged in.

#26 2015-07-03 12:37:21

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

liveroot is a mkinitcpio hook. You need to add it to /etc/mkinitcpio.conf. You then activate it on the kernel cmdline.

Offline

#27 2015-07-18 08:56:21

darthearon
Member
Registered: 2014-04-01
Posts: 24

Re: liveroot : Easy LiveBoot

well I meant is there no tutorial or written documentation for how do you liveroot? if there is not and I manage to get it working I would not mind writing up a small guide and posting it on the arch Linux forums.


Cya At The Table

Offline

#28 2015-07-18 12:16:43

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

Well... I am the creator of liveroot, so what are you having issues with?

Offline

#29 2015-07-20 06:19:12

darthearon
Member
Registered: 2014-04-01
Posts: 24

Re: liveroot : Easy LiveBoot

I'm going to have to get back to you on that. I'm still trying to figure out what I'm doing wrong. I cant work with it at the moment as I'm currently overseas with a borrowed laptop. Just backed up my system to a single partition usb so I can but windows back on the laptop before I return it. I will have to go through the process again once I reinstall arch to my laptop.


Cya At The Table

Offline

#30 2015-08-07 07:00:54

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: liveroot : Easy LiveBoot

Yes I would need more of a step by step write up to before I would be confident to try it.


You can like linux without becoming a fanatic!

Offline

#31 2015-08-07 15:09:12

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

  1. Install liveroot (if you have a changing system, use the normal hook).

  2. Add "oroot" to /etc/mkinitcpio.conf hooks() .

  3. Add oroot=<option> in your kernel cmdline:

    • oroot=live               |     load rootfs into zram lzo compressed block. Read/write from zram block

    • oroot=raw               |      use tmpfs for write

    • oroot=compressed  |      use zram lzo compressed block for write

If you want to write back, run overlay_flush. There are also examples in /usr/share/liveroot

Offline

#32 2015-09-21 05:22:00

Chrysostomus
Member
Registered: 2015-09-13
Posts: 64
Website

Re: liveroot : Easy LiveBoot

I installed liveroot and enabled it according to the instructions. However, I don't seem to have function /usr/bin/overlay_flush. How do I make it available?


The difference between reality and fiction is that fiction has to make sense.

Offline

#33 2015-09-21 23:10:56

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

Chrysostomus wrote:

I installed liveroot and enabled it according to the instructions. However, I don't seem to have function /usr/bin/overlay_flush. How do I make it available?

Did you add oroot=<something> to your kernel cmdline?

Offline

#34 2015-09-22 01:18:12

Chrysostomus
Member
Registered: 2015-09-13
Posts: 64
Website

Re: liveroot : Easy LiveBoot

Yes, oroot=compressed. Should I further try other oroot=live or oroot=raw?


The difference between reality and fiction is that fiction has to make sense.

Offline

#35 2015-09-22 02:09:07

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

Chrysostomus wrote:

Yes, oroot=compressed. Should I further try other oroot=live or oroot=raw?

Is oroot added to hooks() in initcpio?

Offline

#36 2015-09-22 05:14:41

Chrysostomus
Member
Registered: 2015-09-13
Posts: 64
Website

Re: liveroot : Easy LiveBoot

It is. Problem vent away when I switched systemd hook to base and udev hooks. Is it possible to get liveroot working with systemd hook?

Last edited by Chrysostomus (2015-09-22 05:22:01)


The difference between reality and fiction is that fiction has to make sense.

Offline

#37 2015-10-19 01:55:35

liangxuliang
Member
Registered: 2010-07-09
Posts: 13

Re: liveroot : Easy LiveBoot

@Bluerider, I install liveboot from aur to my usb key system j,and compile kernel, change hooks and modules in initcpio conf file, seems it works fine. thanks a lot.

But I found there is problem if I try to run some command (like fdisk ...) when I pull out the usb key, I assume that everything should load into ram, that means I could pull out the usb key after the system powered on.

Should I do something or liveboot is not design like I thought ?

Offline

#38 2015-12-02 15:56:52

Schlunze
Member
Registered: 2013-10-03
Posts: 53

Re: liveroot : Easy LiveBoot

Hi,

great, it work so far. I use liveroot to avoid Disk I/O @ my homeserver and last but not least looking forward to a faster user experience. The zram0 image is about 4.6G with all extras i need so far.
My goal is to have a bootstick for the worst case scenario. But there are other usecases for liveroot.
Since there is noting about liveroot on the net i have a couple of questions.

What about critical services like mysqld. What happens exactly during overlay_flush?
Is it possible to flush from another rootfs to usb?
Can the fs grow out of partition limits in ram?
Why getting this systemd-remount-fs.service failure?

Thank you in advandce

Last edited by Schlunze (2015-12-02 19:49:39)

Offline

#39 2016-02-08 21:22:15

ghs
Member
Registered: 2016-02-08
Posts: 2

Re: liveroot : Easy LiveBoot

Schlunze wrote:

[...]
Since there is noting about liveroot on the net i have a couple of questions.

1a. What about critical services like mysqld.
1b. What happens exactly during overlay_flush?
2. Is it possible to flush from another rootfs to usb?
3. Can the fs grow out of partition limits in ram?
4. Why getting this systemd-remount-fs.service failure?

Numbering by me.
I am currently planning on something of the same as you (a live usb rescue stick). I just happened to run into this thread, luckily it looks like the first questions can be easily answered with a little research;

1a. If these services are critical (and writable) for you: DON'T USE A RAM FILESYSTEM.
If it's only/mostly read-access, you should be fine. MySQL/Mariadb do a lot of work to keep your data safe. Storing the the database in RAM says that your data isn't all that critical.
With my apologies for the caps, but this can't be stressed enough imho.


1b. What happens during overlay_flush is exactly:

           rsync -ax --delete --no-whole-file --inplace \\\$PWD/ /run/oroot \\
             --exclude boot --exclude dev \\
             --exclude mnt --exclude proc --exclude run \\
             --exclude sys --exclude tmp --exclude usr/bin/overlay_flush;

(from https://github.com/bluerider/liveroot/b … r/compiler)

2. I don't see why not, as the flush is basically a copy operation.

3. Theoretically: yes. I personally haven't tested this, but as far as I can tell, the overlay is just another filesystem. Do you really have partitions smaller then your RAM?

4. Appears to happen only when you enable the systemd hook in mkinitcpio.conf.


Hope that helps.

Last edited by ghs (2016-02-08 21:24:05)


mvg,
    Guus

Offline

#40 2016-02-08 22:09:57

ghs
Member
Registered: 2016-02-08
Posts: 2

Re: liveroot : Easy LiveBoot

For the btrfs options; how about including support for snapper if it is installed?
This would only kick in during overlay_flush operations on a btrfs root fs, but could be really useful to keep the number of snapshots (and thus the maintenance of the filesystem) low.

Specifically, i'm thinking about building a USB rescue stick which can be updated from time to time.


mvg,
    Guus

Offline

#41 2016-02-26 18:42:19

zimbral
Member
Registered: 2016-02-26
Posts: 4

Re: liveroot : Easy LiveBoot

Have some trouble get the package running.

I did all the steps described, but when I start up the system - Arch kernel version 4.1.3-1 - the system hangs with the following output:

modprobe: FATAL: Module zram not found.
zramctl: no free zram device found.
mount: wrong fs type, ....... after that the system hangs completely.

When I run modprobe zram manually from the shell (booted with a disk configuration) I can generate afterwards a zram disk using zramctl witout any problems.

Is the package not capable of running with my recent kernel ?

I have 6GB of RAM and my root fs is approx 2 GB in size.
Any ideas, what I'm doing wrong ?

Here my Configuration:

a grub.cfg extract
----------------------------
menuentry "ArchLinux ram" {
set root=(hd0,2)
        linux   /boot/vmlinuz-linux root=/dev/disk/by-uuid/420791c7-5259-4169-bbaa-d3f8a4394a76 oroot=live ro quiet splash
        initrd  /boot/initramfs-linux.img
}
---------------------------
the proper oroot scripts reside in /usr/lib/intcpio/hooks and /usr/lib/initcpio/install and have the same permissions as all the other scripts in there

Offline

#42 2016-02-26 20:00:07

zimbral
Member
Registered: 2016-02-26
Posts: 4

Re: liveroot : Easy LiveBoot

Hi all,

finally I got it working.

I think the key thing was, that it is required to run the command "mkinitcpio -p linux" after modifying /etc/mkinitcpio.conf to re-create the initramfs-linux.img that will be loaded at boot time.
@bluerider: Many thanks for this great piece of work. However it took me some hours of struggling with the little documentation spread over different locations.
Imho: If you want this nice package spread more widely, you need to invest time in documentation. I agree to some other users in the forum, a step by step documentation along with a clear description of the concept and some background information would be of much help.

Offline

#43 2016-07-18 21:08:47

taorg
Member
Registered: 2016-07-12
Posts: 6

Re: liveroot : Easy LiveBoot

Hello
I find this work very useful interesting, not just for USB Stick,  I've tested on a embedded devices also and it works great to protect filesystem from power loss.

The only thing a I miss is a way to update grub2.
Once liveroot is activated, overlayFS avoid grub2 upgrades.
And the only way I found to update grub configuration is reboot and manually comment oroot= option.

Is there any remote way to deactivate liveroot to allow system upgrades?

Thank you.

Offline

#44 2016-07-19 04:20:34

zimbral
Member
Registered: 2016-02-26
Posts: 4

Re: liveroot : Easy LiveBoot

Hello Taorg,

anything you change on the live overlay file system can be written back to the source file system by using the "flush_overlay" command.
Just run the command and any update will be written back.

flush_overlay comes along with liveroot

Regards

zimbral

Offline

#45 2016-07-19 04:22:25

zimbral
Member
Registered: 2016-02-26
Posts: 4

Re: liveroot : Easy LiveBoot

Hello taorg,

I meant overlay_flush, not flush_overlay ....

zimbral

Offline

#46 2016-07-19 07:06:39

taorg
Member
Registered: 2016-07-12
Posts: 6

Re: liveroot : Easy LiveBoot

Hello zimbral
Yes sure, you can flush every change you do, but not every program is ready or aware to work with overlayfs.
Here is an example

sudo grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-probe: error: failed to get canonical path of `oroot'.

That's why I would like to switch off liveroot, just for system upgrades, where grub2 config is needed.

Thanks

Offline

#47 2016-07-19 19:00:05

taorg
Member
Registered: 2016-07-12
Posts: 6

Re: liveroot : Easy LiveBoot

Hello again,
I think an easy and clean solution,  could be a command oroot-chroot:
    A chroot to access the oroot lowerFS and execute system maintenance.

It could be nice Bluerider or somebody with sufficient skills would like the idea (Ubuntu distro has similar solution) and add this command.

Thank you very much

Offline

#48 2016-07-27 15:07:16

Bluerider
Member
Registered: 2012-07-22
Posts: 97

Re: liveroot : Easy LiveBoot

taorg wrote:

Hello again,
I think an easy and clean solution,  could be a command oroot-chroot:
    A chroot to access the oroot lowerFS and execute system maintenance.

That's a good idea; I'll look into it. Can folks list out the errors in a single post?

Offline

#49 2016-12-04 12:38:23

raingloom
Member
Registered: 2015-06-17
Posts: 43

Re: liveroot : Easy LiveBoot

Well, the issue #14 struck. My system is dead. Is Bluerider still maintaining this? I'll mark the AUR package as orphan, just in case.

Offline

#50 2016-12-30 13:51:42

raingloom
Member
Registered: 2015-06-17
Posts: 43

Re: liveroot : Easy LiveBoot

Could someone help out with refactoring this, fixing some bugs and adding more documentation? The original author seems to rarely be online so he's not much help, sadly.
I am not as versed in Bash's nuances as I should be for this project so that kinda slows me down, but if someone more experienced could take a look it would be greatly helpful.

Offline

Board footer

Powered by FluxBB