The officially official Devuan Forum!

You are not logged in.

#1 2018-06-13 12:01:48

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

extlinux install from Devuan ASCII installer shell.

I am trying to figure out how to install extlinux from the Devuan ASCII installer shell, as Devuan is the last system in a triple boot system (Slackware 64 14.2, Win7 and Devuan). Unfortunately, the following method that I used for Slackware is kicking up an error:

# chroot /mnt /bin/bash
# . /etc/profile 
# mkdir -p /boot/extlinux
# extlinux --install /boot/extlinux
# dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
# chroot /mnt /bin/bash
chroot: can't execute '/bin/bash/sh': No such file or directory

Any ideas?

Last edited by devuan_dk_fan (2018-06-13 12:17:10)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#2 2018-06-13 12:30:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 927  

Re: extlinux install from Devuan ASCII installer shell.

Here are my notes on installing extlinux (after installation of the system)

To do it from within the installer, alt-F2 to get to a console.

chroot /target

Then you should be able to install extlinux.

Note: you must choose one of the expert installs to prevent grub from being installed.

Offline

#3 2018-06-13 12:39:14

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: extlinux install from Devuan ASCII installer shell.

That's indeed weird. I have no idea how chroot ends up trying to execute /bin/bash/sh. I've played around with busybox's chroot a bit and couldn't find a way to make it print anything but what was passed on the commandline. Out of pure curiousity: Could you try /bin/sh instead of /bin/bash and see what happens? Also does /mnt/bin/bash actually exist? If so is there anything special about it like it being a symlink or something like that?

Edit: fsmithred ninja'd me and probably has more of an idea what he's talking about than i do.

Last edited by devuser (2018-06-13 12:40:40)

Offline

#4 2018-06-13 13:34:30

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

fsmithred wrote:

Here are my notes on installing extlinux (after installation of the system)

To do it from within the installer, alt-F2 to get to a console.

chroot /target

Then you should be able to install extlinux.

Note: you must choose one of the expert installs to prevent grub from being installed.

Actually, it seems that I avoided installing GRUB in the normal install. On the second prompt, I exited to the install menu.

# extlinux --install /boot/extlinux

doesn't work. I get the error:

# extlinux --install /boot/extlinux
/bin/sh: 3: extlinux: not found

----
OK, I think I know where I went wrong. I should have done the following?

# chroot /target /bin/bash
# . /etc/profile 
# mkdir -p /boot/extlinux

Still a problem however:

# extlinux --install /boot/extlinux
bash: extlinux: command not found

Last edited by devuan_dk_fan (2018-06-13 14:41:07)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#5 2018-06-13 15:07:33

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

Here are all of the steps when using Devuan as the only Linux distro, in a single boot or dual boot situation with Win:

To install extlinux from within the installer, alt-F2 to get to a console.

# chroot /target /bin/bash
# . /etc/profile 
# mkdir -p /boot/extlinux
# nano /etc/apt/sources_list # comment out CD/DVD/USB source
# apt-get install extlinux syslinux-common
# extlinux --install /boot/extlinux
# dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sdX bs=440 count=1
# cp /usr/lib/syslinux/modules/bios/*.c32 /boot/extlinux
# nano /boot/extlinux/extlinux.conf
Code:
	ui menu.c32

	label devuan
	menu label devuan
	kernel /vmlinuz
	append initrd=/initrd.img ro root=/dev/sda1

Remember to set the proper partition as bootable!

In a triple boot scenario, I believe that it is enough to do the following, if extlinux is already installed with another Linux distro:

To install extlinux from within the installer, alt-F2 to get to a console.

# chroot /target /bin/bash
# . /etc/profile 
# mkdir -p /boot/extlinux
# nano /etc/apt/sources_list # comment out CD/DVD/USB source
# apt-get install extlinux syslinux-common
# extlinux --install /boot/extlinux
# dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sdX bs=440 count=1

Last edited by devuan_dk_fan (2018-06-13 17:46:02)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#6 2018-06-13 15:18:01

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

Regarding the ASCII "expert" installer, I personally am of the opinion that it has gotten too complicated. I assume that this is something that Debian has decided, but I don't recognize half of the options any more, and for some weird reason, it appears that a choice of login managers is only available with LXQT. Being a happy WM switcher, depending on my workflow (XFCE/i3) the current situation is a nightmare as SLIM or SLiM is no longer developed, and provides no functional, practical means by which it is possible to easily switch between window managers.

