Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemback on arch Linux with no systemd #14

Open
drmarwat opened this issue May 6, 2023 · 34 comments
Open

systemback on arch Linux with no systemd #14

drmarwat opened this issue May 6, 2023 · 34 comments
Labels
bug Something isn't working

Comments

@drmarwat
Copy link

drmarwat commented May 6, 2023

Just for a test tried systemback on joborun and it gives this error ( joborun uses arch Linux with runit ) Image generation successful
An error occured while creating the following directory
"/media"

Exact same error was popped out on Spark ( Spark uses sinit instead of systemd ) but did not see this error when I used it on my arch Linux , on arch Linux it created live bootable and installable iso successfully.

Any idea what this error means ? How come same error only shows on joborun and Spark but not on native arch Linux ?

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

I'm so sorry about this

I'm not so good at C++ and I was making this port for myself so it seems very buggy
right now I'm not able to be working on this project yet, so sorry about that

I'mma work out to fix this problem as soon as I have time. Thank you for your bug report!

If you have any ideas or patches, I'm willing to receive your pull request(s)

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

Currently this works with systemd, openrc and runit

@shadichy shadichy added the bug Something isn't working label May 7, 2023
@drmarwat
Copy link
Author

drmarwat commented May 7, 2023

I fixed this issue by manually creating a " /run/media " manually and the ISO was created successfully and boots normally but then another issue arises

Grub even shows special line for booting runit but when the ISO boots it complains that it can't find that line init=/usr/bin/runit-it

Now I don't know where to look for how systemback deals with grub , checked all it's configuration files but couldn't find where the settings deal with grub settings

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

can i have images/screenshots or something similar (log, file grub.cfg of the newly created iso, package list, runit file list)?

@drmarwat
Copy link
Author

drmarwat commented May 7, 2023

Yes sure my email address is [email protected]
Please drop me an email I will send you screenshots etc , sorry I don't know how to attach files here to a comment

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

[email protected]

Thanks for your information!

@drmarwat
Copy link
Author

drmarwat commented May 7, 2023

To be precise , I tested your packages with native arch , Manjaro , Joborun ( arch+runit) and Spark ( sinit ) .
It works perfectly on former two but gives exact same error on later two with different init system other than systemd

@drmarwat
Copy link
Author

drmarwat commented May 7, 2023 via email

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

Thank you for your workaround!

@drmarwat
Copy link
Author

drmarwat commented May 7, 2023

The fix number 2 above apparently doesn't work
Main issue is difference of /usr/sbin/ on arch Linux to which systemback points but on joborun it's /usr/bin/ where runit-it init resides to which systemback doesn't point when booting from live ISO so the issue arises
Some additional command in systemback settings need to be inserted which makes it enabled to see if init is residing in /usr/bin or /usr/sbin and then make ISO accordingly then systemback will be able to make a bootable ISO

@shadichy
Copy link
Owner

shadichy commented May 7, 2023

guess i should use PID 1 for init=...

@drmarwat
Copy link
Author

drmarwat commented May 7, 2023

You are right , I did some messing around and I get a terminal out that init : must be run as PID 1
But I'm not sure how to do that

@fungilife
Copy link

Hello, pid1 for runit is runit-init, and it can't run later, it must be pid1. This is where you get this error, as if you are trying to run runit-init after something else was executed. In joborun the init link of runit is ommited to accomodate an easy addition of s6/66 so you can boot either.
For s6 things are different, because the same program that is pid1 is also the supervisor of services, modules, instances, etc. So different init systems have different . So s6-svscan can run many many times without being pid1.
I have booted runit, chroot to another system, have s6 supervise services in that chroot, or have a main system just boot, then the host do everything else.

I wish you would experiment with limine, which is great for live systems as it handles both bios and uefi with the same setup and config file. Very simple to edit and customize the bootloader menu, and I am told by void users it is 100% reliable with any setup and live booting.

systemd had to stick its dirty fingers into bootloading as well ... and things will keep getting messier and messier for all of us.

@drmarwat
Copy link
Author

drmarwat commented May 8, 2023

The whole issue is that of /usr/bin and /usr/sbin/

On Spark /usr/bin points to /usr/sbin so the ISO got created without any issue just like arch Linux

@drmarwat
Copy link
Author

drmarwat commented May 8, 2023

How much are these packages different from yours ?

https://sourceforge.net/projects/systemback-2021/files/Systemback%202%20-%20Arch%20Linux/

Ok I checked these , this guy has inserted two shareware packages into his package so it's a useless package because in the packages in the above link when you try to make a backup systemback complains of two HOOKS missing and those are only available in the systemback packages available on his website for sale including his source packages

@shadichy
Copy link
Owner

shadichy commented May 9, 2023

How much are these packages different from yours ?

https://sourceforge.net/projects/systemback-2021/files/Systemback%202%20-%20Arch%20Linux/

