The officially official Devuan Forum!

You are not logged in.

#1 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-12 16:00:24

aluma wrote:

@dev-1-dash-1
Maybe I'm wrong, but there is a mistake in your very first post.

Thank you for trying to help.
But you are wrong indeed.
See post #5 from this thread.
Problem is not in my grub entry, it works exactly as it needs to.

You can try booting the iso from hdd yourself, with or without "apparmor=0" parameter, and report your experiences.

This thread is marked solved for now, will keep an eye out for future versions.

#2 Re: Installation » [SOLVED] Beowulf's debootstrap doesn't contain "daedalus" script » 2022-12-12 01:51:55

ralph.ronnquist wrote:

The name of the link is used to nominate the "suite" being loaded.

Well, that much is obvious indeed.

Let's mark this one solved.

#3 Re: Installation » [SOLVED] Beowulf's debootstrap doesn't contain "daedalus" script » 2022-12-12 00:41:00

ralph.ronnquist wrote:

Note that all Devuan scripts are links to the ceres script. E.g.

/usr/share/debootstrap/scripts/daedalus -> ceres

You'll need to set that.

Thanks for the reply.

Does the actual link name (i.e. "daedalus" in this case) have any effect on the result, or I can just call it "qwiehpjadshflakjhds", link it to ceres, and it will install the same testing/ceres system?

Also, is there any difference between, say, creating a "daedalus" link on my beowulf system, and getting a later (from chimaera) version of debootstrap and using that? I usually use the latter approach.

#4 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 22:22:23

dzz wrote:

? It boots here with or without "apparmor=0" ..

It most certainly doesn't boot here without "apparmor=0". I just tried it again.

I always found "findiso" simpler to configure than "fromiso"..

Irrelevant. Tried both. Makes no difference, unlike apparmor parameter.

menuentry "devuan5 preview" {
	insmod part_gpt
	set isofile='(hd0,gpt7)/devuan_daedalus_5.0.preview_20221022_amd64_desktop-live.iso'
	loopback loop $isofile
	linux (loop)/live/vmlinuz boot=live tzdata=Europe/London locales=en_GB.UTF-8 username=devuan findiso=/devuan_daedalus_5.0.preview_20221022_amd64_desktop-live.iso
	initrd (loop)/live/initrd.img
	}

If you'd like to kick the thread a little bit more, we can try and find the difference that makes the difference. On first glance:
1) You have gpt partition table, I have msdos.
2) I don't have tzdata param

But I consider this "solved" because a real live image, when burned to usb/dvd, will use apparmor=0 param. Thus I am replicating  a real live boot with this, and since it seems to work as intended, case should be closed for now.

#5 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 21:21:26

Adding the boot parameter apparmor=0 allows the system to boot.

In jessie and all the way up to chimaera, this wasn't neccessary, but it is now.

#6 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 18:47:38

Head_on_a_Stick wrote:

EDIT: btw hd1,9 in GRUB translates to /dev/sdb9. hd0,9 would be better but the UUID is the best approach IMO.

Nice try. :-D

I boot from sdb by default (set in bios).
Thus hd1,9 becomes "the other hd". It works for all other distros, I've tested it extensively . Also, like I've said grub can get the the kernel and initrd from within the iso image.
I've tested also the "findiso=$isofile" option, which means, as far as I know, to look thru all partitions looking for iso with the given name.

#7 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 18:43:34

Head_on_a_Stick wrote:

Try

menuentry "devuan5 preview" {
   search.fs_uuid=$uuid
   set isofile="/devuan_daedalus_5.0.preview_20221022_amd64_desktop-live.iso"
   loopback loop ($root)$isofile
   linux (loop)/live/vmlinuz boot=live fromiso=/dev/disk/by-uuid/$uuid$isofile username=devuan
   initrd (loop)/live/initrd.img
}

Replace both $uuid instances with the actual (filesystem) UUID for /dev/sda9.

EDIT: btw hd1,9 in GRUB translates to /dev/sdb9. hd0,9 would be better but the UUID is the best approach IMO.

And why don't you try your own remedy before recommending it to me? :-D

Your approach changes the grub's behaviour, while the problem is clearly happening later. Grub is fine, because it can get the kernel and initrd from within the iso.

As for a workaround, I've already said I have one - just mount the fs manually to alternative location using "break=premount".

Besides, the exact same grub entry (with only the iso filename changed) works for all other devuan's, from jessie to chimaera. So it should work here.

The big question is:
Is there some more serious problem lurking deep beneath the surface, that will rear it's head when we least expect.

#8 Re: Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 18:20:21

Same happens if the partition is xfs.
The volume gets mounted, and then immediately unmounted.

Also: in the beginning, when udev runs detection, the font on-screen doesn't change after the resolution changes, this might indicate that there are problems with udev, if so, that could be the root cause.

#9 Installation » [SOLVED] Beowulf's debootstrap doesn't contain "daedalus" script » 2022-12-11 18:00:59

dev-1-dash-1
Replies: 4

In beowulf official repos, there are 2 versions of debootstrap.
A standard one, and a backported one.
Neither one contains "daedalus" script in "/usr/share/debootstrap/functions".

#10 Installation » [SOLVED] Daedalus live-image - can't boot iso on hd without manual intervention » 2022-12-11 17:48:15

dev-1-dash-1
Replies: 11

Trying to boot the daedalus preview live image.
Live image is on hard drive, on ext3 filesystem.
(Note: not ext4, but ext3.)

grub entry:

menuentry "devuan5 preview" {
            set root="hd1,9"
            set isofile="/devuan_daedalus_5.0.preview_20221022_amd64_desktop-live.iso"
            loopback loop ($root)$isofile
            linux (loop)/live/vmlinuz boot=live fromiso=/dev/sda9$isofile username=devuan
            initrd (loop)/live/initrd.img
        }

The same type of entry works for everything from jessie to chimaera.

On boot, I see can't mount /dev/sda, can't mount /dev/sdb repeated entries,
also I see fs mounted, but then unmounted.

When booting with break=premount and then mounting the partition (sda9, that contains the isos) to an alternative location, say "/alternate_mounts/sda9", and then ^D to continue boot and everything works, I get to desktop. But, it doesn't work without this manual step, always the same error.

To reproduce: just put preview iso on hd, and create grub entry like the one I posted.

#11 Re: Devuan Derivatives » Refracta 11 (Chimaera) XFCE beta isos » 2021-09-14 18:43:43

Try and check the environment variables that are set, before and after lightdm startup.

I had to add something like "export ETC_PROFILE_SOURCED=1" to /etc/profile and "export USER_PROFILE_SOURCED=1" to ~/.profile to find out that lightdm simply doesn't pass --login parameter to the shell it executes to find the root cause of some trouble I've had with it.

Can't think of anything else right now.

#12 Re: Devuan Derivatives » Refracta 11 (Chimaera) XFCE beta isos » 2021-09-13 16:52:02

LightDM can be a bit finicky.

Take a look at these bugs.

https://bugs.debian.org/cgi-bin/bugrepo … bug=636108
https://bugs.debian.org/cgi-bin/bugrepo … bug=752129

On my Beowulf main box, I had to create ~/.xsessionrc file that would source /etc/profile and ~/.profile to work around.

Also, lightdm is likely to just break and refuse to start if there's some gsettings conf value missing, or something equally unimportant and minor happens.

For a live cd, slim is probably better.

ps) When do we get a daedalus script for debootstrap?

edit: typo

#13 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-07 21:31:22

Got it to work by applying the same changes gparted-live people did.

Patching the file

9990-misc-helpers.sh

with the following patch

474a475,481
>   if [ "${fstype}" = "ntfs" ]; then
>       if type ntfs-3g >/dev/null 2>&1; then
>           return 0
>       else
>           return 1
>       fi
>   fi

seems to be enough.

Pro-tip: for a quick test you can avoid rebuilding the initrd by booting the iso with "break=mount" command line parameter, and applying the patch right in the shell.

#14 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-07 13:36:34

fsmithred wrote:

If you try patching 9990-misc-helpers.sh please let me know how it goes. That file already gets patched for refracta2usb, and I could add the ntfs support next time I touch that package.

I've tried patching it myself, but I am unable to boot with a modified initrd which I've reconstructed by myself.

Maybe you can suggest something?

I unpack the beowulf-live initrd with

unmkinitramfs initrd.img /path/to/extracted/initrd-tree

After I've applied some changes, how do I compress it in exactly the same format?
I've tried the following:

find . | cpio -H newc -o > ../initramfs.cpio
cat initramfs.cpio | gzip > initramfs.igz

But boot failed immediately and dropped me to the shell even though I've only added some debug prints.

Do I have to insert the initrd into the iso image itself, or can I simply modify grub entry to load the custom initrd and it should work?

#15 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-07 13:31:53

I've tested the gparted-live-1.0.0-3 live image, which is being discussed in the forum post I've linked at message #8 in this thread.
The url for the actual live image is:
https://sourceforge.net/projects/gparte … o/download

I was able to boot it to desktop from an ntfs partition.

I looked into the initrd, /lib/live/boot directory and ran a diff command between beowulf's files at the same location in the initrd.
There are a number of differences, I'm not posting full diff because most of them don't seem related to ntfs.
However, here's the diff between the 9990-misc-helpers.sh file:

82c82
<   elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$'
---
>   elif echo "${sysfs_path}" | grep -q '^/block/[hsv]d[a-z]$'
474a475,482 
>   # For ntfs, since user space program ntfs-3g will be used. Check ntfs-3g instead of kernel module.
>   if [ "${fstype}" = "ntfs" ]; then
>       if type ntfs-3g >/dev/null 2>&1; then
>           return 0
>       else
>           return 1
>       fi
>   fi
1222c1230
<       if [ "$(cat ${sysblock}/removable)" = "1" ]
---
>       if [ "$(cat ${sysblock}/removable 2>/dev/null)" = "1" ]
1270c1278
<       if [ "$(cat ${sysblock}/removable)" = "0" ]
---
>       if [ "$(cat ${sysblock}/removable 2>/dev/null)" = "0" ]

The second difference looks almost exactly like the post you linked to in message #9 of this thread.

#16 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-07 13:00:10

fsmithred wrote:

I think this post has the magic sauce: https://lists.debian.org/debian-live/20 … 00038.html
That function, is_supported_fs is in /lib/live/boot/9990-misc-helpers.sh

That seems close to the target.
If I have some time and energy in the next few days, maybe I'll try looking into it more. It might be just a few lines of code needed to fix it.

For the moment, we can conclude that it's another feature that has been working for decades but has been cancelled by Debian.
Thus it doesn't block release of beowulf 3.1.

#17 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-06 18:55:16

fsmithred wrote:

Where the hell did ntfs.ko go? On my installed beowulf system, it's missing. Same ntfs packages are installed as in my ascii, which does have ntfs.ko.

Thanks for paying attention and replying, fsmithred. That's why I (and I'm sure many others) use devuan - because of the sensible attitude towards resolving actual issues.

However, in this case:
FALSE ALARM!
I've just tested the debian-live-10.7.0-mate-amd64.iso directrly from debian.

It behaves exactly the same. No ntfs.ko in initramfs. "Warning: unable to mount /dev/sda3" when trying to access iso on ntfs partition.

Therefore: it's a Debian change, and Devuan simply mirrored it, and there's no direct obligation for Devuan team to do anything about it since it isn't connected to *ystemd.

In ascii, apt-file shows that it comes with the kernel. In beowulf, apt-file doesn't find ntfs.ko.

I can see the same results for ascii. I don't have a beowulf system right now near me.

If we were to try:
The simplest way to include ntfs.ko into the initramfs would probably be modifying "/etc/initramfs-tools/modules", but first making sure that the modules themselves are installed on the base system of course. I don't know why they aren't there on beowulf.

Can you tell me how big a partition I would need to install a minimal beowulf 3.1 system from the live image? If I have a partition big enough I can maybe try and find an easy solution.

In the meantime - this isn't a Devuan problem, so it's a non-blocking issue if you are planning to release 3.1.
As I described, the beowulf 3.0 problems with eudev are not present in 3.1, so progress has already been made.

Update:
Debian has dropped the support of ntfs.ko: (see: 29 June 2019: GParted Live 1.0.0-3 Stable Release)
https://gparted.org/news.php?item=224Release

And here people seem to be solving the same problem:
http://gparted-forum.surf4.info/viewtopic.php?pid=35358

#18 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-06 15:43:52

fsmithred wrote:

I don't know what decisions went into using start-stop-daemon. There were a few iterations of the patch, and they all seemed to work.

As it stands now, udev seems to work correctly, so it's not a big deal.
The only "problem" here may be a few microseconds and a few kb of ram temporarily used when starting the "start-stop-daemon" binary itself. I was only pointing this out because I believe any unneccessary "extra layer", even one as simple as start-stop-daemon, should be justified, and, as you know it had already caused some problems in the past.

Again, right now everything seems to work correctly wrt udev, so no problems here.

NTFS: If something is missing, I have no idea what it is. I did not remove any packages and ntfs-3g is installed in the live system. Do you maybe need to load a grub module before loading the kernel?

This is not a grub problem - grub loads the kernel and the initrd into memory from "within" the iso when the iso itself is on an ntfs partition.
The problem appears later, I think, when initrd is parsing the "fromiso=/dev/sda3:/path/to.iso" kernel command line parameter. It tries to mount the iso but fails, because it can not mount ntfs filesystem.
Edit:The full grub entry looks like this (has been working since forever with debian,devuan, ubuntu with some changes):

menuentry 'Devuan Ascii 2.1 Live cd' {
        set root="hd0,3"
        set isofile="/devuan_ascii_2.1_amd64_desktop-live.iso"
        set gfxpayload=keep
        loopback loop ($root)$isofile
        linux   (loop)/live/vmlinuz boot=live username=devuan fromiso=/dev/sda3$isofile
        initrd  (loop)/live/initrd.img
    }

This seems to be an initrd problem, it might be necessary to regenerate it and include the ntfs modules. Here's why I think so:
1) Open/unpack the "devuan_beowulf_3.1.0_2020-11-30_amd64_desktop-live.iso" file.
2) Within it: go to "/live" directory.
3) There is a file "initrd.img"
4) Open/unpack this file (on ascii, use "unmkinitramfs" command)
5) Go to "/lib/modules/4.19.0-13-amd64/kernel/fs" within it.
6) Note there are directories like btrfs, ext4, fat, xfs, but there is no "ntfs" directory
7) Now, inspect the "devuan_ascii_2.1_amd64_desktop-live.iso", for example, and see that "ntfs" directory is there. (obviously the path is a bit different due to different kernel version, "/lib/modules/4.9.0-11-amd64/kernel/fs". That one loads the iso from ntfs partition just fine.

Also, when unpacking the initrd from ascii 2.1 live iso when using "unmkinitramfs", we get two directories - "early" and "main", "early" contains processor microcode, "main" contains the initrd tree itself. That means there are basically two (2) archives in the initrd itself.

Shouldn't the "beowulf-3.1" initrd also include processor microcode?
Note: I am using the ascii "unmkinitramfs" script to unpack a "beowulf" initrd, that may be a source of the problem.

Please doublecheck.

acpi-fakekey is still there because I didn't think to remove it. I will do so in the rebuild.

Again, it doesn't cause problems, it's simply not needed if udev has done all the work wrt detecting mouse/kbd/sound etc. As I've said, udev seems to be working correctly.
However acpi-fakekey may be needed on the live image itself, if perhaps, something fails on an unusual configuration. Having an extra layer of reliability is not a bad idea for livecd.
But perhaps you can exclude it from the system which will be installed to hdd itself.

#19 Re: News & Announcements » Testing for beowulf 3.1 point release » 2020-12-05 18:54:36

Testing the amd64 live-iso.

Burned to physical dvd.

Udev seems fine, all modules loaded on first try (with or without "toram").
Network cards and sound working -  the system even detected which output I had plugged and set default output accordingly. This is even more than I expected - usually some tweaking is needed on my setup to select the correct output. Very good.
Switching betweet manual/dhcp, as well as lan/wi-fi using wicd - all ok.
Cryptsetup, lvm work ok.
Added backports (with contrib and non-free sections), built zfs-dkms modules, imported the pools - all ok.
Used "dkms mkbmdeb" to pack the zfs modules into a deb, rebooted and installed the deb to avoid recompile of zfs modules - all ok.

Module count, as indicated by "lsmod | wc -l" is the same w/ or wo/ "toram" parameter.

Problem:
Trying to load the iso from hd through grub entry failed:
"Warning: can not mount /dev/sda3".
That's an ntfs partition where I've placed the iso, and, as I suspected, the ntfs modules are missing from /live/boot.img.
Deliberate policy or accidental omission? I hope the latter.
I used to be able to boot debian/devuan/ubuntu and many others from ntfs partitions like this.
When placing the iso to an ext4 partition, the boot proceeds normally.

Minor issues:
1)Incosistent formatting wrt tabs/spaces in "/etc/init.d/eudev" between start) and other) sections. Has no run-time effect.
2)Usage of "start-stop-daemon" to start eudev is not neccessary. It doesn't do any damage in this configuration, but it's still not needed. Udev will be perfectly fine when started as "udevd --daemon" - the way it was in jessie/ascii, unless I am mistaken.
3)acpi-fakekeyd: not neccessary anymore since eudev startup seems to be in order. May be used as a fail-safe for live-cd, but maybe consider adding it to exclude list, if possible, for the actual refracta-install process. Some people have complained that system installed from live-image uses a bit more resources - it's not much, and does no harm, but acpi-fakekey may be one of the reasons.

Other than that, live-image seems very good.

Keep Devuan rock-solid.

#20 Re: Devuan Derivatives » Can live isos be burned to optical media? » 2020-06-18 20:11:21

fsmithred wrote:

Put the sleep after start-stop-daemon and right before 'udevadm trigger --action=add'.

Confirming: adding sleep 3 between start-stop-daemon and udevadm trigger --action=add allows to boot livecd with no problem.

Update:
The bug report contains a proposition to try to run start-stop-daemon without --background, but using --daemon argument. That means adding --daemon to the end of start-stop-daemon line, and it will be passed to eudev. I think I've tried that right before the beowulf release, but that didn't seem to work.

#21 Re: News & Announcements » Beowulf Beta is here! » 2020-06-01 17:27:38

Just tested the beowulf hd-media installer located at
https://pkgmaster.devuan.org/devuan/dis … /hd-media/

The gtk installer doesn't boot, enters in a loop throwing xserver errors.
Fixed by specifying 'vga=788' at  the boot command line.

When using expert install, both gtk and text installers will, after detecting the iso, say something like:
'FIXME' iso mounted. The iso 'devuan-beowulf-..blah...iso' mounted at /dev/sda1 (FIXME).

So that's 2 FIXME entries somewhere.

Tested with beowulf dvd install image.

Other than that both text and gtk installers seem to work fine.

#22 Re: Devuan Derivatives » Can live isos be burned to optical media? » 2020-05-30 16:01:46

fsmithred wrote:

(using refracta10-beta5)

So what exactly is refracta-beta5 ?
There were so many of them I am getting confused.

#23 Re: Devuan Derivatives » Can live isos be burned to optical media? » 2020-05-29 22:59:50

fsmithred wrote:

Right now, I'm leaning toward doing the easiest workaround to get beowulf out the door.

I agree, that should be the top priority.
Especially since the beowulf packages have been ready for some time, and beowulf systems themselves seem to run fine.

Jessie is really getting a bit long in the tooth, time to migrate.

Also:
I checked the ascii 2.1 live dvd, which always worked ok for me. It starts eudev as udevd --daemon.

Last thing: please confirm that my fix works on your machine, not only on mine.

#24 Re: Devuan Derivatives » Can live isos be burned to optical media? » 2020-05-29 20:10:18

fsmithred wrote:

Made another refracta iso and set udev.conf log level to debug.

I've already managed to build my own "beowulf live mate edition" iso using refractasnapshot.
It works and behaves the same as refracta/beowulf rc with regards to eudev/modules.

TLDR:
Udev works when started as udevd -d, but doesn't work when wrapped with start-stop-daemon.

In more detail:
When booting, take a look at the messages early on. When displaying "waiting for /dev to be fully populated" there's a message: settle: could not connect to daemon.
When booting to runlevel 1, and looking at the running processes we see udev isn't there. There's also an orphaned pid file left, as well as /run/omitsigs.... link to it.

It probably means that udevd dies/gets killed early on before it finishes detecting everything.

The simplest way to restart eudev is:

udevd -d
udevadm trigger --action=add

Doing service eudev stop is not needed because there is simply nothing to stop, it isn't there.
Doing service eudev restart doesn't help because even if does start the daemon (I am not sure it does), it doesn't call udevadm trigger --action=add.

After tinkering with init script a bit, I decided to replace the start-stop-daemon invocation of eudev with a simple udevd -d invocation. I've burnt a live cd with this version of eudev init script, and it seems to work flawlessly without any other workaround. (I am still testing this).

The start-stop-daemon is needed to grab udevd's pid and write a pid file. Also a link is placed to /run/sendsigs... to prevent sendsigs
from killing udev earlier than needed. As specified in the comments of eudev init script, this is related to debian #791944.
Take a look at this thread here:
https://bugs.debian.org/cgi-bin/bugrepo … bug=791944
It's also related to delays on shutdown when unmounting encrypted stuff.

All of this is probably unneccessary on the live cd, and even if it is, we can just try to manually grab the pid of udevd and create the pid file and sendsigs.omit link ourselves without using start-stop-daemon.

edit:typo

#25 Re: Devuan Derivatives » Can live isos be burned to optical media? » 2020-05-29 18:20:05

Try the following:

Edit /etc/init.d/eudev startup script.

In the start) section, comment out the start-stop-daemon command, along with the enclosing if statement and add
the following line below it: udevd -d.

It should look like this:

    # clean up parts of the database created by the initramfs udev
    udevadm info --cleanup-db
   
    # set the SELinux context for devices created in the initramfs
    [ -x /sbin/restorecon ] && /sbin/restorecon -R /dev
  
    log_daemon_msg "Starting $DESC" "$NAME"

#   Commented out code is below this line

#    if start-stop-daemon --start $NAME --user root --quiet \
#      --pidfile $PIDFILE --exec $DAEMON --background --make-pidfile; then
#      # prevent udevd to be killed by sendsigs (see #261 & DEBIAN #791944)
#      mkdir -p $OMITDIR/$NAME
#      ln -sf $PIDFILE $OMITDIR/$NAME
#<----->  log_end_msg $?
#    else
#<----->log_warning_msg $?
#<----->log_warning_msg "Waiting 15 seconds and trying to continue anyway"
#<----->sleep 15
#    fi

#   Commented out code is above this line

#   Inserted code is below this line
    udevd -d
#   Inserted code is above this line

    log_action_begin_msg "Synthesizing the initial hotplug events"
    if udevadm trigger --action=add; then
<------>log_action_end_msg $?
    else
<------>log_action_end_msg $?
    fi

Board footer

Forum Software