Last edited by devuan_dk_fan (2018-06-13 15:24:42)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#7 2018-06-13 21:17:07

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

@ fsmithred It looks like you are right about GRUB getting installed. I thought I avoided it by not specifying a location and then pressing the "go back" button. Unfortunately, the "expert" install sane defaults don't work either, as the install fails. I will have to take a look at this again tomorrow.


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#8 2018-06-13 23:23:12

fsmithred
Administrator
Registered: 2016-11-25
Posts: 927  

Re: extlinux install from Devuan ASCII installer shell.

If it's already dual boot and you're adding another OS, couldn't you just make a new entry in the existing boot menu?

You could let it install grub and then switch to extlinux. When I did that, it was easy. I didn't set it up for multiple systems, but I do use syslinux on multiboot live-usb frequently, but those are all on the same partition. I'm not sure what happens when you want to boot from different partitions.

At the slim login screen, press F1 to toggle different window managers.

Offline

#9 2018-06-14 07:12:19

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

fsmithred wrote:

If it's already dual boot and you're adding another OS, couldn't you just make a new entry in the existing boot menu?

That was the original plan. As far as I understand, while extlinux is able to read the entire file system (any file system) it still needs a boot loader at the target.

fsmithred wrote:

You could let it install grub and then switch to extlinux. When I did that, it was easy. I didn't set it up for multiple systems, but I do use syslinux on multiboot live-usb frequently, but those are all on the same partition. I'm not sure what happens when you want to boot from different partitions.

I followed your instructions to do that on another computer, which of course changed the MBR, but leaves /boot/grub on the system. It didn't interfere with anything on a single system boot, but I was wondering how that would play out with a triple boot system. It is of course possible to

# rm -r /boot/grub

but again was unsure if that would potentially cause problems with or affect the stability of a triple boot system.

fsmithred wrote:

At the slim login screen, press F1 to toggle different window managers.

Thanks. I know. I have set up the necessary i3.desktop files if they didn't exist, or if the existing ones didn't appear to be working with slim, but never had any success booting from anything other than the default WM. Having gained some experience with Slackware, I prefer starting at the command line, logging in, using the Slackware xwmconfig script, and then running

$ startx

I wish there was something similar for Devuan, thus avoiding the login manager for those users that like to keep it simple.

Last edited by devuan_dk_fan (2018-06-14 07:14:32)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#10 2018-06-14 07:17:04

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: extlinux install from Devuan ASCII installer shell.

devuan_dk_fan wrote:
$ startx

I wish there was something similar for Devuan, thus avoiding the login manager for those users that like to keep it simple.

I might miss something here but startx exists on Devuan?

Offline

#11 2018-06-14 07:21:29

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

devuser wrote:
devuan_dk_fan wrote:
$ startx

I wish there was something similar for Devuan, thus avoiding the login manager for those users that like to keep it simple.

I might miss something here but startx exists on Devuan?

Yes, but the process I was describing doesn't work with Debian based systems, as there is no xwmconfig. The closest to that is running

# dpkg-reconfigure gdm

but that just switches between login managers and not window managers.


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#12 2018-06-14 07:54:07

devuser
Member
Registered: 2018-04-30
Posts: 176  

Re: extlinux install from Devuan ASCII installer shell.

devuan_dk_fan wrote:
devuser wrote:
devuan_dk_fan wrote:
$ startx

I wish there was something similar for Devuan, thus avoiding the login manager for those users that like to keep it simple.

I might miss something here but startx exists on Devuan?

Yes, but the process I was describing doesn't work with Debian based systems, as there is no xwmconfig. The closest to that is running

# dpkg-reconfigure gdm

but that just switches between login managers and not window managers.

I see. How about this:

#!/bin/sh

SES="$( update-alternatives --list x-session-manager )"
C=1; for S in $SES; do
	echo "$C: $S"
	C=$(( $C + 1 ))
done
echo
S=''; while true; do
	echo -n 'Select window manager [1]: '
	read I
	echo "$I" | grep -q '[^0-9]' && continue
	if [ -z "$I" ]; then
		S=1
		break;
	fi
	if [ "$I" -gt 0 ] && [ "$I" -lt $C ]; then
		S=$I
		break
	fi