I don't know in detail as I don't have any of the source code of that link
Mine use mkinitcpio boot hooks from TeArch Linux and modify the source a little bit in order to be able to run on my machine
It still remains buggy, but at least there were successful cases
One is when I managed to create an iso of PearOS 32bit using my version and it booted up successfully, and I managed to install it using my ported installer without problem on a VM (yes it's available for archlinux32, will manage to compile it on arm)

@shadichy
Copy link
Owner

shadichy commented May 9, 2023

And I'll find a way to trim the package down and use make instead of Debian build tools

@drmarwat
Copy link
Author

How much working directory space is required to make an ISO?
I have 9 GB space left and it failed to make ISO because of lack of space .
I tried to change location to a big NTFS partition but systemback does not accept that

What to do ?

@drmarwat
Copy link
Author

Ok I managed to create a 5.4 GB size ISO , if you are interested I can post the whole method how I did it , shall be helpful for others

@shadichy
Copy link
Owner

Ok I managed to create a 5.4 GB size ISO , if you are interested I can post the whole method how I did it , shall be helpful for others

It seems to be making large disk image files. Maybe because your system or your /home or /var is too large or some of your configs made them that big
Would you mind sharing the method you used? As far as I know, systemback (original) does not allow making ISO larger than 4GB, and your method can be helpful

@shadichy
Copy link
Owner

shadichy commented Jul 1, 2023

@drmarwat try again please

@drmarwat
Copy link
Author

drmarwat commented Jul 2, 2023

I made 6 GB native Arch Linux iso successfully and installed it without any issue.

But with 66 or runit the iso fails to make or then fails to boot so I guess it won't work with arch Linux with no systemd

@drmarwat
Copy link
Author

drmarwat commented Jul 2, 2023

Sorry forgot to mention to make a bigger iso change path of creating iso to another partition formatted as ext4 and systemback will create iso in that empty partition.

In case it only creates sblive and not an ISO there is a manual method to create an ISO from .sblive , will post that tomorrow.

I would say at this stage your systemback binaries are working fine for native Arch with systemd and if you try to make it with arch Linux nonsydtemd you might break your working binaries

@shadichy
Copy link
Owner

shadichy commented Jul 3, 2023

I would say at this stage your systemback binaries are working fine for native Arch with systemd and if you try to make it with arch Linux nonsydtemd you might break your working binaries

managed to fix up all the non-systemd related problem just 2 days ago

@shadichy
Copy link
Owner

shadichy commented Jul 3, 2023

@drmarwat you can try recompiling from source

@drmarwat
Copy link
Author

drmarwat commented Jul 3, 2023

@shadichy I just tried making an ISO from Joborun ( Arch Linux with no systemd but rather 66 init system and I get thrses errors
The Live system creation is aborted! An error occurred while creating the container file

Terminal shows this error

systemback

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
==> Starting build: '5.10.182-01-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
-> Running build hook: [live_hook]
_ _
| | | |
| |__ _ __ _ | |_
| '_ | '| | | | '_ \
| |) | | | || | | | |
|_.
/|| _,|| |_|
==> WARNING: Possibly missing firmware for module: 'isight_firmware'
==> Generating module dependencies
==> Creating xz-compressed initcpio image: '/home/.sblivesystemcreate/boot/initramfs-linux-lts.img'
==> Image generation successful

An error occurred while executing the following command:

tar -cf "/home"/joborun-live.sblive -C "/home"/.sblivesystemcreate .

Exit code: 2

Please note that with Arch Linux systemd no such error is seen and an ISO is made smoothly.

There is something in Joborun settings that is incompatible with systemback

@fungilife please have a look .

@shadichy
Copy link
Owner

shadichy commented Jul 4, 2023

Tar exit code 2 means it's your (filesystem) fault

@shadichy
Copy link
Owner

shadichy commented Jul 4, 2023

It means the program cannot create sblive tarball on your filesystem

@shadichy
Copy link
Owner

shadichy commented Jul 4, 2023

On artix it works pretty well

@shadichy
Copy link
Owner

shadichy commented Jul 4, 2023

Also on archlinux32

@drmarwat
Copy link
Author

drmarwat commented Jul 4, 2023 via email

@fungilife
Copy link

It is very hard, if possible, to address an "issue" without being able to focus, remain on "one" environment, and provide adequate output.
The only output you provide are kernel "warnings" which are normal for when you don't have linux-firmware installed.

Then as shadichy points out the "error" is on tar command is a generic filesystem error.

Elsewhere you mention ntfs, which for storing data, txt,pics, etc.. may be ok, but don't expect linux to work on ntfs. Very different system where rights and ownership are only managed by MSwin executables and are all screwed up when they go from ext to ntfs or reverse.

A filesystem error can also be due to lack of space. Here we are dealing with various errors on various attempts on various systems and in a variety of ways.

No matter what you use to make an iso/img you have to decide first what the object is, what will go with it and what without. If you have 2TB of /var/cache/pacman/pkg and you don't have mounted in another partition and is included in the / system it will be in the iso. If your /home is not mounted separately and it is part of / it will go as well, and if it is not it should be mounted in the target before you begin (ie /mnt is the target /mnt/home should be where that other partition should be mounted).

If you are using /home/user/iso as the place where the img will be written first you have to realize the limits of space and that whether the software is smart enough to exclude this directory in the img or try to include itself endlessly multiplying the space till the partition is full.

1 Target object of system you want to make iso of
2 Where will the workarea and image stored
3 What is the system making the image, is it the same as 1 or a 2nd system
4 systemback requires polkit ... which logind is using this polkit? consolekit2, elogind, systemd, seatd, ...?

Spark, arch, and artix all use the same mechanism, obarun and joborun don't, they have consolekit2 and seatd as replacement.

@drmarwat
Copy link
Author

drmarwat commented Jul 6, 2023 via email

@shadichy
Copy link
Owner

shadichy commented Jul 7, 2023

Spark, arch, and artix all use the same mechanism, obarun and joborun don't, they have consolekit2 and seatd as replacement.

It's not about polkit, you can run it with sudo

No matter what you use to make an iso/img you have to decide first what the object is, what will go with it and what without. If you have 2TB of /var/cache/pacman/pkg and you don't have mounted in another partition and is included in the / system it will be in the iso. If your /home is not mounted separately and it is part of / it will go as well, and if it is not it should be mounted in the target before you begin (ie /mnt is the target /mnt/home should be where that other partition should be mounted).

/var is excluded by default

the problem may be @drmarwat 's /home doesn't have enough space to create the iso (or the file system is corrupted)

also, note that this is my systemback port, I'm not the original developer of this piece of software, and bugs are expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants