Discussion:
Lilo config, MBR location on SSD and boot media?
(too old to reply)
Tuxedo
2018-09-06 09:28:38 UTC
Permalink
Hello,

Following the procedure for combining LVM and LUKS (at
http://ftp.slackware.com/pub/slackware/slackware64-14.2/README_CRYPT.TXT) I
arrived at at the Lilo config stage and the installer warns that the
liloconfig installation will initially fail until after having fixed the
next chroot and mkinitrd steps.

However, perhaps I have a different type of error:

==========================================================
Fatal: open /dev/sda: No medium found

Sorry, but the attempt to install LILO has returned an error, so LILO has
not been correctly installed. You'll have to use a boot disk to start your
machine instead. It should still be possible to get LILO working by editing
the /etc/lilo/conf and reinstall LILO manually. See the LILO man paga and
documentation in /Mmnt/usr/doc/lilo-24.2 for more help. The error message
may be seen above.
===========================================================

The installers pre-selected LILO target was MBR at /dev/sda

My partitions appear as /dev/nvme0n1p1, /dev/nvme0n1p2, /dev/nvme0n1p3

Should perhaps the MBR target therefore be:

/dev/nvme0n or /dev/nvme0n1

... or something different?

I didn't manage to make a boot Flash disk when prompted as the system did
not recognise the additional USB I had added (maybe the media was broken).
How can I boot the system without the boot USB if needed? Can this be done
through the Slackware USB install media and If so, how?

Many thanks,
Tuxedo
Henrik Carlqvist
2018-09-06 16:42:12 UTC
Permalink
I arrived at at the Lilo config stage and the installer warns that the
liloconfig installation will initially fail until after having fixed the
next chroot and mkinitrd steps.
==========================================================
Fatal: open /dev/sda: No medium found
My partitions appear as /dev/nvme0n1p1, /dev/nvme0n1p2, /dev/nvme0n1p3
/dev/nvmeOn1p1 /dev/nvmeOn1p2 /dev/nvmeOn1p3 /dev/nvmeOn1p4
Is LILO even compatible? Or should I make a boot disk first and
thereafter update the system with an updated and NVM-compatable LILO if
it exists?
I usually use LILO to boot my Slackware installations, but if I remember
right, when installing on SSD connected by a PCIe card I had to use
something else as LILO did not work with /dev/nvme*. I did choose
extlinux which is part of syslinux and has the same syntax to the
configuration file as isolinux which is used to create bootable
CDs/DVDs.
regards Henrik
Tuxedo
2018-09-06 18:15:51 UTC
Permalink
Henrik Carlqvist wrote:

[...]
I usually use LILO to boot my Slackware installations, but if I remember
right, when installing on SSD connected by a PCIe card I had to use
something else as LILO did not work with /dev/nvme*. I did choose
extlinux which is part of syslinux and has the same syntax to the
configuration file as isolinux which is used to create bootable
CDs/DVDs.
Thanks for reposting the above.

Maybe someone at https://www.linuxquestions.org/questions/slackware-14/boot-slackware-on-nvme-ssd-4175586404-print/?pp=50 found a solution.

Or did anyone here succeed in making LILO work with a MBR-dos and /boot
partition set-up?

Meanwhile, my system is still open in the Slackware install stage, having
completed all except the LILO and the mkinitrd parts.

After the 9+ GB of software bundles completed installing, the MAKE USB FLASH
BOOT option came up, but creating my start-up stick failed, possibly due to
a faulty USB stick. So having passed this stage now but with another USB
media at hand, can the part of the installer which launches the flash USB
creation be repeated without rerunning the whole installation process again?

Many thanks,
Tuxedo
Pascal Hambourg
2018-09-06 18:51:52 UTC
Permalink
Post by Tuxedo
The installers pre-selected LILO target was MBR at /dev/sda
My partitions appear as /dev/nvme0n1p1, /dev/nvme0n1p2, /dev/nvme0n1p3
/dev/nvme0n or /dev/nvme0n1
/dev/nvme0n1
Tuxedo
2018-09-06 19:42:03 UTC
Permalink
Pascal Hambourg wrote:

[...]
Post by Tuxedo
/dev/nvme0n1
I reran CONFIGURE in Slackware's installation menu and arrived at the
INSTALL LILO stage, so:

boot = /dev/nvme0n1
... is now in /etc/lilo.conf

When thereafter installing LILO the error CAN'T INSTALL LILO happened, but
according to the documentation this can be expected until adding an initrd
to the file, which will be a next step.

This time the "Fatal: open /dev/sda: No medium found" error did not happen
as before with the wrong path.

In Slackware's CONFIGURE process I was also able to create a syslinux based
USB startup stick

Many thanks!

Tuxedo
Tuxedo
2018-09-06 22:00:52 UTC
Permalink
Pascal Hambourg wrote:

[...]
Post by Tuxedo
/dev/nvme0n1
Continuing with chroot into the installation and running Slackware's
mkinitrd_command_generator.sh with -i flag for interactive prompting it took
me through the options step-by-step and created a custom mkinitrd command,
which I then ran:

mkinitrd -c and with a long list of options...

I thereafter modified the /boot/initrd-tree/init file at the line:
/sbin/cryptsetup --allow-discards ${LUKSKEY} luksOpen ...
... to allow discards.

ran mkinitrd again without the -c flag to prevent deletion of the change.

In /etc/lvm/lvm.conf I then changed 0 to 1 to allow TRIM at:
issue_discards = 1

At the top of /etc/lilo.conf I then changed boot = /dev/sda to:
boot = /dev/nvme0n1

And further down in the same file, added the custom kernel:

image = /boot/vmlinuz-generic-4.14.67
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
label = Linux
read-only

And finally ran:

lilo

.. which returned:

Added Linux + *

Perhaps I'm missing something here because the "+ *" is a maybe bit strange
output. Anyhow, I rebooted and the familiar LILO startup screen appeared.

....

Unlocking LUKS ...

Enter passphrase ****

The best possible LVM+LUKS full filesystem encryption setup is now in place!

Many thanks for all the excellent the advice along the way!

Tuxedo

Loading...