done
CMD="$( echo "$SES" | head -n$S | tail -n1 )"
echo "$CMD" > "$HOME/.wm"
echo "Default WM set to $CMD."

Then you could just do something like:

alias startx='startx "$( cat "$HOME/.wm" )"'

Last edited by devuser (2018-06-14 07:56:31)

Offline

#13 2018-06-14 08:48:06

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

devuser wrote:

I see. How about this:

#!/bin/sh

SES="$( update-alternatives --list x-session-manager )"
C=1; for S in $SES; do
	echo "$C: $S"
	C=$(( $C + 1 ))
done
echo
S=''; while true; do
	echo -n 'Select window manager [1]: '
	read I
	echo "$I" | grep -q '[^0-9]' && continue
	if [ -z "$I" ]; then
		S=1
		break;
	fi
	if [ "$I" -gt 0 ] && [ "$I" -lt $C ]; then
		S=$I
		break
	fi
done
CMD="$( echo "$SES" | head -n$S | tail -n1 )"
echo "$CMD" > "$HOME/.wm"
echo "Default WM set to $CMD."

Then you could just do something like:

alias startx='startx "$( cat "$HOME/.wm" )"'

Very cool. Thanks.
----
So in reference to a triple boot system, extlinux and Devuan, I assume that Devuan continues to use runlevels as Debian used to do with Sys V. What argument should be included in these lines

	LABEL devuan
		MENU LABEL Devuan - Debian without SystemD
		COM32 chain.c32
		APPEND hd2 1

in /boot/extlinux/extlinux.conf to boot into runlevel 1???
----
Well, alternatively it is possible to go in and edit /etc/inittab, changing

id:2:initdefault:

to

id:1:initdefault:

This is good if you need to run NVIDIA driver install scripts that are very sensitive to any X.org running, but it is only a root command line. I have discovered that it is possible to

# su - username

to get into the user account. Unfortunately, it isn't possible to run an X session in that mode, as permission is denied...

Last edited by devuan_dk_fan (2018-06-14 10:13:12)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#14 2018-06-14 12:46:15

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

@fsmithred
OK, So now I have what I believe to be a working Devuan system (as there were no errors during the install or when install extlinux), but I am unable to boot into it. /boot/extlinux/extlinux.conf contained the following to boot the Devuan system to start with:

	LABEL devuan
	MENU LABEL Devuan
	COM32 chain.c32
	APPEND hd3 1

As this is a matter of chain loading, I only included a minimal /boot/extlinux/extlinux.conf on the root partition of the Devuan install. It read:

KERNEL /vmlinuz
APPEND initrd=/initrd.img ro root=/dev/sdd1

However, I got the error:

No Default or UI configuration directive found!

Next, I copied the menu.c32 module from my Slackware64 install to /boot/extlinux/ on the Devuan system and edited the /boot/extlinux/extlinux.conf for the Devuan system to read:

UI menu.c32
PROMPT 0
MENU TITLE Boot Menu
TIMEOUT 100
DEFAULT devuan

        LABEL devuan
        MENU LABEL Devuan
        KERNEL /vmlinuz
        APPEND initrd=initrd.img ro roodt=sdd1

On reboot, got the error:

failed to load COM32 file menu.c32

Sooo, then I returned to my Slackware64 install, again edited the /boot/extlinux/extlinux.conf for Devuan to read:

UI chain.c32
KERNEL /vmlinuz
APPEND initrd=/initrd.img ro root=/dev/sdd1

and copied the chain.c32 module from my Slackware64 install to /boot/extlinux/. On reboot, I this time got the error:

failed to load COM32 file chain.c32

I am not really sure where to go from here. My Slackware64 /boot/extlinux/extlinux.conf has constantly had the following information for booting my Devuan install:

	LABEL devuan
	MENU LABEL Devuan
	COM32 chain.c32
	APPEND hd3 1

----
On the off chance that it had something to do with the Slackware64 extlinux modules, I mounted the Devuan system and then copied the modules as per the instructions within the Devuan system:

cp /usr/lib/syslinux/modules/bios/*.c32 /boot/extlinux

The actual command was of course slightly different as I was working from within another system, but the modules and the target were correct. There is no change in the error that I receive, so it must be a configuration issue, but I haven't been able to pin it down.

Last edited by devuan_dk_fan (2018-06-14 15:12:01)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#15 2018-06-15 15:07:52

fsmithred
Administrator
Registered: 2016-11-25
Posts: 927  

Re: extlinux install from Devuan ASCII installer shell.

Sorry I don't have anything useful to add. When I get a chance, I'll try extlinux with a multi-boot system and let you know what I find.

Offline

#16 2018-06-15 15:19:37

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

fsmithred wrote:

Sorry I don't have anything useful to add. When I get a chance, I'll try extlinux with a multi-boot system and let you know what I find.

Looking forward smile


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#17 2018-06-16 07:21:20

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

fsmithred wrote:

Sorry I don't have anything useful to add. When I get a chance, I'll try extlinux with a multi-boot system and let you know what I find.

I just successfully booted into Devuan ASCII on my triple boot system. Here are my extlinux.conf entries:

Slackware64 14.2 /boot/extlinux/extlinux.conf entry for Devuan ASCII install:

	LABEL devuan
		MENU LABEL Devuan - Debian without SystemD
		COM32 chain.c32
		APPEND hd3 1

Devuan ASCII /boot/extlinux/extlinux.conf entry (Devuan ASCII only):

UI menu.c32
PROMPT 0
MENU TITLE Welcome to Devuan - Debian without SystemD
TIMEOUT 100
DEFAULT devuan

	LABEL devuan
		MENU LABEL Devuan
		KERNEL /vmlinuz
		APPEND initrd=/initrd.img ro root=/dev/sdd1

On the Devuan ASCII side, I could make do with less, as I really don't need a menu. All I want to be able to do is to boot into the system from the Slackware extlinux menu, but it is the first thing that works.

Last edited by devuan_dk_fan (2018-06-16 07:22:31)


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#18 2018-06-16 15:16:00

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

@ fsmithred

Here I thought that I had everything sorted, but I compiled a low latency kernel following the instructions here and now even though I changed the entries in the Devuan /boot/extlinux/extlinux.conf to as follows, it refuses to boot, but just cycles through the countdown from 10-0 and back again:

UI menu.c32
PROMPT 0
MENU TITLE Welcome to Devuan - Debian without SystemD
TIMEOUT 100
DEFAULT devuan

	LABEL devuan
		MENU LABEL Devuan
		KERNEL /vmlinuz-4.9.88-lowlatency
		APPEND initrd=/initrd.img-4.9.88-lowlatency ro root=/dev/sdd1

Interestingly, if I mount the Devuan partition /boot/extlinux/ and manually rename all of the files that end in ".amd64" and add ".bak" at the end, and reboot, I get the same error about the partition /dev/sdd1 no longer existing, as I did when I tried editing the Devuan /etc/inittab and changed:

# The default runlevel.
id:2:initdefault:

to

# The default runlevel.
id:1:initdefault:

sooo I am pretty sure that there is some sort of glitch in Devuan ASCII, as switching runlevels in the /etc/inittab shouldn't cause an error like that, and I can't imagine that renaming files with ".bak" should do that either.


Military justice is to justice what military music is to music. - Groucho Marx

Offline

#19 2018-06-16 20:58:01

devuan_dk_fan
Member
Registered: 2018-01-10
Posts: 90  

Re: extlinux install from Devuan ASCII installer shell.

OK, the latest update is that I changed the Devuan /boot/extlinux/extlinux.conf back to the original setup:

UI menu.c32
PROMPT 0
MENU TITLE Welcome to Devuan - Debian without SystemD
TIMEOUT 100
DEFAULT devuan

	LABEL devuan
		MENU LABEL Devuan
		KERNEL /vmlinuz
		APPEND initrd=/initrd.img ro root=/dev/sdd1

by mounting the partition in Slackware and editing. When I rebooted, I was suddenly able to boot into the system again, so I uninstalled all kernels except for the low latency kernel and after having rerun the NVIDIA.run script, everything seems to be working fine. I will wait a couple of days before I mark this topic as solved, just in case there is something else.


Military justice is to justice what military music is to music. - Groucho Marx

Offline

Board footer