You are not logged in.

#26 2011-05-27 20:12:05

BasT
Member
Registered: 2010-08-28
Posts: 117

Re: geninit - fast and familiar initramfs creation

I see, so it's not that. The error at startup is "error: unexpectedly disconnected from boot status daemon". Any ideas what might have gone wrong?

#!/bin/bash
build() {
    #add_device /dev/fb0 c 29 0
    add_dir /dev/pts
    add_dir /usr/share/plymouth/themes
    
    DATADIR="/usr/share"
    PLYMOUTH_LOGO_FILE="$DATADIR/plymouth/arch-logo.png"
    PLYMOUTH_THEME_NAME="$(/usr/sbin/plymouth-set-default-theme)"
    PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')"
    PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
    
    add_binary /sbin/plymouthd /bin/plymouthd
    add_binary /bin/plymouth
    
    add_file ${DATADIR}/plymouth/themes/text/text.plymouth
    add_binary ${PLYMOUTH_PLUGIN_PATH}/text.so
    add_file ${DATADIR}/plymouth/themes/details/details.plymouth
    add_binary ${PLYMOUTH_PLUGIN_PATH}/details.so
    
    
    add_file "$PLYMOUTH_LOGO_FILE"
    add_file /etc/system-release /etc/system-release
    add_file /etc/plymouth/plymouthd.conf
    
    if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
        echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
        exit 1
    fi

    add_binary ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so

    add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/drm.so
    add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/x11.so
    add_binary ${PLYMOUTH_PLUGIN_PATH}/renderers/frame-buffer.so
    
    if [ -d ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME} ]; then
        for x in ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/* ; do
        [ ! -f "$x" ] && break
        add_file $x
        done
    fi
    
    # suppress a warning in glib (which the label control uses)
    # about uid 0 by building a dummy NSS stack (LP #649917)
    add_file /etc/passwd
    add_file /etc/nsswitch.conf
    add_binary "$(readlink -e /lib/libnss_files.so.2)"
    add_file /lib/libnss_files.so.2
    
    use_hookscript
}

helpmsg() {
    cat<<HELPEOF
    This hook includes plymouth in the initramfs image.
HELPEOF
}

Offline

#27 2011-05-29 18:06:48

Barthalion
Forum Fellow
From: Poland
Registered: 2010-02-26
Posts: 111

Re: geninit - fast and familiar initramfs creation

What about fbsplash? I can't get it working.

Offline

#28 2011-05-29 18:08:51

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

I really have no interest in boot splashes, as I value my boot messages. You're on your own, especially if you're just going to say it doesnt work.

Offline

#29 2011-06-01 20:52:50

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: geninit - fast and familiar initramfs creation

Tested with syslinux, btrfs, lzop and it works fine. It even is damn fast ! However, I've got warnings when using your preset :

[22:47 root /home] geninit -p kernel26
==> Building image from preset: kernel26-default
  -> -k /boot/vmlinuz26 -c /etc/geninit.conf -g /boot/initramfs-ARCH 
==> Starting build: 2.6.38-ARCH
  -> Building: [base]
  -> Building: [udev]
  -> Building: [autodetect]
  -> Building: [ata]
  -> Building: [scsi]
  -> Building: [btrfs]
  -> Building: [filesystems]
==> Generating module dependencies
==> Creating lzop initramfs: /boot/initramfs-ARCH
7515 blocks
==> WARNING: Errors were encountered during creation. The image may not be complete.

==> Building image from preset: kernel26-failsafe
  -> -k /boot/vmlinuz26 -c /etc/geninit.conf -g /boot/initramfs-ARCH-failsafe -S autodetect
==> Starting build: 2.6.38-ARCH
  -> Building: [base]
  -> Building: [udev]
  -> Building: [ata]
  -> Building: [scsi]
  -> Building: [btrfs]
  -> Building: [filesystems]
==> Generating module dependencies
==> Creating lzop initramfs: /boot/initramfs-ARCH-failsafe
20839 blocks
==> WARNING: Errors were encountered during creation. The image may not be complete.

Where can I check for a more complete explanation on what went wrong ?

Offline

#30 2011-06-01 21:04:13

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

Huh. That's interesting... Something is tripping an error but not giving (seemingly benign) output. I also can't reproduce it against a stock 2.6.39 kernel. It's going to be exceedingly noisy, but I'd say run:

# export PS4='+$BASH_SOURCE[$LINENO]:'; bash -x geninit -g foo.img

Look for a '++errors' statement. You could also feel free to dump this to a file and pastie it somewhere and I'll sort through it. Thanks for testing.

Offline

#31 2011-06-01 21:20:08

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: geninit - fast and familiar initramfs creation

Here, errors++ can be found at line 540

Offline

#32 2011-06-01 22:00:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

Ahh, so it's the module quirks. crc32c is already added and error 17 is returned. Did you have this explicitly added in the modules array?

In any event, I'll make that EEXIST return non-errortastic. Thanks!

Offline

#33 2011-06-01 22:08:56

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: geninit - fast and familiar initramfs creation

Did you have this explicitly added in the modules array?

I just copy/pasted mkinitcpio.conf stuff. I think the installer added the module, I never used crypto on my disk...
Anyway, thank you for your help, I hope your project will be full-featured soon ! That way geninit could become the default option wink

Offline

#34 2011-06-01 23:32:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

crc32c is used by btrfs. Anyways, it'd be nice if you could post the full config so I can try to recreate this -- i'd like to be able to build a test framework based on config files at some point.

Last edited by falconindy (2011-06-02 00:38:58)

Offline

#35 2011-06-02 16:52:34

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: geninit - fast and familiar initramfs creation

mkinitcpio.conf
geninit.conf

Something else, my extlinux.conf has the following argument in the boot line : rootflags=rw
In the man page I can read : "Do not attempt to pass flags such as "rw" or "relatime" here."
Booting with the flag works fine with mkinitcpio but fail with geninit. Can you make it smoother ? Maybe ignore the flag, put a warning and mount ro ?

Offline

#36 2011-06-02 17:03:26

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

I'd rather ask you why you opt to mount your root as rw right away. It's a poor idea that leads to the partition never being fsck'd. If you desperately want to mount the drive rw, just pass 'rw' as a separate argument, independent of rootflags. I could parse this field and make it a bit friendlier, but I really don't see the need. While root is mounted RO, the filesystem non-specific flags don't really matter. When root is remounted rw, flags are taken from /etc/fstab and root is mounted properly.

Thanks for posting the configs -- it answers my earlier question regarding crc32c being in your modules array.

update: fixed

Last edited by falconindy (2011-06-02 18:14:39)

Offline

#37 2011-06-07 00:41:51

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: geninit - fast and familiar initramfs creation

I'll be merging most of the awesomeness here into mkinitcpio. I deem this experiment a great success.

https://github.com/falconindy/mkinitcpio/tree/working

Last edited by falconindy (2011-06-11 22:29:42)

Offline

Board footer

Powered by FluxBB